From 3a9b0cf132f7ee3fb2a596f78293f6507ad70c30 Mon Sep 17 00:00:00 2001 From: Adam Ierymenko Date: Sat, 1 Feb 2014 21:55:32 -0800 Subject: UI quick start guide. --- ZeroTierUI/ZT1GUI.png | Bin 0 -> 53577 bytes ZeroTierUI/ZT1GUI.xcf | Bin 0 -> 244364 bytes ZeroTierUI/ZeroTierUI.pro | 3 +- ZeroTierUI/mainwindow.cpp | 17 +++++ ZeroTierUI/mainwindow.h | 1 + ZeroTierUI/mainwindow.ui | 14 ++-- ZeroTierUI/quickstartdialog.ui | 170 +++++++++++++++++++++++++++++++++++++++++ ZeroTierUI/resources.qrc | 1 + 8 files changed, 196 insertions(+), 10 deletions(-) create mode 100644 ZeroTierUI/ZT1GUI.png create mode 100644 ZeroTierUI/ZT1GUI.xcf create mode 100644 ZeroTierUI/quickstartdialog.ui diff --git a/ZeroTierUI/ZT1GUI.png b/ZeroTierUI/ZT1GUI.png new file mode 100644 index 00000000..03a9ec5f 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 00000000..849ee6ea Binary files /dev/null and b/ZeroTierUI/ZT1GUI.xcf differ 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 @@ -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 @@ 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 00000000..411f89e3 --- /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 517b7944..32f7c346 100644 --- a/ZeroTierUI/resources.qrc +++ b/ZeroTierUI/resources.qrc @@ -1,6 +1,7 @@ zt1icon.png + ZT1GUI.png stylesheet.css -- cgit v1.2.3