]> git.droids-corp.org - fpv.git/commitdiff
add menu
authorOlivier Matz <zer0@droids-corp.org>
Sun, 7 Jun 2015 16:40:54 +0000 (18:40 +0200)
committerOlivier Matz <zer0@droids-corp.org>
Sun, 7 Jun 2015 16:40:54 +0000 (18:40 +0200)
qtosd/qtosd.py
qtosd/qtosd.ui
qtosd/qtosd_ui.py

index 37bbfcb7c37919624733193a3ec7fe73e5a29120..b8a51972d4c8d77a5061b92da2bdba341a6c1d35 100644 (file)
@@ -675,6 +675,7 @@ class Ui_MainWindow(QtWidgets.QMainWindow):
         self.ui.pitchSlider.valueChanged[int].connect(self.changePitch)
         self.ui.rollSlider.valueChanged[int].connect(self.changeRoll)
         self.ui.yawSlider.valueChanged[int].connect(self.changeYaw)
+        self.ui.actionExit.triggered.connect(self.close)
 
     def retranslateUi(self, MainWindow):
         MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow", None))
index 11aaf4f323b8662a860d94b1636c764406248b0c..9fa41c70cd72920cf88a368d84eff9b181f43132 100644 (file)
      <height>23</height>
     </rect>
    </property>
+   <widget class="QMenu" name="menuFile">
+    <property name="title">
+     <string>File</string>
+    </property>
+    <addaction name="actionExit"/>
+   </widget>
+   <widget class="QMenu" name="menuDevices">
+    <property name="title">
+     <string>Devices</string>
+    </property>
+   </widget>
+   <addaction name="menuFile"/>
+   <addaction name="menuDevices"/>
   </widget>
   <widget class="QToolBar" name="mainToolBar">
    <attribute name="toolBarArea">
    </attribute>
   </widget>
   <widget class="QStatusBar" name="statusBar"/>
+  <action name="actionExit">
+   <property name="text">
+    <string>Exit</string>
+   </property>
+  </action>
  </widget>
  <layoutdefault spacing="6" margin="11"/>
  <resources/>
index 2089ed53e1f89a13379005bc09a4b08633af4fec..2ab2f2e00bc5c8e64ba92d88a6b3025c33163bfb 100644 (file)
@@ -2,7 +2,7 @@
 
 # Form implementation generated from reading ui file 'qtosd.ui'
 #
-# Created: Tue Jun  2 19:36:00 2015
+# Created: Sun Jun  7 18:35:37 2015
 #      by: PyQt5 UI code generator 5.3.2
 #
 # WARNING! All changes made in this file will be lost!
@@ -39,6 +39,10 @@ class Ui_MainWindow(object):
         self.menuBar = QtWidgets.QMenuBar(MainWindow)
         self.menuBar.setGeometry(QtCore.QRect(0, 0, 400, 23))
         self.menuBar.setObjectName("menuBar")
+        self.menuFile = QtWidgets.QMenu(self.menuBar)
+        self.menuFile.setObjectName("menuFile")
+        self.menuDevices = QtWidgets.QMenu(self.menuBar)
+        self.menuDevices.setObjectName("menuDevices")
         MainWindow.setMenuBar(self.menuBar)
         self.mainToolBar = QtWidgets.QToolBar(MainWindow)
         self.mainToolBar.setObjectName("mainToolBar")
@@ -46,6 +50,11 @@ class Ui_MainWindow(object):
         self.statusBar = QtWidgets.QStatusBar(MainWindow)
         self.statusBar.setObjectName("statusBar")
         MainWindow.setStatusBar(self.statusBar)
+        self.actionExit = QtWidgets.QAction(MainWindow)
+        self.actionExit.setObjectName("actionExit")
+        self.menuFile.addAction(self.actionExit)
+        self.menuBar.addAction(self.menuFile.menuAction())
+        self.menuBar.addAction(self.menuDevices.menuAction())
 
         self.retranslateUi(MainWindow)
         QtCore.QMetaObject.connectSlotsByName(MainWindow)
@@ -53,6 +62,9 @@ class Ui_MainWindow(object):
     def retranslateUi(self, MainWindow):
         _translate = QtCore.QCoreApplication.translate
         MainWindow.setWindowTitle(_translate("MainWindow", "MainWindow"))
+        self.menuFile.setTitle(_translate("MainWindow", "File"))
+        self.menuDevices.setTitle(_translate("MainWindow", "Devices"))
+        self.actionExit.setText(_translate("MainWindow", "Exit"))
 
 
 if __name__ == "__main__":