#5629 Add activation cancellation dialog

This commit is contained in:
Andrew Nelless 2016-09-29 16:14:09 +01:00
parent 81ae0c211a
commit d4646b1cc6
4 changed files with 131 additions and 3 deletions

View File

@ -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 \
@ -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 \
@ -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 {

View File

@ -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>

View File

@ -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;
}

View File

@ -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