diff --git a/ZeroTierUI/ZT1GUI.png b/ZeroTierUI/ZT1GUI.png new file mode 100644 index 000000000..03a9ec5fe Binary files /dev/null and b/ZeroTierUI/ZT1GUI.png differ diff --git a/ZeroTierUI/ZT1GUI.xcf b/ZeroTierUI/ZT1GUI.xcf new file mode 100644 index 000000000..849ee6ea3 Binary files /dev/null and b/ZeroTierUI/ZT1GUI.xcf differ diff --git a/ZeroTierUI/ZeroTierUI.pro b/ZeroTierUI/ZeroTierUI.pro index c43876ee8..c379bd0a0 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 ffb27af12..c03a95d74 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 @@ -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 c4bb72ae7..c62444282 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 235eb48d2..d2fad8111 100644 --- a/ZeroTierUI/mainwindow.ui +++ b/ZeroTierUI/mainwindow.ui @@ -246,6 +246,7 @@ Help + @@ -268,20 +269,15 @@ About - - - 10 - - Exit - - - 10 - + + + + Quick Start diff --git a/ZeroTierUI/quickstartdialog.ui b/ZeroTierUI/quickstartdialog.ui new file mode 100644 index 000000000..411f89e3c --- /dev/null +++ b/ZeroTierUI/quickstartdialog.ui @@ -0,0 +1,170 @@ + + + QuickstartDialog + + + + 0 + 0 + 800 + 480 + + + + Quick Start + + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + QFrame::NoFrame + + + true + + + Qt::AlignCenter + + + + + 0 + 0 + 785 + 800 + + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + background: #000000; + + + + + + Qt::PlainText + + + :/img/ZT1GUI.png + + + false + + + Qt::AlignCenter + + + + + + + + + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + + 10 + + + + Select Help -> Quick Start to see this screen again. + + + Qt::PlainText + + + Qt::NoTextInteraction + + + + + + + Qt::Horizontal + + + + 702 + 20 + + + + + + + + OK + + + + + + + + + + + + + + okButton + clicked() + QuickstartDialog + accept() + + + 753 + 457 + + + 399 + 239 + + + + + diff --git a/ZeroTierUI/resources.qrc b/ZeroTierUI/resources.qrc index 517b7944b..32f7c3468 100644 --- a/ZeroTierUI/resources.qrc +++ b/ZeroTierUI/resources.qrc @@ -1,6 +1,7 @@ zt1icon.png + ZT1GUI.png stylesheet.css