def set_up_gauges(self): self.gauge1 = AnalogGaugeWidget() self.gauge2 = AnalogGaugeWidget() self.gauge3 = AnalogGaugeWidget() self.gauge4 = AnalogGaugeWidget() self.modify_gauge(self.gauge1, self.layout_gauge1) self.modify_gauge(self.gauge2, self.layout_gauge2) self.modify_gauge(self.gauge3, self.layout_gauge3) self.modify_gauge(self.gauge4, self.layout_gauge4)
def setupUi(self, InternetSentinelDialog): InternetSentinelDialog.setObjectName("InternetSentinelDialog") InternetSentinelDialog.resize(800, 460) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Maximum) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( InternetSentinelDialog.sizePolicy().hasHeightForWidth()) InternetSentinelDialog.setSizePolicy(sizePolicy) InternetSentinelDialog.setMinimumSize(QtCore.QSize(800, 460)) InternetSentinelDialog.setMaximumSize(QtCore.QSize(800, 460)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) InternetSentinelDialog.setFont(font) self.verticalLayout = QtWidgets.QVBoxLayout(InternetSentinelDialog) self.verticalLayout.setObjectName("verticalLayout") self.horizontalLayout_4 = QtWidgets.QHBoxLayout() self.horizontalLayout_4.setSizeConstraint( QtWidgets.QLayout.SetMaximumSize) self.horizontalLayout_4.setObjectName("horizontalLayout_4") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.verticalLayout_6 = QtWidgets.QVBoxLayout() self.verticalLayout_6.setSizeConstraint( QtWidgets.QLayout.SetMaximumSize) self.verticalLayout_6.setObjectName("verticalLayout_6") self.uLabel = QtWidgets.QLabel(InternetSentinelDialog) self.uLabel.setMaximumSize(QtCore.QSize(16777215, 40)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setBold(True) font.setWeight(75) self.uLabel.setFont(font) self.uLabel.setAlignment(QtCore.Qt.AlignCenter) self.uLabel.setObjectName("uLabel") self.verticalLayout_6.addWidget(self.uLabel) self.uploadLabel = QtWidgets.QLabel(InternetSentinelDialog) self.uploadLabel.setMinimumSize(QtCore.QSize(0, 40)) self.uploadLabel.setMaximumSize(QtCore.QSize(16777215, 40)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(25) self.uploadLabel.setFont(font) self.uploadLabel.setText("") self.uploadLabel.setAlignment(QtCore.Qt.AlignCenter) self.uploadLabel.setObjectName("uploadLabel") self.verticalLayout_6.addWidget(self.uploadLabel) self.gridLayout.addLayout(self.verticalLayout_6, 0, 2, 1, 1) self.verticalLayout_5 = QtWidgets.QVBoxLayout() self.verticalLayout_5.setSizeConstraint( QtWidgets.QLayout.SetMaximumSize) self.verticalLayout_5.setObjectName("verticalLayout_5") self.dLabel = QtWidgets.QLabel(InternetSentinelDialog) self.dLabel.setMaximumSize(QtCore.QSize(16777215, 40)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setBold(True) font.setWeight(75) self.dLabel.setFont(font) self.dLabel.setAlignment(QtCore.Qt.AlignCenter) self.dLabel.setObjectName("dLabel") self.verticalLayout_5.addWidget(self.dLabel) self.downloadLabel = QtWidgets.QLabel(InternetSentinelDialog) self.downloadLabel.setMaximumSize(QtCore.QSize(16777215, 40)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(25) self.downloadLabel.setFont(font) self.downloadLabel.setText("") self.downloadLabel.setAlignment(QtCore.Qt.AlignCenter) self.downloadLabel.setObjectName("downloadLabel") self.verticalLayout_5.addWidget(self.downloadLabel) self.gridLayout.addLayout(self.verticalLayout_5, 0, 1, 1, 1) self.verticalLayout_2 = QtWidgets.QVBoxLayout() self.verticalLayout_2.setSizeConstraint( QtWidgets.QLayout.SetMaximumSize) self.verticalLayout_2.setObjectName("verticalLayout_2") self.pLabel = QtWidgets.QLabel(InternetSentinelDialog) self.pLabel.setMaximumSize(QtCore.QSize(16777215, 40)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setBold(True) font.setWeight(75) self.pLabel.setFont(font) self.pLabel.setAlignment(QtCore.Qt.AlignCenter) self.pLabel.setObjectName("pLabel") self.verticalLayout_2.addWidget(self.pLabel) self.pingLabel = QtWidgets.QLabel(InternetSentinelDialog) self.pingLabel.setMaximumSize(QtCore.QSize(16777215, 40)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(25) self.pingLabel.setFont(font) self.pingLabel.setText("") self.pingLabel.setAlignment(QtCore.Qt.AlignCenter) self.pingLabel.setObjectName("pingLabel") self.verticalLayout_2.addWidget(self.pingLabel) self.gridLayout.addLayout(self.verticalLayout_2, 0, 0, 1, 1) self.horizontalLayout_4.addLayout(self.gridLayout) self.verticalLayout.addLayout(self.horizontalLayout_4) self.horizontalLayout_5 = QtWidgets.QHBoxLayout() self.horizontalLayout_5.setObjectName("horizontalLayout_5") self.verticalLayout_10 = QtWidgets.QVBoxLayout() self.verticalLayout_10.setSizeConstraint( QtWidgets.QLayout.SetDefaultConstraint) self.verticalLayout_10.setContentsMargins(5, -1, -1, -1) self.verticalLayout_10.setObjectName("verticalLayout_10") self.label_8 = QtWidgets.QLabel(InternetSentinelDialog) self.label_8.setMinimumSize(QtCore.QSize(0, 50)) self.label_8.setMaximumSize(QtCore.QSize(16777215, 60)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setBold(True) font.setWeight(75) self.label_8.setFont(font) self.label_8.setAlignment(QtCore.Qt.AlignCenter) self.label_8.setObjectName("label_8") self.verticalLayout_10.addWidget(self.label_8) self.formLayout_2 = QtWidgets.QFormLayout() self.formLayout_2.setLabelAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.formLayout_2.setFormAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignTop) self.formLayout_2.setContentsMargins(5, -1, -1, -1) self.formLayout_2.setObjectName("formLayout_2") self.label_3 = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.label_3.setFont(font) self.label_3.setObjectName("label_3") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_3) self.testServerLabel = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.testServerLabel.setFont(font) self.testServerLabel.setText("") self.testServerLabel.setObjectName("testServerLabel") self.formLayout_2.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.testServerLabel) self.lniLabel = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.lniLabel.setFont(font) self.lniLabel.setObjectName("lniLabel") self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.lniLabel) self.lastNetworkIssueDateLabel = QtWidgets.QLabel( InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.lastNetworkIssueDateLabel.setFont(font) self.lastNetworkIssueDateLabel.setText("") self.lastNetworkIssueDateLabel.setObjectName( "lastNetworkIssueDateLabel") self.formLayout_2.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.lastNetworkIssueDateLabel) self.isLabel = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.isLabel.setFont(font) self.isLabel.setObjectName("isLabel") self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.isLabel) self.internetStatusLabel = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.internetStatusLabel.setFont(font) self.internetStatusLabel.setText("") self.internetStatusLabel.setObjectName("internetStatusLabel") self.formLayout_2.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.internetStatusLabel) self.pingHostIpAddressLabel = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.pingHostIpAddressLabel.setFont(font) self.pingHostIpAddressLabel.setText("") self.pingHostIpAddressLabel.setObjectName("pingHostIpAddressLabel") self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.pingHostIpAddressLabel) self.label_9 = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.label_9.setFont(font) self.label_9.setObjectName("label_9") self.formLayout_2.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_9) self.verticalLayout_10.addLayout(self.formLayout_2) self.horizontalLayout_5.addLayout(self.verticalLayout_10) self.speedometerWidget = AnalogGaugeWidget(InternetSentinelDialog) self.speedometerWidget.setMinimumSize(QtCore.QSize(200, 200)) self.speedometerWidget.setMaximumSize(QtCore.QSize(200, 200)) self.speedometerWidget.setObjectName("speedometerWidget") self.horizontalLayout_5.addWidget(self.speedometerWidget) self.verticalLayout_12 = QtWidgets.QVBoxLayout() self.verticalLayout_12.setContentsMargins(-1, 0, 5, 5) self.verticalLayout_12.setObjectName("verticalLayout_12") self.label = QtWidgets.QLabel(InternetSentinelDialog) self.label.setMinimumSize(QtCore.QSize(0, 30)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setBold(True) font.setWeight(75) self.label.setFont(font) self.label.setAlignment(QtCore.Qt.AlignCenter) self.label.setObjectName("label") self.verticalLayout_12.addWidget(self.label) self.resetInternetConnectionPushButton = QtWidgets.QPushButton( InternetSentinelDialog) self.resetInternetConnectionPushButton.setMinimumSize( QtCore.QSize(0, 40)) self.resetInternetConnectionPushButton.setMaximumSize( QtCore.QSize(120, 16777215)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(10) self.resetInternetConnectionPushButton.setFont(font) self.resetInternetConnectionPushButton.setObjectName( "resetInternetConnectionPushButton") self.verticalLayout_12.addWidget( self.resetInternetConnectionPushButton, 0, QtCore.Qt.AlignHCenter) self.rebootSystemPushButton = QtWidgets.QPushButton( InternetSentinelDialog) self.rebootSystemPushButton.setMinimumSize(QtCore.QSize(0, 40)) self.rebootSystemPushButton.setMaximumSize(QtCore.QSize(120, 16777215)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(10) self.rebootSystemPushButton.setFont(font) self.rebootSystemPushButton.setObjectName("rebootSystemPushButton") self.verticalLayout_12.addWidget(self.rebootSystemPushButton, 0, QtCore.Qt.AlignHCenter) self.horizontalLayout = QtWidgets.QHBoxLayout() self.horizontalLayout.setObjectName("horizontalLayout") self.label_7 = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.label_7.setFont(font) self.label_7.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.label_7.setObjectName("label_7") self.horizontalLayout.addWidget(self.label_7, 0, QtCore.Qt.AlignRight) self.themeComboBox = QtWidgets.QComboBox(InternetSentinelDialog) font = QtGui.QFont() font.setPointSize(11) self.themeComboBox.setFont(font) self.themeComboBox.setObjectName("themeComboBox") self.horizontalLayout.addWidget(self.themeComboBox, 0, QtCore.Qt.AlignLeft) self.verticalLayout_12.addLayout(self.horizontalLayout) self.horizontalLayout_5.addLayout(self.verticalLayout_12) self.verticalLayout.addLayout(self.horizontalLayout_5) self.horizontalLayout_3 = QtWidgets.QHBoxLayout() self.horizontalLayout_3.setObjectName("horizontalLayout_3") self.verticalLayout_7 = QtWidgets.QVBoxLayout() self.verticalLayout_7.setObjectName("verticalLayout_7") self.configLabel = QtWidgets.QLabel(InternetSentinelDialog) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.configLabel.sizePolicy().hasHeightForWidth()) self.configLabel.setSizePolicy(sizePolicy) self.configLabel.setMinimumSize(QtCore.QSize(0, 0)) self.configLabel.setMaximumSize(QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setBold(True) font.setWeight(75) self.configLabel.setFont(font) self.configLabel.setAlignment(QtCore.Qt.AlignCenter) self.configLabel.setObjectName("configLabel") self.verticalLayout_7.addWidget(self.configLabel) self.formLayout_3 = QtWidgets.QFormLayout() self.formLayout_3.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize) self.formLayout_3.setLabelAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.formLayout_3.setFormAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.formLayout_3.setContentsMargins(5, -1, 5, -1) self.formLayout_3.setObjectName("formLayout_3") self.downloadFloorSpinBox = QtWidgets.QSpinBox(InternetSentinelDialog) self.downloadFloorSpinBox.setMinimumSize(QtCore.QSize(30, 40)) self.downloadFloorSpinBox.setMaximumSize( QtCore.QSize(16777215, 16777215)) font = QtGui.QFont() font.setPointSize(11) self.downloadFloorSpinBox.setFont(font) self.downloadFloorSpinBox.setStyleSheet("QSpinBox::down-button{\n" " width:23\n" "}\n" "QSpinBox::up-button{\n" " width:23\n" "}\n" "") self.downloadFloorSpinBox.setAlignment(QtCore.Qt.AlignCenter) self.downloadFloorSpinBox.setButtonSymbols( QtWidgets.QAbstractSpinBox.UpDownArrows) self.downloadFloorSpinBox.setMaximum(100) self.downloadFloorSpinBox.setObjectName("downloadFloorSpinBox") self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.downloadFloorSpinBox) self.label_18 = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.label_18.setFont(font) self.label_18.setObjectName("label_18") self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_18) self.resetDelaySpinBox = QtWidgets.QSpinBox(InternetSentinelDialog) self.resetDelaySpinBox.setMinimumSize(QtCore.QSize(30, 40)) self.resetDelaySpinBox.setMaximumSize(QtCore.QSize(16777215, 30)) font = QtGui.QFont() font.setPointSize(11) self.resetDelaySpinBox.setFont(font) self.resetDelaySpinBox.setStyleSheet("QSpinBox::down-button{\n" " width:23\n" "}\n" "QSpinBox::up-button{\n" " width:23\n" "}\n" "") self.resetDelaySpinBox.setAlignment(QtCore.Qt.AlignCenter) self.resetDelaySpinBox.setMaximum(60) self.resetDelaySpinBox.setObjectName("resetDelaySpinBox") self.formLayout_3.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.resetDelaySpinBox) self.label_11 = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.label_11.setFont(font) self.label_11.setObjectName("label_11") self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_11) self.notificationsCheckBox = QtWidgets.QCheckBox( InternetSentinelDialog) self.notificationsCheckBox.setMinimumSize(QtCore.QSize(0, 23)) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(11) self.notificationsCheckBox.setFont(font) self.notificationsCheckBox.setText("") self.notificationsCheckBox.setChecked(True) self.notificationsCheckBox.setObjectName("notificationsCheckBox") self.formLayout_3.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.notificationsCheckBox) self.label_4 = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.label_4.setFont(font) self.label_4.setObjectName("label_4") self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_4) self.testFrequencySpinBox = QtWidgets.QSpinBox(InternetSentinelDialog) self.testFrequencySpinBox.setMinimumSize(QtCore.QSize(0, 40)) font = QtGui.QFont() font.setPointSize(11) self.testFrequencySpinBox.setFont(font) self.testFrequencySpinBox.setStyleSheet("QSpinBox::down-button{\n" " width:23\n" "}\n" "QSpinBox::up-button{\n" " width:23\n" "}\n" "") self.testFrequencySpinBox.setAlignment(QtCore.Qt.AlignCenter) self.testFrequencySpinBox.setObjectName("testFrequencySpinBox") self.formLayout_3.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.testFrequencySpinBox) self.label_6 = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) self.label_6.setFont(font) self.label_6.setAlignment(QtCore.Qt.AlignLeading | QtCore.Qt.AlignLeft | QtCore.Qt.AlignVCenter) self.label_6.setObjectName("label_6") self.formLayout_3.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_6) self.verticalLayout_7.addLayout(self.formLayout_3) self.horizontalLayout_3.addLayout(self.verticalLayout_7) self.verticalLayout_8 = QtWidgets.QVBoxLayout() self.verticalLayout_8.setContentsMargins(-1, -1, 5, -1) self.verticalLayout_8.setObjectName("verticalLayout_8") self.label_2 = QtWidgets.QLabel(InternetSentinelDialog) font = QtGui.QFont() font.setFamily("Arial") font.setPointSize(12) font.setBold(True) font.setWeight(75) self.label_2.setFont(font) self.label_2.setAlignment(QtCore.Qt.AlignCenter) self.label_2.setObjectName("label_2") self.verticalLayout_8.addWidget(self.label_2) self.statusPlainTextEdit = QtWidgets.QPlainTextEdit( InternetSentinelDialog) self.statusPlainTextEdit.setMaximumSize(QtCore.QSize(16777215, 150)) font = QtGui.QFont() font.setPointSize(10) self.statusPlainTextEdit.setFont(font) self.statusPlainTextEdit.setFrameShape(QtWidgets.QFrame.StyledPanel) self.statusPlainTextEdit.setFrameShadow(QtWidgets.QFrame.Plain) self.statusPlainTextEdit.setReadOnly(True) self.statusPlainTextEdit.setObjectName("statusPlainTextEdit") self.verticalLayout_8.addWidget(self.statusPlainTextEdit) self.horizontalLayout_3.addLayout(self.verticalLayout_8) self.verticalLayout.addLayout(self.horizontalLayout_3) self.retranslateUi(InternetSentinelDialog) QtCore.QMetaObject.connectSlotsByName(InternetSentinelDialog)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(655, 501) MainWindow.setAutoFillBackground(True) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.gridLayout_6 = QtWidgets.QGridLayout(self.centralwidget) self.gridLayout_6.setObjectName("gridLayout_6") self.gridLayout_5 = QtWidgets.QGridLayout() self.gridLayout_5.setObjectName("gridLayout_5") self.gridLayout = QtWidgets.QGridLayout() self.gridLayout.setObjectName("gridLayout") self.widget = AnalogGaugeWidget(self.centralwidget) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.widget.sizePolicy().hasHeightForWidth()) self.widget.setSizePolicy(sizePolicy) self.widget.setMinimumSize(QtCore.QSize(350, 350)) self.widget.setObjectName("widget") self.gridLayout.addWidget(self.widget, 0, 2, 1, 1) self.pushButton = QtWidgets.QPushButton(self.centralwidget) self.pushButton.setMinimumSize(QtCore.QSize(0, 75)) font = QtGui.QFont() font.setPointSize(35) font.setBold(True) font.setWeight(75) self.pushButton.setFont(font) self.pushButton.setObjectName("pushButton") self.gridLayout.addWidget(self.pushButton, 2, 2, 1, 1) spacerItem = QtWidgets.QSpacerItem(40, 1, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum) self.gridLayout.addItem(spacerItem, 1, 2, 1, 1) spacerItem1 = QtWidgets.QSpacerItem(1, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem1, 0, 0, 1, 1) self.gridLayout_5.addLayout(self.gridLayout, 0, 0, 1, 1) self.groupBox = QtWidgets.QGroupBox(self.centralwidget) self.groupBox.setTitle("") self.groupBox.setObjectName("groupBox") self.gridLayout_4 = QtWidgets.QGridLayout(self.groupBox) self.gridLayout_4.setObjectName("gridLayout_4") self.label = QtWidgets.QLabel(self.groupBox) self.label.setMinimumSize(QtCore.QSize(250, 50)) self.label.setMaximumSize(QtCore.QSize(250, 50)) self.label.setObjectName("label") self.gridLayout_4.addWidget(self.label, 0, 0, 1, 1) self.tabWidget = QtWidgets.QTabWidget(self.groupBox) self.tabWidget.setEnabled(True) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) sizePolicy.setHorizontalStretch(0) sizePolicy.setVerticalStretch(0) sizePolicy.setHeightForWidth( self.tabWidget.sizePolicy().hasHeightForWidth()) self.tabWidget.setSizePolicy(sizePolicy) self.tabWidget.setMaximumSize(QtCore.QSize(250, 16777215)) self.tabWidget.setObjectName("tabWidget") self.names = QtWidgets.QWidget() self.names.setObjectName("names") self.gridLayout_3 = QtWidgets.QGridLayout(self.names) self.gridLayout_3.setContentsMargins(0, 0, 0, 0) self.gridLayout_3.setObjectName("gridLayout_3") self.pushButton_openfile = QtWidgets.QPushButton(self.names) self.pushButton_openfile.setObjectName("pushButton_openfile") self.gridLayout_3.addWidget(self.pushButton_openfile, 1, 0, 1, 1) self.pushButton_clear = QtWidgets.QPushButton(self.names) self.pushButton_clear.setMaximumSize(QtCore.QSize(16000000, 16777215)) self.pushButton_clear.setObjectName("pushButton_clear") self.gridLayout_3.addWidget(self.pushButton_clear, 1, 1, 1, 1) self.name_list = QtWidgets.QListWidget(self.names) self.name_list.setObjectName("name_list") self.gridLayout_3.addWidget(self.name_list, 0, 0, 1, 2) self.tabWidget.addTab(self.names, "") self.clear = QtWidgets.QWidget() self.clear.setObjectName("clear") self.gridLayout_2 = QtWidgets.QGridLayout(self.clear) self.gridLayout_2.setContentsMargins(0, 0, 0, 0) self.gridLayout_2.setObjectName("gridLayout_2") self.tabWidget.addTab(self.clear, "") self.gridLayout_4.addWidget(self.tabWidget, 1, 0, 1, 1) self.gridLayout_5.addWidget(self.groupBox, 0, 1, 1, 1) self.gridLayout_6.addLayout(self.gridLayout_5, 0, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 655, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) self.tabWidget.setCurrentIndex(0) QtCore.QMetaObject.connectSlotsByName(MainWindow)
def setupUi(self, MainWindow): MainWindow.setObjectName("MainWindow") MainWindow.resize(1872, 1404) MainWindow.setStyleSheet("QMainWindow{\n" " background: solid white; }\n" "\n" "QGroupBox{\n" " background: solid white;\n" " border: 5px solid black;\n" " border-radius: 20px;\n" " margin-top: 50px\n" "}\n" "QGroupBox::title {\n" " subcontrol-origin: margin;\n" " subcontrol-position: top left;\n" " left: 25px;\n" " padding: -40 0 0 0\n" "}\n" "\n" "QPushButton { \n" " background: white;\n" " font: 80px;\n" " border : none}\n" "\n" "QRadioButton {\n" " border: 20;\n" " padding: 10px;\n" " background: white;\n" " selectionbackgroundcolor: dark grey;\n" " font: 50px;\n" "}\n" "\n" "QRadioButton::indicator{\n" "border : 5px solid black; \n" "width : 25px;\n" "height : 50px; \n" "border radius : 1px}\n" "\n" "QCheckBox::indicator {\n" " width: 60px;\n" " height: 60px;\n" " }") MainWindow.setToolButtonStyle(QtCore.Qt.ToolButtonIconOnly) MainWindow.setTabShape(QtWidgets.QTabWidget.Rounded) self.centralwidget = QtWidgets.QWidget(MainWindow) self.centralwidget.setObjectName("centralwidget") self.profileGroup = QtWidgets.QGroupBox(self.centralwidget) self.profileGroup.setGeometry(QtCore.QRect(10, 950, 521, 401)) font = QtGui.QFont() font.setFamily("Mistral") font.setPointSize(100) font.setStyleStrategy(QtGui.QFont.PreferDefault) self.profileGroup.setFont(font) self.profileGroup.setStyleSheet("QLabel{\n" "font: 80pt \'Mistral\'}") self.profileGroup.setFlat(False) self.profileGroup.setCheckable(False) self.profileGroup.setObjectName("profileGroup") self.gridLayoutWidget = QtWidgets.QWidget(self.profileGroup) self.gridLayoutWidget.setGeometry(QtCore.QRect(10, 120, 501, 274)) self.gridLayoutWidget.setObjectName("gridLayoutWidget") self.gridLayout = QtWidgets.QGridLayout(self.gridLayoutWidget) self.gridLayout.setContentsMargins(0, 0, 0, 0) self.gridLayout.setObjectName("gridLayout") self.ProfileRb2 = QtWidgets.QPushButton(self.gridLayoutWidget) self.ProfileRb2.setSizeIncrement(QtCore.QSize(10, 0)) font = QtGui.QFont() font.setPointSize(-1) font.setBold(False) font.setItalic(False) font.setWeight(50) self.ProfileRb2.setFont(font) self.ProfileRb2.setText("") icon = QtGui.QIcon() icon.addPixmap(QtGui.QPixmap(":/root/radio_off.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) icon.addPixmap(QtGui.QPixmap(":/root/radio_on.png"), QtGui.QIcon.Normal, QtGui.QIcon.On) self.ProfileRb2.setIcon(icon) self.ProfileRb2.setIconSize(QtCore.QSize(125, 125)) self.ProfileRb2.setCheckable(True) self.ProfileRb2.setAutoExclusive(True) self.ProfileRb2.setObjectName("ProfileRb2") self.gridLayout.addWidget(self.ProfileRb2, 1, 1, 1, 1) self.ProfileRb1 = QtWidgets.QPushButton(self.gridLayoutWidget) font = QtGui.QFont() font.setPointSize(-1) font.setBold(False) font.setItalic(False) font.setWeight(50) self.ProfileRb1.setFont(font) self.ProfileRb1.setText("") self.ProfileRb1.setIcon(icon) self.ProfileRb1.setIconSize(QtCore.QSize(125, 125)) self.ProfileRb1.setCheckable(True) self.ProfileRb1.setAutoExclusive(True) self.ProfileRb1.setObjectName("ProfileRb1") self.gridLayout.addWidget(self.ProfileRb1, 1, 0, 1, 1) self.ProfileRb1Label = QtWidgets.QLabel(self.gridLayoutWidget) self.ProfileRb1Label.setObjectName("ProfileRb1Label") self.gridLayout.addWidget(self.ProfileRb1Label, 0, 0, 1, 1, QtCore.Qt.AlignHCenter) self.ProfileRb3Label = QtWidgets.QLabel(self.gridLayoutWidget) self.ProfileRb3Label.setObjectName("ProfileRb3Label") self.gridLayout.addWidget( self.ProfileRb3Label, 0, 2, 1, 1, QtCore.Qt.AlignHCenter | QtCore.Qt.AlignBottom) self.ProfileRb3 = QtWidgets.QPushButton(self.gridLayoutWidget) font = QtGui.QFont() font.setPointSize(-1) font.setBold(False) font.setItalic(False) font.setWeight(50) self.ProfileRb3.setFont(font) self.ProfileRb3.setText("") self.ProfileRb3.setIcon(icon) self.ProfileRb3.setIconSize(QtCore.QSize(125, 125)) self.ProfileRb3.setCheckable(True) self.ProfileRb3.setAutoExclusive(True) self.ProfileRb3.setObjectName("ProfileRb3") self.gridLayout.addWidget(self.ProfileRb3, 1, 2, 1, 1) self.ProfileRb2Label = QtWidgets.QLabel(self.gridLayoutWidget) self.ProfileRb2Label.setObjectName("ProfileRb2Label") self.gridLayout.addWidget(self.ProfileRb2Label, 0, 1, 1, 1, QtCore.Qt.AlignHCenter) spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding) self.gridLayout.addItem(spacerItem, 2, 1, 1, 1) self.AssistBox = QtWidgets.QGroupBox(self.centralwidget) self.AssistBox.setGeometry(QtCore.QRect(10, 729, 521, 201)) font = QtGui.QFont() font.setFamily("Mistral") font.setPointSize(100) self.AssistBox.setFont(font) self.AssistBox.setStyleSheet("QLabel{\n" "font: 80pt \'Mistral\'}\n" "\n" "QSlider::groove:horizontal {\n" "border: 1px solid;\n" "height: 30px; \n" "margin: 0px;}\n" "QSlider::handle:horizontal {\n" "background-color: black;\n" "border: 5px solid;\n" "height: 50px;\n" "width: 70px; \n" "margin: 0px 0px;}") self.AssistBox.setObjectName("AssistBox") self.gridLayoutWidget_3 = QtWidgets.QWidget(self.AssistBox) self.gridLayoutWidget_3.setGeometry(QtCore.QRect(20, 109, 481, 81)) self.gridLayoutWidget_3.setObjectName("gridLayoutWidget_3") self.gridLayout_3 = QtWidgets.QGridLayout(self.gridLayoutWidget_3) self.gridLayout_3.setContentsMargins(0, 0, 0, 0) self.gridLayout_3.setHorizontalSpacing(3) self.gridLayout_3.setObjectName("gridLayout_3") self.AssistSlider = QtWidgets.QSlider(self.gridLayoutWidget_3) self.AssistSlider.setSizeIncrement(QtCore.QSize(0, 0)) self.AssistSlider.setBaseSize(QtCore.QSize(0, 0)) font = QtGui.QFont() font.setPointSize(80) self.AssistSlider.setFont(font) self.AssistSlider.setMaximum(9) self.AssistSlider.setPageStep(2) self.AssistSlider.setOrientation(QtCore.Qt.Horizontal) self.AssistSlider.setInvertedAppearance(False) self.AssistSlider.setTickPosition(QtWidgets.QSlider.TicksBothSides) self.AssistSlider.setTickInterval(1) self.AssistSlider.setObjectName("AssistSlider") self.gridLayout_3.addWidget(self.AssistSlider, 0, 1, 1, 1) self.SpeedGauge = AnalogGaugeWidget(self.centralwidget) self.SpeedGauge.setGeometry(QtCore.QRect(600, 10, 680, 680)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(1) sizePolicy.setHeightForWidth( self.SpeedGauge.sizePolicy().hasHeightForWidth()) self.SpeedGauge.setSizePolicy(sizePolicy) self.SpeedGauge.setMinimumSize(QtCore.QSize(100, 100)) self.SpeedGauge.setMaximumSize(QtCore.QSize(700, 1000)) self.SpeedGauge.setBaseSize(QtCore.QSize(300, 300)) self.SpeedGauge.setStyleSheet("") self.SpeedGauge.setObjectName("SpeedGauge") self.SpeedGaugeLabel = QtWidgets.QLabel(self.SpeedGauge) self.SpeedGaugeLabel.setGeometry(QtCore.QRect(190, 420, 301, 221)) font = QtGui.QFont() font.setPointSize(200) self.SpeedGaugeLabel.setFont(font) self.SpeedGaugeLabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.SpeedGaugeLabel.setObjectName("SpeedGaugeLabel") self.SpeedGaugeLabelUnits = QtWidgets.QLabel(self.SpeedGauge) self.SpeedGaugeLabelUnits.setGeometry(QtCore.QRect(490, 600, 150, 80)) font = QtGui.QFont() font.setPointSize(40) self.SpeedGaugeLabelUnits.setFont(font) self.SpeedGaugeLabelUnits.setObjectName("SpeedGaugeLabelUnits") self.PowerGauge = AnalogGaugeWidget(self.centralwidget) self.PowerGauge.setGeometry(QtCore.QRect(600, 670, 680, 680)) sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred) sizePolicy.setHorizontalStretch(1) sizePolicy.setVerticalStretch(1) sizePolicy.setHeightForWidth( self.PowerGauge.sizePolicy().hasHeightForWidth()) self.PowerGauge.setSizePolicy(sizePolicy) self.PowerGauge.setMinimumSize(QtCore.QSize(100, 100)) self.PowerGauge.setMaximumSize(QtCore.QSize(700, 800)) self.PowerGauge.setBaseSize(QtCore.QSize(300, 300)) self.PowerGauge.setStyleSheet("") self.PowerGauge.setObjectName("PowerGauge") self.PowerGaugeLabel = QtWidgets.QLabel(self.PowerGauge) self.PowerGaugeLabel.setGeometry(QtCore.QRect(90, 520, 441, 161)) font = QtGui.QFont() font.setPointSize(130) self.PowerGaugeLabel.setFont(font) self.PowerGaugeLabel.setAlignment(QtCore.Qt.AlignRight | QtCore.Qt.AlignTrailing | QtCore.Qt.AlignVCenter) self.PowerGaugeLabel.setObjectName("PowerGaugeLabel") self.label = QtWidgets.QLabel(self.PowerGauge) self.label.setGeometry(QtCore.QRect(530, 620, 150, 80)) font = QtGui.QFont() font.setPointSize(40) self.label.setFont(font) self.label.setObjectName("label") self.RangeBox = QtWidgets.QGroupBox(self.centralwidget) self.RangeBox.setGeometry(QtCore.QRect(1340, 1130, 520, 221)) font = QtGui.QFont() font.setFamily("Mistral") font.setPointSize(100) self.RangeBox.setFont(font) self.RangeBox.setStyleSheet( "QLabel{\n" "font: 80pt \'Mistral\'}\n" "QCheckBox::indicator {\n" " width: 60px;\n" " height: 60px;\n" " }\n" "QCheckbox::indicator:checked{image: url(:/root/radio_on.png);}\n" "QCheckbox::indicator:checked{image: url(:/root/radio_off.png);}\n" "\n" "QSlider::groove:horizontal {\n" "border: 1px solid;\n" "height: 30px; \n" "margin: 0px;}\n" "QSlider::handle:horizontal {\n" "background-color: black;\n" "border: 5px solid;\n" "height: 100px;\n" "width: 70px; \n" "margin: 0px 0px;}") self.RangeBox.setObjectName("RangeBox") self.gridLayoutWidget_4 = QtWidgets.QWidget(self.RangeBox) self.gridLayoutWidget_4.setGeometry(QtCore.QRect(10, 120, 501, 91)) self.gridLayoutWidget_4.setObjectName("gridLayoutWidget_4") self.gridLayout_4 = QtWidgets.QGridLayout(self.gridLayoutWidget_4) self.gridLayout_4.setContentsMargins(0, 0, 0, 0) self.gridLayout_4.setHorizontalSpacing(3) self.gridLayout_4.setObjectName("gridLayout_4") self.RangeSlider = QtWidgets.QSlider(self.gridLayoutWidget_4) self.RangeSlider.setSizeIncrement(QtCore.QSize(0, 0)) self.RangeSlider.setBaseSize(QtCore.QSize(0, 0)) font = QtGui.QFont() font.setPointSize(80) self.RangeSlider.setFont(font) self.RangeSlider.setMaximum(50) self.RangeSlider.setPageStep(2) self.RangeSlider.setOrientation(QtCore.Qt.Horizontal) self.RangeSlider.setInvertedAppearance(False) self.RangeSlider.setTickPosition(QtWidgets.QSlider.TicksBothSides) self.RangeSlider.setTickInterval(1) self.RangeSlider.setObjectName("RangeSlider") self.gridLayout_4.addWidget(self.RangeSlider, 0, 1, 1, 1) self.RangeCheck = QtWidgets.QCheckBox(self.gridLayoutWidget_4) self.RangeCheck.setEnabled(True) self.RangeCheck.setText("") self.RangeCheck.setIconSize(QtCore.QSize(16, 13)) self.RangeCheck.setObjectName("RangeCheck") self.gridLayout_4.addWidget(self.RangeCheck, 0, 0, 1, 1) self.RangeBox_2 = QtWidgets.QGroupBox(self.centralwidget) self.RangeBox_2.setGeometry(QtCore.QRect(1340, 10, 520, 1111)) font = QtGui.QFont() font.setFamily("Mistral") font.setPointSize(100) self.RangeBox_2.setFont(font) self.RangeBox_2.setStyleSheet("QLabel{\n" "font: 40pt \'Arial\'}\n" "QCheckBox::indicator {\n" " width: 60px;\n" " height: 60px;\n" " }\n" "\n" "QSlider::groove:horizontal {\n" "border: 1px solid;\n" "height: 30px; \n" "margin: 0px;}\n" "QSlider::handle:horizontal {\n" "background-color: black;\n" "border: 5px solid;\n" "height: 100px;\n" "width: 70px; \n" "margin: 0px 0px;}") self.RangeBox_2.setObjectName("RangeBox_2") self.gridLayoutWidget_5 = QtWidgets.QWidget(self.RangeBox_2) self.gridLayoutWidget_5.setGeometry(QtCore.QRect(9, 139, 1121, 961)) self.gridLayoutWidget_5.setObjectName("gridLayoutWidget_5") self.gridLayout_6 = QtWidgets.QGridLayout(self.gridLayoutWidget_5) self.gridLayout_6.setContentsMargins(0, 0, 0, 0) self.gridLayout_6.setObjectName("gridLayout_6") self.label_12 = QtWidgets.QLabel(self.gridLayoutWidget_5) self.label_12.setText("") self.label_12.setObjectName("label_12") self.gridLayout_6.addWidget(self.label_12, 10, 0, 1, 1) self.TripDistance = QtWidgets.QLabel(self.gridLayoutWidget_5) self.TripDistance.setObjectName("TripDistance") self.gridLayout_6.addWidget(self.TripDistance, 2, 0, 1, 1) self.EstRange = QtWidgets.QLabel(self.gridLayoutWidget_5) self.EstRange.setObjectName("EstRange") self.gridLayout_6.addWidget(self.EstRange, 8, 0, 1, 1) self.WhmiInstantaneous = QtWidgets.QLabel(self.gridLayoutWidget_5) self.WhmiInstantaneous.setObjectName("WhmiInstantaneous") self.gridLayout_6.addWidget(self.WhmiInstantaneous, 0, 0, 1, 1) self.TripRegen = QtWidgets.QLabel(self.gridLayoutWidget_5) self.TripRegen.setObjectName("TripRegen") self.gridLayout_6.addWidget(self.TripRegen, 9, 0, 1, 1) self.WhmiTrip = QtWidgets.QLabel(self.gridLayoutWidget_5) self.WhmiTrip.setObjectName("WhmiTrip") self.gridLayout_6.addWidget(self.WhmiTrip, 1, 0, 1, 1) self.pushButton = QtWidgets.QPushButton(self.RangeBox_2) self.pushButton.setGeometry(QtCore.QRect(260, 60, 241, 71)) self.pushButton.setObjectName("pushButton") self.StatusGroupBox = QtWidgets.QGroupBox(self.centralwidget) self.StatusGroupBox.setGeometry(QtCore.QRect(10, 10, 521, 711)) font = QtGui.QFont() font.setFamily("Mistral") font.setPointSize(100) font.setStyleStrategy(QtGui.QFont.PreferDefault) self.StatusGroupBox.setFont(font) self.StatusGroupBox.setStyleSheet("QLabel{\n" "font: 80pt \'Mistral\'}") self.StatusGroupBox.setTitle("") self.StatusGroupBox.setFlat(False) self.StatusGroupBox.setCheckable(False) self.StatusGroupBox.setObjectName("StatusGroupBox") self.gridLayoutWidget_2 = QtWidgets.QWidget(self.StatusGroupBox) self.gridLayoutWidget_2.setGeometry(QtCore.QRect(10, 60, 501, 641)) self.gridLayoutWidget_2.setObjectName("gridLayoutWidget_2") self.gridLayout_2 = QtWidgets.QGridLayout(self.gridLayoutWidget_2) self.gridLayout_2.setContentsMargins(0, 0, 0, 0) self.gridLayout_2.setSpacing(0) self.gridLayout_2.setObjectName("gridLayout_2") self.VoltageDrop = QtWidgets.QLabel(self.gridLayoutWidget_2) self.VoltageDrop.setObjectName("VoltageDrop") self.gridLayout_2.addWidget(self.VoltageDrop, 2, 0, 1, 1) self.BatterySOC = QtWidgets.QLabel(self.gridLayoutWidget_2) self.BatterySOC.setObjectName("BatterySOC") self.gridLayout_2.addWidget(self.BatterySOC, 1, 0, 1, 1) self.Time = QtWidgets.QLabel(self.gridLayoutWidget_2) font = QtGui.QFont() font.setFamily("Mistral") font.setPointSize(80) font.setBold(False) font.setItalic(False) font.setWeight(50) self.Time.setFont(font) self.Time.setObjectName("Time") self.gridLayout_2.addWidget(self.Time, 0, 0, 1, 1) self.FaultCodes = QtWidgets.QLabel(self.gridLayoutWidget_2) font = QtGui.QFont() font.setFamily("Mistral") font.setPointSize(80) font.setBold(False) font.setItalic(False) font.setWeight(50) self.FaultCodes.setFont(font) self.FaultCodes.setFrameShadow(QtWidgets.QFrame.Raised) self.FaultCodes.setTextFormat(QtCore.Qt.PlainText) self.FaultCodes.setObjectName("FaultCodes") self.gridLayout_2.addWidget(self.FaultCodes, 3, 0, 1, 1) MainWindow.setCentralWidget(self.centralwidget) self.menubar = QtWidgets.QMenuBar(MainWindow) self.menubar.setGeometry(QtCore.QRect(0, 0, 1872, 21)) self.menubar.setObjectName("menubar") MainWindow.setMenuBar(self.menubar) self.statusbar = QtWidgets.QStatusBar(MainWindow) self.statusbar.setObjectName("statusbar") MainWindow.setStatusBar(self.statusbar) self.retranslateUi(MainWindow) QtCore.QMetaObject.connectSlotsByName(MainWindow)