소스 검색

More UI work.

Adam Ierymenko 11 년 전
부모
커밋
10f03d4119
6개의 변경된 파일173개의 추가작업 그리고 22개의 파일을 삭제
  1. 1 0
      .gitignore
  2. 1 2
      Makefile.linux
  3. 1 2
      Makefile.mac
  4. 165 17
      ZeroTierUI/mainwindow.ui
  5. 5 1
      ZeroTierUI/resources.qrc
  6. BIN
      ZeroTierUI/zt1icon.png

+ 1 - 0
.gitignore

@@ -1,4 +1,5 @@
 /zerotier-*
+/build-ZeroTierUI-*
 /ZeroTierUI/*.user
 /Makefile
 *.o

+ 1 - 2
Makefile.linux

@@ -42,7 +42,6 @@ installer: one FORCE
 	./buildinstaller.sh
 
 clean:
-	rm -f $(OBJS) file2lz4c zerotier-* zt1-*-install
-	rm -rf installer-build
+	rm -rf $(OBJS) file2lz4c zerotier-* zt1-*-install installer-build build-ZeroTierUI-*
 
 FORCE:

+ 1 - 2
Makefile.mac

@@ -41,7 +41,6 @@ file2lz4c: ext/lz4/lz4hc.o FORCE
 	$(CXX) $(CXXFLAGS) -o file2lz4c file2lz4c.cpp node/Utils.cpp node/Salsa20.cpp ext/lz4/lz4hc.o
 
 clean:
-	rm -rf *.dSYM
-	rm -f $(OBJS) file2lz4c zerotier-*
+	rm -rf *.dSYM build-ZeroTierUI-* $(OBJS) file2lz4c zerotier-*
 
 FORCE:

+ 165 - 17
ZeroTierUI/mainwindow.ui

@@ -13,23 +13,148 @@
   <property name="windowTitle">
    <string>ZeroTier One</string>
   </property>
+  <property name="windowIcon">
+   <iconset resource="resources.qrc">
+    <normaloff>:/img/zt1icon.png</normaloff>:/img/zt1icon.png</iconset>
+  </property>
   <widget class="QWidget" name="centralWidget">
    <layout class="QVBoxLayout" name="verticalLayout">
     <property name="leftMargin">
-     <number>0</number>
+     <number>6</number>
     </property>
     <property name="topMargin">
-     <number>0</number>
+     <number>6</number>
     </property>
     <property name="rightMargin">
-     <number>0</number>
+     <number>6</number>
     </property>
     <property name="bottomMargin">
-     <number>0</number>
+     <number>6</number>
     </property>
+    <item>
+     <widget class="QScrollArea" name="networksScrollArea">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <property name="horizontalScrollBarPolicy">
+       <enum>Qt::ScrollBarAlwaysOff</enum>
+      </property>
+      <property name="widgetResizable">
+       <bool>true</bool>
+      </property>
+      <widget class="QWidget" name="scrollAreaWidgetContents">
+       <property name="geometry">
+        <rect>
+         <x>0</x>
+         <y>0</y>
+         <width>654</width>
+         <height>222</height>
+        </rect>
+       </property>
+       <layout class="QVBoxLayout" name="verticalLayout_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>
+       </layout>
+      </widget>
+     </widget>
+    </item>
+    <item>
+     <widget class="QWidget" name="bottomContainerWidget" native="true">
+      <property name="sizePolicy">
+       <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
+        <horstretch>0</horstretch>
+        <verstretch>0</verstretch>
+       </sizepolicy>
+      </property>
+      <layout class="QHBoxLayout" name="horizontalLayout" stretch="0,0,0">
+       <property name="leftMargin">
+        <number>2</number>
+       </property>
+       <property name="topMargin">
+        <number>0</number>
+       </property>
+       <property name="rightMargin">
+        <number>2</number>
+       </property>
+       <property name="bottomMargin">
+        <number>0</number>
+       </property>
+       <item>
+        <widget class="QLabel" name="statusLabel">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="text">
+          <string>OFFLINE (0 direct peers)</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QLineEdit" name="networkIdLineEdit">
+         <property name="font">
+          <font>
+           <family>Courier</family>
+           <pointsize>12</pointsize>
+          </font>
+         </property>
+         <property name="frame">
+          <bool>true</bool>
+         </property>
+         <property name="placeholderText">
+          <string>[Network ID, e.g. 8056c2e21c000001]</string>
+         </property>
+        </widget>
+       </item>
+       <item>
+        <widget class="QPushButton" name="joinNetworkButton">
+         <property name="sizePolicy">
+          <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
+           <horstretch>0</horstretch>
+           <verstretch>0</verstretch>
+          </sizepolicy>
+         </property>
+         <property name="font">
+          <font>
+           <weight>75</weight>
+           <bold>true</bold>
+           <underline>false</underline>
+          </font>
+         </property>
+         <property name="autoFillBackground">
+          <bool>false</bool>
+         </property>
+         <property name="text">
+          <string>+ Join</string>
+         </property>
+         <property name="default">
+          <bool>false</bool>
+         </property>
+         <property name="flat">
+          <bool>true</bool>
+         </property>
+        </widget>
+       </item>
+      </layout>
+     </widget>
+    </item>
    </layout>
   </widget>
-  <widget class="QStatusBar" name="statusBar"/>
   <widget class="QMenuBar" name="menuBar">
    <property name="geometry">
     <rect>
@@ -39,22 +164,23 @@
      <height>22</height>
     </rect>
    </property>
-   <widget class="QMenu" name="menuFile">
+   <property name="layoutDirection">
+    <enum>Qt::LeftToRight</enum>
+   </property>
+   <widget class="QMenu" name="menuHelp">
     <property name="title">
-     <string>File</string>
+     <string>Help</string>
     </property>
-    <addaction name="actionJoin_Network"/>
-    <addaction name="separator"/>
-    <addaction name="actionExit"/>
+    <addaction name="actionAbout_2"/>
    </widget>
-   <widget class="QMenu" name="menuHelp">
-    <property name="layoutDirection">
-     <enum>Qt::LeftToRight</enum>
-    </property>
+   <widget class="QMenu" name="menuFile">
     <property name="title">
-     <string>Help</string>
+     <string>File</string>
     </property>
-    <addaction name="actionAbout"/>
+    <addaction name="actionJoin_Network_2"/>
+    <addaction name="actionShow_Detailed_Status"/>
+    <addaction name="separator"/>
+    <addaction name="actionExit_2"/>
    </widget>
    <addaction name="menuFile"/>
    <addaction name="menuHelp"/>
@@ -74,8 +200,30 @@
     <string>About</string>
    </property>
   </action>
+  <action name="actionAbout_2">
+   <property name="text">
+    <string>About</string>
+   </property>
+  </action>
+  <action name="actionJoin_Network_2">
+   <property name="text">
+    <string>Join Network</string>
+   </property>
+  </action>
+  <action name="actionShow_Detailed_Status">
+   <property name="text">
+    <string>Show Detailed Status</string>
+   </property>
+  </action>
+  <action name="actionExit_2">
+   <property name="text">
+    <string>Exit</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
- <resources/>
+ <resources>
+  <include location="resources.qrc"/>
+ </resources>
  <connections/>
 </ui>

+ 5 - 1
ZeroTierUI/resources.qrc

@@ -1 +1,5 @@
-<RCC/>
+<RCC>
+    <qresource prefix="/img">
+        <file>zt1icon.png</file>
+    </qresource>
+</RCC>

BIN
ZeroTierUI/zt1icon.png