forked from nasa/cFS-GroundSystem
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix nasa#72 - Upgrade PyQt4 to PyQt5
Includes code cleanup/refactoring. Also fixes nasa#71
- Loading branch information
1 parent
dec8435
commit 9e95db1
Showing
29 changed files
with
11,539 additions
and
13,601 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,144 +1,121 @@ | ||
# -*- coding: utf-8 -*- | ||
|
||
# Form implementation generated from reading ui file 'MainWindow.ui' | ||
# Form implementation generated from reading ui file '/home/lbleier/cFS/tools/cFS-GroundSystem/MainWindow.ui' | ||
# | ||
# Created: Wed Jun 24 09:56:47 2015 | ||
# by: PyQt4 UI code generator 4.11.3 | ||
# Created by: PyQt5 UI code generator 5.12.3 | ||
# | ||
# WARNING! All changes made in this file will be lost! | ||
|
||
from PyQt4 import QtCore, QtGui | ||
|
||
try: | ||
_fromUtf8 = QtCore.QString.fromUtf8 | ||
except AttributeError: | ||
def _fromUtf8(s): | ||
return s | ||
from PyQt5 import QtCore, QtGui, QtWidgets | ||
|
||
try: | ||
_encoding = QtGui.QApplication.UnicodeUTF8 | ||
def _translate(context, text, disambig): | ||
return QtGui.QApplication.translate(context, text, disambig, _encoding) | ||
except AttributeError: | ||
def _translate(context, text, disambig): | ||
return QtGui.QApplication.translate(context, text, disambig) | ||
|
||
class Ui_MainWindow(object): | ||
def setupUi(self, MainWindow): | ||
MainWindow.setObjectName(_fromUtf8("MainWindow")) | ||
MainWindow.setObjectName("MainWindow") | ||
MainWindow.setEnabled(True) | ||
MainWindow.resize(420, 217) | ||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred) | ||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) | ||
sizePolicy.setHorizontalStretch(24) | ||
sizePolicy.setVerticalStretch(0) | ||
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth()) | ||
MainWindow.setSizePolicy(sizePolicy) | ||
self.centralwidget = QtGui.QWidget(MainWindow) | ||
self.centralwidget.setObjectName(_fromUtf8("centralwidget")) | ||
self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget) | ||
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout")) | ||
self.labelHomeTittle = QtGui.QLabel(self.centralwidget) | ||
self.centralwidget = QtWidgets.QWidget(MainWindow) | ||
self.centralwidget.setObjectName("centralwidget") | ||
self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget) | ||
self.verticalLayout.setObjectName("verticalLayout") | ||
self.labelHomeTittle = QtWidgets.QLabel(self.centralwidget) | ||
font = QtGui.QFont() | ||
font.setPointSize(22) | ||
font.setBold(False) | ||
font.setWeight(50) | ||
self.labelHomeTittle.setFont(font) | ||
self.labelHomeTittle.setAlignment(QtCore.Qt.AlignCenter) | ||
self.labelHomeTittle.setObjectName(_fromUtf8("labelHomeTittle")) | ||
self.labelHomeTittle.setObjectName("labelHomeTittle") | ||
self.verticalLayout.addWidget(self.labelHomeTittle) | ||
self.line_2 = QtGui.QFrame(self.centralwidget) | ||
self.line_2.setFrameShape(QtGui.QFrame.HLine) | ||
self.line_2.setFrameShadow(QtGui.QFrame.Sunken) | ||
self.line_2.setObjectName(_fromUtf8("line_2")) | ||
self.line_2 = QtWidgets.QFrame(self.centralwidget) | ||
self.line_2.setFrameShape(QtWidgets.QFrame.HLine) | ||
self.line_2.setFrameShadow(QtWidgets.QFrame.Sunken) | ||
self.line_2.setObjectName("line_2") | ||
self.verticalLayout.addWidget(self.line_2) | ||
self.horizontalLayout = QtGui.QHBoxLayout() | ||
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout")) | ||
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | ||
self.horizontalLayout = QtWidgets.QHBoxLayout() | ||
self.horizontalLayout.setObjectName("horizontalLayout") | ||
spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) | ||
self.horizontalLayout.addItem(spacerItem) | ||
self.label_3 = QtGui.QLabel(self.centralwidget) | ||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred) | ||
self.label_3 = QtWidgets.QLabel(self.centralwidget) | ||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Preferred) | ||
sizePolicy.setHorizontalStretch(0) | ||
sizePolicy.setVerticalStretch(0) | ||
sizePolicy.setHeightForWidth(self.label_3.sizePolicy().hasHeightForWidth()) | ||
self.label_3.setSizePolicy(sizePolicy) | ||
self.label_3.setMinimumSize(QtCore.QSize(141, 0)) | ||
self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter) | ||
self.label_3.setObjectName(_fromUtf8("label_3")) | ||
self.label_3.setObjectName("label_3") | ||
self.horizontalLayout.addWidget(self.label_3) | ||
self.comboBoxIpAddresses = QtGui.QComboBox(self.centralwidget) | ||
self.comboBoxIpAddresses = QtWidgets.QComboBox(self.centralwidget) | ||
self.comboBoxIpAddresses.setMinimumSize(QtCore.QSize(132, 0)) | ||
self.comboBoxIpAddresses.setMaximumSize(QtCore.QSize(132, 16777215)) | ||
self.comboBoxIpAddresses.setObjectName(_fromUtf8("comboBoxIpAddresses")) | ||
self.comboBoxIpAddresses.addItem(_fromUtf8("")) | ||
self.comboBoxIpAddresses.setObjectName("comboBoxIpAddresses") | ||
self.comboBoxIpAddresses.addItem("") | ||
self.horizontalLayout.addWidget(self.comboBoxIpAddresses) | ||
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | ||
spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) | ||
self.horizontalLayout.addItem(spacerItem1) | ||
self.verticalLayout.addLayout(self.horizontalLayout) | ||
self.horizontalLayout_2 = QtGui.QHBoxLayout() | ||
self.horizontalLayout_2 = QtWidgets.QHBoxLayout() | ||
self.horizontalLayout_2.setSpacing(32) | ||
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2")) | ||
self.pushButtonStartTlm = QtGui.QPushButton(self.centralwidget) | ||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | ||
self.horizontalLayout_2.setObjectName("horizontalLayout_2") | ||
self.pushButtonStartTlm = QtWidgets.QPushButton(self.centralwidget) | ||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) | ||
sizePolicy.setHorizontalStretch(0) | ||
sizePolicy.setVerticalStretch(0) | ||
sizePolicy.setHeightForWidth(self.pushButtonStartTlm.sizePolicy().hasHeightForWidth()) | ||
self.pushButtonStartTlm.setSizePolicy(sizePolicy) | ||
self.pushButtonStartTlm.setObjectName(_fromUtf8("pushButtonStartTlm")) | ||
self.pushButtonStartTlm.setObjectName("pushButtonStartTlm") | ||
self.horizontalLayout_2.addWidget(self.pushButtonStartTlm) | ||
self.pushButtonStartCmd = QtGui.QPushButton(self.centralwidget) | ||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding) | ||
self.pushButtonStartCmd = QtWidgets.QPushButton(self.centralwidget) | ||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) | ||
sizePolicy.setHorizontalStretch(0) | ||
sizePolicy.setVerticalStretch(0) | ||
sizePolicy.setHeightForWidth(self.pushButtonStartCmd.sizePolicy().hasHeightForWidth()) | ||
self.pushButtonStartCmd.setSizePolicy(sizePolicy) | ||
self.pushButtonStartCmd.setObjectName(_fromUtf8("pushButtonStartCmd")) | ||
self.pushButtonStartCmd.setObjectName("pushButtonStartCmd") | ||
self.horizontalLayout_2.addWidget(self.pushButtonStartCmd) | ||
self.verticalLayout.addLayout(self.horizontalLayout_2) | ||
self.line = QtGui.QFrame(self.centralwidget) | ||
self.line.setFrameShape(QtGui.QFrame.HLine) | ||
self.line.setFrameShadow(QtGui.QFrame.Sunken) | ||
self.line.setObjectName(_fromUtf8("line")) | ||
self.line = QtWidgets.QFrame(self.centralwidget) | ||
self.line.setFrameShape(QtWidgets.QFrame.HLine) | ||
self.line.setFrameShadow(QtWidgets.QFrame.Sunken) | ||
self.line.setObjectName("line") | ||
self.verticalLayout.addWidget(self.line) | ||
self.horizontalLayout_4 = QtGui.QHBoxLayout() | ||
self.horizontalLayout_4.setObjectName(_fromUtf8("horizontalLayout_4")) | ||
self.label_5 = QtGui.QLabel(self.centralwidget) | ||
self.horizontalLayout_4 = QtWidgets.QHBoxLayout() | ||
self.horizontalLayout_4.setObjectName("horizontalLayout_4") | ||
self.label_5 = QtWidgets.QLabel(self.centralwidget) | ||
font = QtGui.QFont() | ||
font.setPointSize(11) | ||
self.label_5.setFont(font) | ||
self.label_5.setObjectName(_fromUtf8("label_5")) | ||
self.label_5.setObjectName("label_5") | ||
self.horizontalLayout_4.addWidget(self.label_5) | ||
self.pushButton = QtGui.QPushButton(self.centralwidget) | ||
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed) | ||
self.pushButton = QtWidgets.QPushButton(self.centralwidget) | ||
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed) | ||
sizePolicy.setHorizontalStretch(0) | ||
sizePolicy.setVerticalStretch(0) | ||
sizePolicy.setHeightForWidth(self.pushButton.sizePolicy().hasHeightForWidth()) | ||
self.pushButton.setSizePolicy(sizePolicy) | ||
self.pushButton.setObjectName(_fromUtf8("pushButton")) | ||
self.pushButton.setObjectName("pushButton") | ||
self.horizontalLayout_4.addWidget(self.pushButton) | ||
self.verticalLayout.addLayout(self.horizontalLayout_4) | ||
MainWindow.setCentralWidget(self.centralwidget) | ||
|
||
self.retranslateUi(MainWindow) | ||
QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("clicked()")), MainWindow.close) | ||
self.pushButton.clicked.connect(MainWindow.close) | ||
QtCore.QMetaObject.connectSlotsByName(MainWindow) | ||
|
||
def retranslateUi(self, MainWindow): | ||
MainWindow.setWindowTitle(_translate("MainWindow", "Main Window", None)) | ||
self.labelHomeTittle.setText(_translate("MainWindow", "cFS Ground System", None)) | ||
self.label_3.setText(_translate("MainWindow", "Selected IP Address: ", None)) | ||
self.comboBoxIpAddresses.setItemText(0, _translate("MainWindow", "All", None)) | ||
self.pushButtonStartTlm.setText(_translate("MainWindow", "Start Telemetry System", None)) | ||
self.pushButtonStartCmd.setText(_translate("MainWindow", "Start Command System", None)) | ||
self.label_5.setText(_translate("MainWindow", "*Read Guide-GroundSystem.txt for help", None)) | ||
self.pushButton.setText(_translate("MainWindow", "Close", None)) | ||
|
||
|
||
if __name__ == "__main__": | ||
import sys | ||
app = QtGui.QApplication(sys.argv) | ||
MainWindow = QtGui.QMainWindow() | ||
ui = Ui_MainWindow() | ||
ui.setupUi(MainWindow) | ||
MainWindow.show() | ||
sys.exit(app.exec_()) | ||
|
||
_translate = QtCore.QCoreApplication.translate | ||
MainWindow.setWindowTitle(_translate("MainWindow", "Main Window")) | ||
self.labelHomeTittle.setText(_translate("MainWindow", "CFS Ground System")) | ||
self.label_3.setText(_translate("MainWindow", "Selected IP Address: ")) | ||
self.comboBoxIpAddresses.setItemText(0, _translate("MainWindow", "All")) | ||
self.pushButtonStartTlm.setText(_translate("MainWindow", "Start Telemetry System")) | ||
self.pushButtonStartCmd.setText(_translate("MainWindow", "Start Command System")) | ||
self.label_5.setText(_translate("MainWindow", "*Read Guide-GroundSystem.txt for help")) | ||
self.pushButton.setText(_translate("MainWindow", "Close")) |
Oops, something went wrong.