Skip to content

Commit

Permalink
#5629 Add activation cancellation dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
SymlessRemoved authored and Andrew Nelless committed Sep 29, 2016
1 parent bd9d96d commit 695d927
Show file tree
Hide file tree
Showing 4 changed files with 131 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/gui/gui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ FORMS += res/MainWindowBase.ui \
res/SettingsDialogBase.ui \
res/SetupWizardBase.ui \
res/AddClientDialogBase.ui \
res/ActivationDialog.ui
res/ActivationDialog.ui \
res/CancelActivationDialog.ui
SOURCES += src/main.cpp \
src/MainWindow.cpp \
src/AboutDialog.cpp \
Expand Down Expand Up @@ -60,7 +61,8 @@ SOURCES += src/main.cpp \
src/WebClient.cpp \
src/SubscriptionManager.cpp \
src/ActivationNotifier.cpp \
src/ActivationDialog.cpp
src/ActivationDialog.cpp \
src/CancelActivationDialog.cpp
HEADERS += src/MainWindow.h \
src/AboutDialog.h \
src/ServerConfig.h \
Expand Down Expand Up @@ -106,7 +108,8 @@ HEADERS += src/MainWindow.h \
src/SubscriptionManager.h \
src/ActivationNotifier.h \
src/ElevateMode.h \
src/ActivationDialog.h
src/ActivationDialog.h \
src/CancelActivationDialog.h
RESOURCES += res/Synergy.qrc
RC_FILE = res/win/Synergy.rc
macx {
Expand Down
89 changes: 89 additions & 0 deletions src/gui/res/CancelActivationDialog.ui
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CancelActivationDialog</class>
<widget class="QDialog" name="CancelActivationDialog">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>156</height>
</rect>
</property>
<property name="windowTitle">
<string>Cancel Activation</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Are you sure?

If you don't activate Synergy you'll be missing out on some great features</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;a href=&quot;https://symless.com/pricing?source=gui&quot;&gt;&lt;span style=&quot; text-decoration: underline; color:#0000ff;&quot;&gt;Buy now&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QDialogButtonBox" name="buttonBox">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="standardButtons">
<set>QDialogButtonBox::No|QDialogButtonBox::Yes</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources/>
<connections>
<connection>
<sender>buttonBox</sender>
<signal>accepted()</signal>
<receiver>CancelActivationDialog</receiver>
<slot>accept()</slot>
<hints>
<hint type="sourcelabel">
<x>248</x>
<y>254</y>
</hint>
<hint type="destinationlabel">
<x>157</x>
<y>274</y>
</hint>
</hints>
</connection>
<connection>
<sender>buttonBox</sender>
<signal>rejected()</signal>
<receiver>CancelActivationDialog</receiver>
<slot>reject()</slot>
<hints>
<hint type="sourcelabel">
<x>316</x>
<y>260</y>
</hint>
<hint type="destinationlabel">
<x>286</x>
<y>274</y>
</hint>
</hints>
</connection>
</connections>
</ui>
14 changes: 14 additions & 0 deletions src/gui/src/CancelActivationDialog.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include "CancelActivationDialog.h"
#include "ui_CancelActivationDialog.h"

CancelActivationDialog::CancelActivationDialog(QWidget *parent) :
QDialog(parent),
ui(new Ui::CancelActivationDialog)
{
ui->setupUi(this);
}

CancelActivationDialog::~CancelActivationDialog()
{
delete ui;
}
22 changes: 22 additions & 0 deletions src/gui/src/CancelActivationDialog.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#ifndef CANCELACTIVATIONDIALOG_H
#define CANCELACTIVATIONDIALOG_H

#include <QDialog>

namespace Ui {
class CancelActivationDialog;
}

class CancelActivationDialog : public QDialog
{
Q_OBJECT

public:
explicit CancelActivationDialog(QWidget *parent = 0);
~CancelActivationDialog();

private:
Ui::CancelActivationDialog *ui;
};

#endif // CANCELACTIVATIONDIALOG_H

0 comments on commit 695d927

Please sign in to comment.