diff options
-rw-r--r-- | ZeroTierUI/ZT1GUI.png | bin | 0 -> 53577 bytes | |||
-rw-r--r-- | ZeroTierUI/ZT1GUI.xcf | bin | 0 -> 244364 bytes | |||
-rw-r--r-- | ZeroTierUI/ZeroTierUI.pro | 3 | ||||
-rw-r--r-- | ZeroTierUI/mainwindow.cpp | 17 | ||||
-rw-r--r-- | ZeroTierUI/mainwindow.h | 1 | ||||
-rw-r--r-- | ZeroTierUI/mainwindow.ui | 14 | ||||
-rw-r--r-- | ZeroTierUI/quickstartdialog.ui | 170 | ||||
-rw-r--r-- | ZeroTierUI/resources.qrc | 1 |
8 files changed, 196 insertions, 10 deletions
diff --git a/ZeroTierUI/ZT1GUI.png b/ZeroTierUI/ZT1GUI.png Binary files differnew file mode 100644 index 00000000..03a9ec5f --- /dev/null +++ b/ZeroTierUI/ZT1GUI.png diff --git a/ZeroTierUI/ZT1GUI.xcf b/ZeroTierUI/ZT1GUI.xcf Binary files differnew file mode 100644 index 00000000..849ee6ea --- /dev/null +++ b/ZeroTierUI/ZT1GUI.xcf diff --git a/ZeroTierUI/ZeroTierUI.pro b/ZeroTierUI/ZeroTierUI.pro index c43876ee..c379bd0a 100644 --- a/ZeroTierUI/ZeroTierUI.pro +++ b/ZeroTierUI/ZeroTierUI.pro @@ -104,7 +104,8 @@ FORMS += mainwindow.ui \ aboutwindow.ui \ networkwidget.ui \ installdialog.ui \ - licensedialog.ui + licensedialog.ui \ + quickstartdialog.ui RESOURCES += \ resources.qrc diff --git a/ZeroTierUI/mainwindow.cpp b/ZeroTierUI/mainwindow.cpp index ffb27af1..c03a95d7 100644 --- a/ZeroTierUI/mainwindow.cpp +++ b/ZeroTierUI/mainwindow.cpp @@ -51,6 +51,7 @@ #include "aboutwindow.h" #include "networkwidget.h" #include "ui_mainwindow.h" +#include "ui_quickstartdialog.h" #ifdef __APPLE__ #include <stdio.h> @@ -144,6 +145,13 @@ void MainWindow::timerEvent(QTimerEvent *event) // event can be null since code if (this->firstTimerTick) { this->firstTimerTick = false; this->killTimer(this->pollServiceTimerId); + + if (!settings->value("shown_quickStart",false).toBool()) { + on_actionQuick_Start_triggered(); + settings->setValue("shown_quickStart",true); + settings->sync(); + } + this->pollServiceTimerId = this->startTimer(1500); } @@ -387,3 +395,12 @@ void MainWindow::on_addressButton_clicked() { QApplication::clipboard()->setText(this->myAddress); } + +void MainWindow::on_actionQuick_Start_triggered() +{ + Ui::QuickstartDialog qd; + QDialog *qdd = new QDialog(this); + qd.setupUi(qdd); + qdd->setModal(false); + qdd->show(); +} diff --git a/ZeroTierUI/mainwindow.h b/ZeroTierUI/mainwindow.h index c4bb72ae..c6244428 100644 --- a/ZeroTierUI/mainwindow.h +++ b/ZeroTierUI/mainwindow.h @@ -79,6 +79,7 @@ private slots: void on_actionAbout_triggered(); void on_networkIdLineEdit_textChanged(const QString &text); void on_addressButton_clicked(); + void on_actionQuick_Start_triggered(); private: Ui::MainWindow *ui; diff --git a/ZeroTierUI/mainwindow.ui b/ZeroTierUI/mainwindow.ui index 235eb48d..d2fad811 100644 --- a/ZeroTierUI/mainwindow.ui +++ b/ZeroTierUI/mainwindow.ui @@ -246,6 +246,7 @@ <string>Help</string> </property> <addaction name="actionAbout"/> + <addaction name="actionQuick_Start"/> </widget> <widget class="QMenu" name="menuFile"> <property name="title"> @@ -268,20 +269,15 @@ <property name="text"> <string>About</string> </property> - <property name="font"> - <font> - <pointsize>10</pointsize> - </font> - </property> </action> <action name="actionExit"> <property name="text"> <string>Exit</string> </property> - <property name="font"> - <font> - <pointsize>10</pointsize> - </font> + </action> + <action name="actionQuick_Start"> + <property name="text"> + <string>Quick Start</string> </property> </action> </widget> diff --git a/ZeroTierUI/quickstartdialog.ui b/ZeroTierUI/quickstartdialog.ui new file mode 100644 index 00000000..411f89e3 --- /dev/null +++ b/ZeroTierUI/quickstartdialog.ui @@ -0,0 +1,170 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>QuickstartDialog</class> + <widget class="QDialog" name="QuickstartDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>800</width> + <height>480</height> + </rect> + </property> + <property name="windowTitle"> + <string>Quick Start</string> + </property> + <layout class="QVBoxLayout" name="verticalLayout"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QScrollArea" name="scrollArea"> + <property name="frameShape"> + <enum>QFrame::NoFrame</enum> + </property> + <property name="widgetResizable"> + <bool>true</bool> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + <widget class="QWidget" name="scrollAreaWidgetContents"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>785</width> + <height>800</height> + </rect> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_2"> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QLabel" name="label"> + <property name="styleSheet"> + <string notr="true">background: #000000;</string> + </property> + <property name="text"> + <string/> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + <property name="pixmap"> + <pixmap resource="resources.qrc">:/img/ZT1GUI.png</pixmap> + </property> + <property name="scaledContents"> + <bool>false</bool> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + </layout> + </widget> + </widget> + </item> + <item> + <widget class="QWidget" name="widget" native="true"> + <layout class="QHBoxLayout" name="horizontalLayout"> + <property name="leftMargin"> + <number>6</number> + </property> + <property name="topMargin"> + <number>6</number> + </property> + <property name="rightMargin"> + <number>6</number> + </property> + <property name="bottomMargin"> + <number>6</number> + </property> + <item> + <widget class="QLabel" name="label_2"> + <property name="font"> + <font> + <pointsize>10</pointsize> + </font> + </property> + <property name="text"> + <string>Select Help -> Quick Start to see this screen again.</string> + </property> + <property name="textFormat"> + <enum>Qt::PlainText</enum> + </property> + <property name="textInteractionFlags"> + <set>Qt::NoTextInteraction</set> + </property> + </widget> + </item> + <item> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>702</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="okButton"> + <property name="text"> + <string>OK</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <resources> + <include location="resources.qrc"/> + </resources> + <connections> + <connection> + <sender>okButton</sender> + <signal>clicked()</signal> + <receiver>QuickstartDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>753</x> + <y>457</y> + </hint> + <hint type="destinationlabel"> + <x>399</x> + <y>239</y> + </hint> + </hints> + </connection> + </connections> +</ui> diff --git a/ZeroTierUI/resources.qrc b/ZeroTierUI/resources.qrc index 517b7944..32f7c346 100644 --- a/ZeroTierUI/resources.qrc +++ b/ZeroTierUI/resources.qrc @@ -1,6 +1,7 @@ <RCC> <qresource prefix="/img"> <file>zt1icon.png</file> + <file>ZT1GUI.png</file> </qresource> <qresource prefix="/css"> <file>stylesheet.css</file> |