From: Olivier Matz Date: Sun, 7 Jun 2015 16:40:54 +0000 (+0200) Subject: add menu X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=b1ecb66771be4f3f30d2d099b70e4e0dd3314ec6;p=fpv.git add menu --- diff --git a/qtosd/qtosd.py b/qtosd/qtosd.py index 37bbfcb..b8a5197 100644 --- a/qtosd/qtosd.py +++ b/qtosd/qtosd.py @@ -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)) diff --git a/qtosd/qtosd.ui b/qtosd/qtosd.ui index 11aaf4f..9fa41c7 100644 --- a/qtosd/qtosd.ui +++ b/qtosd/qtosd.ui @@ -65,6 +65,19 @@ 23 + + + File + + + + + + Devices + + + + @@ -75,6 +88,11 @@ + + + Exit + + diff --git a/qtosd/qtosd_ui.py b/qtosd/qtosd_ui.py index 2089ed5..2ab2f2e 100644 --- a/qtosd/qtosd_ui.py +++ b/qtosd/qtosd_ui.py @@ -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__":