UI quick start guide.

This commit is contained in:
Adam Ierymenko 2014-02-01 21:55:32 -08:00
parent 2a3e646b94
commit 3a9b0cf132
8 changed files with 196 additions and 10 deletions

BIN
ZeroTierUI/ZT1GUI.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 52 KiB

BIN
ZeroTierUI/ZT1GUI.xcf Normal file

Binary file not shown.

View File

@ -104,7 +104,8 @@ FORMS += mainwindow.ui \
aboutwindow.ui \
networkwidget.ui \
installdialog.ui \
licensedialog.ui
licensedialog.ui \
quickstartdialog.ui
RESOURCES += \
resources.qrc

View File

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

View File

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

View File

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

View File

@ -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 -&gt; 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>

View File

@ -1,6 +1,7 @@
<RCC>
<qresource prefix="/img">
<file>zt1icon.png</file>
<file>ZT1GUI.png</file>
</qresource>
<qresource prefix="/css">
<file>stylesheet.css</file>