mirror of
https://github.com/pythonguis/pythonguis-examples.git
synced 2025-01-20 16:52:54 +08:00
284 lines
16 KiB
Python
284 lines
16 KiB
Python
# -*- coding: utf-8 -*-
|
|
|
|
# Form implementation generated from reading ui file 'mainwindow.ui'
|
|
#
|
|
# Created by: PyQt5 UI code generator 5.10
|
|
#
|
|
# WARNING! All changes made in this file will be lost!
|
|
|
|
from PyQt5 import QtCore, QtGui, QtWidgets
|
|
|
|
class Ui_MainWindow(object):
|
|
def setupUi(self, MainWindow):
|
|
MainWindow.setObjectName("MainWindow")
|
|
MainWindow.resize(330, 417)
|
|
self.centralwidget = QtWidgets.QWidget(MainWindow)
|
|
self.centralwidget.setObjectName("centralwidget")
|
|
self.horizontalLayout = QtWidgets.QHBoxLayout(self.centralwidget)
|
|
self.horizontalLayout.setObjectName("horizontalLayout")
|
|
self.verticalLayout = QtWidgets.QVBoxLayout()
|
|
self.verticalLayout.setObjectName("verticalLayout")
|
|
self.horizontalLayout_3 = QtWidgets.QHBoxLayout()
|
|
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
|
|
self.lineEdit = QtWidgets.QLineEdit(self.centralwidget)
|
|
self.lineEdit.setObjectName("lineEdit")
|
|
self.horizontalLayout_3.addWidget(self.lineEdit)
|
|
self.pushButton = QtWidgets.QPushButton(self.centralwidget)
|
|
self.pushButton.setText("")
|
|
icon = QtGui.QIcon()
|
|
icon.addPixmap(QtGui.QPixmap("images/arrow-circle-225.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
|
|
self.pushButton.setIcon(icon)
|
|
self.pushButton.setObjectName("pushButton")
|
|
self.horizontalLayout_3.addWidget(self.pushButton)
|
|
self.verticalLayout.addLayout(self.horizontalLayout_3)
|
|
self.horizontalLayout_4 = QtWidgets.QHBoxLayout()
|
|
self.horizontalLayout_4.setObjectName("horizontalLayout_4")
|
|
self.weatherIcon = QtWidgets.QLabel(self.centralwidget)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Maximum, QtWidgets.QSizePolicy.Preferred)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.weatherIcon.sizePolicy().hasHeightForWidth())
|
|
self.weatherIcon.setSizePolicy(sizePolicy)
|
|
self.weatherIcon.setMinimumSize(QtCore.QSize(16, 16))
|
|
self.weatherIcon.setMaximumSize(QtCore.QSize(16, 16))
|
|
self.weatherIcon.setText("")
|
|
self.weatherIcon.setObjectName("weatherIcon")
|
|
self.horizontalLayout_4.addWidget(self.weatherIcon)
|
|
self.weatherLabel = QtWidgets.QLabel(self.centralwidget)
|
|
self.weatherLabel.setText("")
|
|
self.weatherLabel.setObjectName("weatherLabel")
|
|
self.horizontalLayout_4.addWidget(self.weatherLabel)
|
|
self.verticalLayout.addLayout(self.horizontalLayout_4)
|
|
self.gridLayout_2 = QtWidgets.QGridLayout()
|
|
self.gridLayout_2.setObjectName("gridLayout_2")
|
|
self.forecastIcon4 = QtWidgets.QLabel(self.centralwidget)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.forecastIcon4.sizePolicy().hasHeightForWidth())
|
|
self.forecastIcon4.setSizePolicy(sizePolicy)
|
|
self.forecastIcon4.setMinimumSize(QtCore.QSize(16, 16))
|
|
self.forecastIcon4.setMaximumSize(QtCore.QSize(200, 16))
|
|
self.forecastIcon4.setBaseSize(QtCore.QSize(0, 0))
|
|
self.forecastIcon4.setText("")
|
|
self.forecastIcon4.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastIcon4.setObjectName("forecastIcon4")
|
|
self.gridLayout_2.addWidget(self.forecastIcon4, 1, 3, 1, 1)
|
|
self.forecastTemp2 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTemp2.setText("")
|
|
self.forecastTemp2.setObjectName("forecastTemp2")
|
|
self.gridLayout_2.addWidget(self.forecastTemp2, 2, 1, 1, 1)
|
|
self.forecastTemp5 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTemp5.setText("")
|
|
self.forecastTemp5.setObjectName("forecastTemp5")
|
|
self.gridLayout_2.addWidget(self.forecastTemp5, 2, 4, 1, 1)
|
|
self.forecastTemp4 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTemp4.setText("")
|
|
self.forecastTemp4.setObjectName("forecastTemp4")
|
|
self.gridLayout_2.addWidget(self.forecastTemp4, 2, 3, 1, 1)
|
|
self.forecastIcon2 = QtWidgets.QLabel(self.centralwidget)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.forecastIcon2.sizePolicy().hasHeightForWidth())
|
|
self.forecastIcon2.setSizePolicy(sizePolicy)
|
|
self.forecastIcon2.setMinimumSize(QtCore.QSize(16, 16))
|
|
self.forecastIcon2.setMaximumSize(QtCore.QSize(200, 16))
|
|
self.forecastIcon2.setBaseSize(QtCore.QSize(0, 0))
|
|
self.forecastIcon2.setText("")
|
|
self.forecastIcon2.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastIcon2.setObjectName("forecastIcon2")
|
|
self.gridLayout_2.addWidget(self.forecastIcon2, 1, 1, 1, 1)
|
|
self.forecastIcon5 = QtWidgets.QLabel(self.centralwidget)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.forecastIcon5.sizePolicy().hasHeightForWidth())
|
|
self.forecastIcon5.setSizePolicy(sizePolicy)
|
|
self.forecastIcon5.setMinimumSize(QtCore.QSize(16, 16))
|
|
self.forecastIcon5.setMaximumSize(QtCore.QSize(200, 16))
|
|
self.forecastIcon5.setBaseSize(QtCore.QSize(0, 0))
|
|
self.forecastIcon5.setText("")
|
|
self.forecastIcon5.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastIcon5.setObjectName("forecastIcon5")
|
|
self.gridLayout_2.addWidget(self.forecastIcon5, 1, 4, 1, 1)
|
|
self.forecastIcon1 = QtWidgets.QLabel(self.centralwidget)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.forecastIcon1.sizePolicy().hasHeightForWidth())
|
|
self.forecastIcon1.setSizePolicy(sizePolicy)
|
|
self.forecastIcon1.setMinimumSize(QtCore.QSize(16, 16))
|
|
self.forecastIcon1.setMaximumSize(QtCore.QSize(200, 16))
|
|
self.forecastIcon1.setBaseSize(QtCore.QSize(0, 0))
|
|
self.forecastIcon1.setText("")
|
|
self.forecastIcon1.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastIcon1.setObjectName("forecastIcon1")
|
|
self.gridLayout_2.addWidget(self.forecastIcon1, 1, 0, 1, 1)
|
|
self.forecastIcon3 = QtWidgets.QLabel(self.centralwidget)
|
|
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
|
|
sizePolicy.setHorizontalStretch(0)
|
|
sizePolicy.setVerticalStretch(0)
|
|
sizePolicy.setHeightForWidth(self.forecastIcon3.sizePolicy().hasHeightForWidth())
|
|
self.forecastIcon3.setSizePolicy(sizePolicy)
|
|
self.forecastIcon3.setMinimumSize(QtCore.QSize(16, 16))
|
|
self.forecastIcon3.setMaximumSize(QtCore.QSize(200, 16))
|
|
self.forecastIcon3.setBaseSize(QtCore.QSize(0, 0))
|
|
self.forecastIcon3.setText("")
|
|
self.forecastIcon3.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastIcon3.setObjectName("forecastIcon3")
|
|
self.gridLayout_2.addWidget(self.forecastIcon3, 1, 2, 1, 1)
|
|
self.forecastTemp3 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTemp3.setText("")
|
|
self.forecastTemp3.setObjectName("forecastTemp3")
|
|
self.gridLayout_2.addWidget(self.forecastTemp3, 2, 2, 1, 1)
|
|
self.forecastTemp1 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTemp1.setText("")
|
|
self.forecastTemp1.setObjectName("forecastTemp1")
|
|
self.gridLayout_2.addWidget(self.forecastTemp1, 2, 0, 1, 1)
|
|
self.forecastTime1 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTime1.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastTime1.setObjectName("forecastTime1")
|
|
self.gridLayout_2.addWidget(self.forecastTime1, 0, 0, 1, 1)
|
|
self.forecastTime2 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTime2.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastTime2.setObjectName("forecastTime2")
|
|
self.gridLayout_2.addWidget(self.forecastTime2, 0, 1, 1, 1)
|
|
self.forecastTime3 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTime3.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastTime3.setObjectName("forecastTime3")
|
|
self.gridLayout_2.addWidget(self.forecastTime3, 0, 2, 1, 1)
|
|
self.forecastTime4 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTime4.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastTime4.setObjectName("forecastTime4")
|
|
self.gridLayout_2.addWidget(self.forecastTime4, 0, 3, 1, 1)
|
|
self.forecastTime5 = QtWidgets.QLabel(self.centralwidget)
|
|
self.forecastTime5.setAlignment(QtCore.Qt.AlignCenter)
|
|
self.forecastTime5.setObjectName("forecastTime5")
|
|
self.gridLayout_2.addWidget(self.forecastTime5, 0, 4, 1, 1)
|
|
self.verticalLayout.addLayout(self.gridLayout_2)
|
|
self.gridLayout = QtWidgets.QGridLayout()
|
|
self.gridLayout.setObjectName("gridLayout")
|
|
self.formLayout = QtWidgets.QFormLayout()
|
|
self.formLayout.setObjectName("formLayout")
|
|
self.label_5 = QtWidgets.QLabel(self.centralwidget)
|
|
font = QtGui.QFont()
|
|
font.setBold(True)
|
|
font.setWeight(75)
|
|
self.label_5.setFont(font)
|
|
self.label_5.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label_5.setObjectName("label_5")
|
|
self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.label_5)
|
|
self.label_6 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_6.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label_6.setObjectName("label_6")
|
|
self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.label_6)
|
|
self.temperatureLabel = QtWidgets.QLabel(self.centralwidget)
|
|
self.temperatureLabel.setText("")
|
|
self.temperatureLabel.setObjectName("temperatureLabel")
|
|
self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.temperatureLabel)
|
|
self.label_7 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_7.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label_7.setObjectName("label_7")
|
|
self.formLayout.setWidget(4, QtWidgets.QFormLayout.LabelRole, self.label_7)
|
|
self.humidityLabel = QtWidgets.QLabel(self.centralwidget)
|
|
self.humidityLabel.setText("")
|
|
self.humidityLabel.setObjectName("humidityLabel")
|
|
self.formLayout.setWidget(4, QtWidgets.QFormLayout.FieldRole, self.humidityLabel)
|
|
self.label_8 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_8.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label_8.setObjectName("label_8")
|
|
self.formLayout.setWidget(5, QtWidgets.QFormLayout.LabelRole, self.label_8)
|
|
self.pressureLabel = QtWidgets.QLabel(self.centralwidget)
|
|
self.pressureLabel.setText("")
|
|
self.pressureLabel.setObjectName("pressureLabel")
|
|
self.formLayout.setWidget(5, QtWidgets.QFormLayout.FieldRole, self.pressureLabel)
|
|
self.label = QtWidgets.QLabel(self.centralwidget)
|
|
font = QtGui.QFont()
|
|
font.setBold(True)
|
|
font.setWeight(75)
|
|
self.label.setFont(font)
|
|
self.label.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label.setObjectName("label")
|
|
self.formLayout.setWidget(6, QtWidgets.QFormLayout.LabelRole, self.label)
|
|
self.label_2 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_2.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label_2.setObjectName("label_2")
|
|
self.formLayout.setWidget(7, QtWidgets.QFormLayout.LabelRole, self.label_2)
|
|
self.longitudeLabel = QtWidgets.QLabel(self.centralwidget)
|
|
self.longitudeLabel.setText("")
|
|
self.longitudeLabel.setObjectName("longitudeLabel")
|
|
self.formLayout.setWidget(7, QtWidgets.QFormLayout.FieldRole, self.longitudeLabel)
|
|
self.label_3 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_3.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label_3.setObjectName("label_3")
|
|
self.formLayout.setWidget(8, QtWidgets.QFormLayout.LabelRole, self.label_3)
|
|
self.latitudeLabel = QtWidgets.QLabel(self.centralwidget)
|
|
self.latitudeLabel.setText("")
|
|
self.latitudeLabel.setObjectName("latitudeLabel")
|
|
self.formLayout.setWidget(8, QtWidgets.QFormLayout.FieldRole, self.latitudeLabel)
|
|
self.label_4 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_4.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label_4.setObjectName("label_4")
|
|
self.formLayout.setWidget(9, QtWidgets.QFormLayout.LabelRole, self.label_4)
|
|
self.sunriseLabel = QtWidgets.QLabel(self.centralwidget)
|
|
self.sunriseLabel.setText("")
|
|
self.sunriseLabel.setObjectName("sunriseLabel")
|
|
self.formLayout.setWidget(9, QtWidgets.QFormLayout.FieldRole, self.sunriseLabel)
|
|
self.label_9 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_9.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label_9.setObjectName("label_9")
|
|
self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label_9)
|
|
self.label_10 = QtWidgets.QLabel(self.centralwidget)
|
|
font = QtGui.QFont()
|
|
font.setBold(True)
|
|
font.setWeight(75)
|
|
self.label_10.setFont(font)
|
|
self.label_10.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
|
|
self.label_10.setObjectName("label_10")
|
|
self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_10)
|
|
self.windLabel = QtWidgets.QLabel(self.centralwidget)
|
|
self.windLabel.setText("")
|
|
self.windLabel.setObjectName("windLabel")
|
|
self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.windLabel)
|
|
self.label_11 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_11.setText("")
|
|
self.label_11.setObjectName("label_11")
|
|
self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.label_11)
|
|
self.label_13 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_13.setText("")
|
|
self.label_13.setObjectName("label_13")
|
|
self.formLayout.setWidget(6, QtWidgets.QFormLayout.FieldRole, self.label_13)
|
|
self.label_12 = QtWidgets.QLabel(self.centralwidget)
|
|
self.label_12.setText("")
|
|
self.label_12.setObjectName("label_12")
|
|
self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.label_12)
|
|
self.gridLayout.addLayout(self.formLayout, 1, 0, 1, 1)
|
|
self.verticalLayout.addLayout(self.gridLayout)
|
|
self.horizontalLayout.addLayout(self.verticalLayout)
|
|
MainWindow.setCentralWidget(self.centralwidget)
|
|
|
|
self.retranslateUi(MainWindow)
|
|
QtCore.QMetaObject.connectSlotsByName(MainWindow)
|
|
|
|
def retranslateUi(self, MainWindow):
|
|
_translate = QtCore.QCoreApplication.translate
|
|
MainWindow.setWindowTitle(_translate("MainWindow", "Raindar"))
|
|
self.lineEdit.setText(_translate("MainWindow", "Utrecht,the Netherlands"))
|
|
self.forecastTime1.setText(_translate("MainWindow", "+3h"))
|
|
self.forecastTime2.setText(_translate("MainWindow", "+6h"))
|
|
self.forecastTime3.setText(_translate("MainWindow", "+9h"))
|
|
self.forecastTime4.setText(_translate("MainWindow", "+12h"))
|
|
self.forecastTime5.setText(_translate("MainWindow", "+15h"))
|
|
self.label_5.setText(_translate("MainWindow", "Barometer"))
|
|
self.label_6.setText(_translate("MainWindow", "Temperature"))
|
|
self.label_7.setText(_translate("MainWindow", "Humidity"))
|
|
self.label_8.setText(_translate("MainWindow", "Pressure"))
|
|
self.label.setText(_translate("MainWindow", "Location"))
|
|
self.label_2.setText(_translate("MainWindow", "Longitude"))
|
|
self.label_3.setText(_translate("MainWindow", "Latitude"))
|
|
self.label_4.setText(_translate("MainWindow", "Sunrise"))
|
|
self.label_9.setText(_translate("MainWindow", "Speed"))
|
|
self.label_10.setText(_translate("MainWindow", "Wind"))
|
|
|