mirror of
https://github.com/PotentiaRobotics/base-station.git
synced 2025-04-03 20:00:19 -04:00
Combined pages to work on one interface
Run the application by using mainInterface.py that is NOT in the mainPage folder
This commit is contained in:
parent
e187c9e37e
commit
0436bce9ca
|
@ -1,54 +1,55 @@
|
|||
from PyQt5 import QtWidgets, QtGui, QtCore
|
||||
from PyQt5.QtGui import QKeySequence
|
||||
from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox, QShortcut, QBoxLayout
|
||||
from PyQt5.QtGui import QKeySequence, QPixmap
|
||||
from PyQt5.QtWidgets import QWidget, QApplication, QMainWindow, QMessageBox, QShortcut, QBoxLayout
|
||||
from PyQt5.QtCore import QTime, Qt
|
||||
import sys
|
||||
|
||||
class Window(QMainWindow):
|
||||
class ControllerWindow(QWidget):
|
||||
|
||||
def __init__(self):
|
||||
super(Window, self).__init__()
|
||||
self.starting_state()
|
||||
|
||||
def starting_state(self):
|
||||
self.setGeometry(0, 0, 1005, 575)
|
||||
super(ControllerWindow, self).__init__()
|
||||
self.setGeometry(0, 0, 812, 627)
|
||||
self.setWindowTitle("Controller")
|
||||
self.setStyleSheet("background-color: #3D5A80;")
|
||||
self.extra = None
|
||||
self.starting_state()
|
||||
|
||||
self.main_interface = QtWidgets.QPushButton(self)
|
||||
self.main_interface.move(10, 5)
|
||||
self.main_interface.resize(30, 40)
|
||||
self.main_interface.setText("Main Interface")
|
||||
self.main_interface.setStyleSheet('QPushButton {background-color: #98C1D5; border-style: outset; border-width: 3px; border-color: black; font: bold 20px; min-width: 10em;}')
|
||||
self.main_interface.clicked.connect(self.main_interface_clicked)
|
||||
def starting_state(self):
|
||||
|
||||
self.sensors = QtWidgets.QPushButton(self)
|
||||
self.sensors.move(260, 5)
|
||||
self.sensors.resize(30, 40)
|
||||
self.sensors.setText("Sensors")
|
||||
self.sensors.setStyleSheet('QPushButton {background-color: #98C1D5; border-style: outset; border-width: 3px; border-color: black; font: bold 20px; min-width: 10em;}')
|
||||
self.sensors.clicked.connect(self.sensors_clicked)
|
||||
# self.main_interface = QtWidgets.QPushButton(self)
|
||||
# self.main_interface.move(10, 5)
|
||||
# self.main_interface.resize(30, 40)
|
||||
# self.main_interface.setText("Main Interface")
|
||||
# self.main_interface.setStyleSheet('QPushButton {background-color: #98C1D5; border-style: outset; border-width: 3px; border-color: black; font: bold 20px; min-width: 10em;}')
|
||||
# self.main_interface.clicked.connect(self.main_interface_clicked)
|
||||
|
||||
# self.sensors = QtWidgets.QPushButton(self)
|
||||
# self.sensors.move(260, 5)
|
||||
# self.sensors.resize(30, 40)
|
||||
# self.sensors.setText("Sensors")
|
||||
# self.sensors.setStyleSheet('QPushButton {background-color: #98C1D5; border-style: outset; border-width: 3px; border-color: black; font: bold 20px; min-width: 10em;}')
|
||||
# self.sensors.clicked.connect(self.sensors_clicked)
|
||||
|
||||
self.robot_view = QtWidgets.QPushButton(self)
|
||||
self.robot_view.move(510, 5)
|
||||
self.robot_view.resize(30, 40)
|
||||
self.robot_view.setText("Robot View")
|
||||
self.robot_view.setStyleSheet('QPushButton {background-color: #98C1D5; border-style: outset; border-width: 3px; border-color: black; font: bold 20px; min-width: 10em;}')
|
||||
self.robot_view.clicked.connect(self.robot_view_clicked)
|
||||
# self.robot_view = QtWidgets.QPushButton(self)
|
||||
# self.robot_view.move(510, 5)
|
||||
# self.robot_view.resize(30, 40)
|
||||
# self.robot_view.setText("Robot View")
|
||||
# self.robot_view.setStyleSheet('QPushButton {background-color: #98C1D5; border-style: outset; border-width: 3px; border-color: black; font: bold 20px; min-width: 10em;}')
|
||||
# self.robot_view.clicked.connect(self.robot_view_clicked)
|
||||
|
||||
self.controller = QtWidgets.QPushButton(self)
|
||||
self.controller.move(760, 5)
|
||||
self.controller.resize(30, 40)
|
||||
self.controller.setText("Controller")
|
||||
self.controller.setStyleSheet('QPushButton {background-color: #3D5A80; border-style: outset; border-width: 3px; border-color: black; font: bold 20px; color: #E0FBFC; min-width: 10em;}')
|
||||
self.controller.clicked.connect(self.controller_clicked)
|
||||
# self.controller = QtWidgets.QPushButton(self)
|
||||
# self.controller.move(760, 5)
|
||||
# self.controller.resize(30, 40)
|
||||
# self.controller.setText("Controller")
|
||||
# self.controller.setStyleSheet('QPushButton {background-color: #3D5A80; border-style: outset; border-width: 3px; border-color: black; font: bold 20px; color: #E0FBFC; min-width: 10em;}')
|
||||
# self.controller.clicked.connect(self.controller_clicked)
|
||||
|
||||
self.label = QtWidgets.QLabel(self)
|
||||
self.picture = QtGui.QPixmap('Controller.png')
|
||||
self.picture = QPixmap('Controller.png')
|
||||
self.label.setScaledContents(True)
|
||||
self.label.setPixmap(self.picture)
|
||||
self.label.resize(970, 500)
|
||||
self.label.move(20, 50)
|
||||
self.label.resize(700, 500)
|
||||
self.label.move(50, 37)
|
||||
|
||||
self.key1 = QShortcut(QKeySequence('M'), self)
|
||||
self.key1.activated.connect(self.keyboard)
|
||||
|
@ -106,10 +107,8 @@ class Window(QMainWindow):
|
|||
popup.setText("A button (either M, N, L, A, F, T, D, R, J, W) has been clicked at " + time.toString(Qt.DefaultLocaleLongDate))
|
||||
popup.exec_()
|
||||
|
||||
def win():
|
||||
app = QApplication(sys.argv)
|
||||
window = Window()
|
||||
window.show()
|
||||
sys.exit(app.exec_())
|
||||
|
||||
win()
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
win = ControllerWindow()
|
||||
win.show()
|
||||
sys.exit(app.exec_())
|
530
mainInterface.py
Normal file
530
mainInterface.py
Normal file
|
@ -0,0 +1,530 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
|
||||
# Form implementation generated from reading ui file 'mainInterface.ui'
|
||||
#
|
||||
# Created by: PyQt5 UI code generator 5.15.4
|
||||
#
|
||||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from robotviewPage.robotView import RobotViewWindow
|
||||
from controllerPage.Controller import ControllerWindow
|
||||
|
||||
class Ui_BaseStation(object):
|
||||
def setupUi(self, BaseStation):
|
||||
BaseStation.setObjectName("BaseStation")
|
||||
BaseStation.resize(812, 627)
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
|
||||
BaseStation.setPalette(palette)
|
||||
BaseStation.setAutoFillBackground(True)
|
||||
self.centralwidget = QtWidgets.QWidget(BaseStation)
|
||||
self.centralwidget.setObjectName("centralwidget")
|
||||
self.tabWidget = QtWidgets.QTabWidget(self.centralwidget)
|
||||
self.tabWidget.setGeometry(QtCore.QRect(0, 0, 811, 611))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Button, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Text, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ToolTipText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.PlaceholderText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Button, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Text, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ToolTipText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.PlaceholderText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Button, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Text, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ToolTipText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(0, 0, 0, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.PlaceholderText, brush)
|
||||
self.tabWidget.setPalette(palette)
|
||||
self.tabWidget.setAutoFillBackground(True)
|
||||
self.tabWidget.setMovable(False)
|
||||
self.tabWidget.setObjectName("tabWidget")
|
||||
self.MainInterface = QtWidgets.QWidget()
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
|
||||
self.MainInterface.setPalette(palette)
|
||||
self.MainInterface.setAutoFillBackground(True)
|
||||
self.MainInterface.setObjectName("MainInterface")
|
||||
self.groupBox = QtWidgets.QGroupBox(self.MainInterface)
|
||||
self.groupBox.setGeometry(QtCore.QRect(250, 20, 201, 531))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
|
||||
self.groupBox.setPalette(palette)
|
||||
self.groupBox.setAutoFillBackground(True)
|
||||
self.groupBox.setObjectName("groupBox")
|
||||
self.label = QtWidgets.QLabel(self.groupBox)
|
||||
self.label.setGeometry(QtCore.QRect(50, 40, 101, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(20)
|
||||
self.label.setFont(font)
|
||||
self.label.setCursor(QtGui.QCursor(QtCore.Qt.ArrowCursor))
|
||||
self.label.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.label.setScaledContents(True)
|
||||
self.label.setObjectName("label")
|
||||
self.label_2 = QtWidgets.QLabel(self.groupBox)
|
||||
self.label_2.setGeometry(QtCore.QRect(50, 70, 101, 41))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(20)
|
||||
self.label_2.setFont(font)
|
||||
self.label_2.setFrameShadow(QtWidgets.QFrame.Sunken)
|
||||
self.label_2.setLineWidth(2)
|
||||
self.label_2.setScaledContents(True)
|
||||
self.label_2.setObjectName("label_2")
|
||||
self.label_3 = QtWidgets.QLabel(self.groupBox)
|
||||
self.label_3.setGeometry(QtCore.QRect(30, 110, 151, 31))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(238, 108, 77))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(238, 108, 77))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
|
||||
self.label_3.setPalette(palette)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(16)
|
||||
self.label_3.setFont(font)
|
||||
self.label_3.setObjectName("label_3")
|
||||
self.line = QtWidgets.QFrame(self.groupBox)
|
||||
self.line.setGeometry(QtCore.QRect(0, 140, 201, 41))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
|
||||
self.line.setPalette(palette)
|
||||
self.line.setAutoFillBackground(True)
|
||||
self.line.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.line.setLineWidth(5)
|
||||
self.line.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
self.line.setObjectName("line")
|
||||
self.line_2 = QtWidgets.QFrame(self.groupBox)
|
||||
self.line_2.setGeometry(QtCore.QRect(0, 190, 201, 41))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
|
||||
self.line_2.setPalette(palette)
|
||||
self.line_2.setAutoFillBackground(True)
|
||||
self.line_2.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.line_2.setLineWidth(5)
|
||||
self.line_2.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
self.line_2.setObjectName("line_2")
|
||||
self.label_4 = QtWidgets.QLabel(self.groupBox)
|
||||
self.label_4.setGeometry(QtCore.QRect(60, 170, 71, 31))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(238, 108, 77))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(238, 108, 77))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
|
||||
self.label_4.setPalette(palette)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(22)
|
||||
self.label_4.setFont(font)
|
||||
self.label_4.setObjectName("label_4")
|
||||
self.label_5 = QtWidgets.QLabel(self.groupBox)
|
||||
self.label_5.setGeometry(QtCore.QRect(10, 240, 171, 101))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(14)
|
||||
self.label_5.setFont(font)
|
||||
self.label_5.setObjectName("label_5")
|
||||
self.label_7 = QtWidgets.QLabel(self.groupBox)
|
||||
self.label_7.setGeometry(QtCore.QRect(10, 390, 181, 111))
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(14)
|
||||
self.label_7.setFont(font)
|
||||
self.label_7.setObjectName("label_7")
|
||||
self.line_3 = QtWidgets.QFrame(self.groupBox)
|
||||
self.line_3.setGeometry(QtCore.QRect(0, 350, 201, 41))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
|
||||
self.line_3.setPalette(palette)
|
||||
self.line_3.setAutoFillBackground(True)
|
||||
self.line_3.setFrameShadow(QtWidgets.QFrame.Plain)
|
||||
self.line_3.setLineWidth(5)
|
||||
self.line_3.setFrameShape(QtWidgets.QFrame.HLine)
|
||||
self.line_3.setObjectName("line_3")
|
||||
self.scrollArea = QtWidgets.QScrollArea(self.MainInterface)
|
||||
self.scrollArea.setGeometry(QtCore.QRect(0, 60, 231, 491))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
|
||||
self.scrollArea.setPalette(palette)
|
||||
self.scrollArea.setVerticalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOn)
|
||||
self.scrollArea.setHorizontalScrollBarPolicy(QtCore.Qt.ScrollBarAlwaysOff)
|
||||
self.scrollArea.setWidgetResizable(True)
|
||||
self.scrollArea.setObjectName("scrollArea")
|
||||
self.scrollAreaWidgetContents = QtWidgets.QWidget()
|
||||
self.scrollAreaWidgetContents.setGeometry(QtCore.QRect(0, 0, 212, 489))
|
||||
self.scrollAreaWidgetContents.setObjectName("scrollAreaWidgetContents")
|
||||
self.verticalLayoutWidget = QtWidgets.QWidget(self.scrollAreaWidgetContents)
|
||||
self.verticalLayoutWidget.setGeometry(QtCore.QRect(9, 9, 191, 471))
|
||||
self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
|
||||
self.verticalLayout = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
|
||||
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
|
||||
self.verticalLayout.setObjectName("verticalLayout")
|
||||
self.pushButton_2 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
|
||||
self.pushButton_2.setPalette(palette)
|
||||
self.pushButton_2.setObjectName("pushButton_2")
|
||||
self.verticalLayout.addWidget(self.pushButton_2)
|
||||
self.pushButton = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
|
||||
self.pushButton.setPalette(palette)
|
||||
self.pushButton.setObjectName("pushButton")
|
||||
self.verticalLayout.addWidget(self.pushButton)
|
||||
self.pushButton_4 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
|
||||
self.pushButton_4.setPalette(palette)
|
||||
self.pushButton_4.setObjectName("pushButton_4")
|
||||
self.verticalLayout.addWidget(self.pushButton_4)
|
||||
self.pushButton_3 = QtWidgets.QPushButton(self.verticalLayoutWidget)
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(41, 50, 65))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.ButtonText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(152, 193, 217))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Midlight, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.ButtonText, brush)
|
||||
self.pushButton_3.setPalette(palette)
|
||||
self.pushButton_3.setObjectName("pushButton_3")
|
||||
self.verticalLayout.addWidget(self.pushButton_3)
|
||||
self.scrollArea.setWidget(self.scrollAreaWidgetContents)
|
||||
self.label_6 = QtWidgets.QLabel(self.MainInterface)
|
||||
self.label_6.setGeometry(QtCore.QRect(0, 20, 231, 41))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
|
||||
self.label_6.setPalette(palette)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(14)
|
||||
self.label_6.setFont(font)
|
||||
self.label_6.setAutoFillBackground(True)
|
||||
self.label_6.setAlignment(QtCore.Qt.AlignCenter)
|
||||
self.label_6.setObjectName("label_6")
|
||||
self.frame = QtWidgets.QFrame(self.MainInterface)
|
||||
self.frame.setGeometry(QtCore.QRect(480, 20, 321, 531))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Window, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Base, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(61, 90, 128))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Window, brush)
|
||||
self.frame.setPalette(palette)
|
||||
self.frame.setAutoFillBackground(True)
|
||||
self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
|
||||
self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
|
||||
self.frame.setObjectName("frame")
|
||||
self.label_8 = QtWidgets.QLabel(self.frame)
|
||||
self.label_8.setGeometry(QtCore.QRect(130, 0, 71, 31))
|
||||
palette = QtGui.QPalette()
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(224, 251, 252))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.WindowText, brush)
|
||||
brush = QtGui.QBrush(QtGui.QColor(120, 120, 120))
|
||||
brush.setStyle(QtCore.Qt.SolidPattern)
|
||||
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.WindowText, brush)
|
||||
self.label_8.setPalette(palette)
|
||||
font = QtGui.QFont()
|
||||
font.setPointSize(16)
|
||||
self.label_8.setFont(font)
|
||||
self.label_8.setObjectName("label_8")
|
||||
self.tabWidget.addTab(self.MainInterface, "")
|
||||
self.Sensors = QtWidgets.QWidget()
|
||||
self.Sensors.setObjectName("Sensors")
|
||||
self.tabWidget.addTab(self.Sensors, "")
|
||||
self.RobotView = RobotViewWindow()
|
||||
self.RobotView.setObjectName("RobotView")
|
||||
self.tabWidget.addTab(self.RobotView, "")
|
||||
self.tab_2 = ControllerWindow()
|
||||
self.tab_2.setObjectName("tab_2")
|
||||
self.tabWidget.addTab(self.tab_2, "")
|
||||
BaseStation.setCentralWidget(self.centralwidget)
|
||||
self.statusbar = QtWidgets.QStatusBar(BaseStation)
|
||||
self.statusbar.setObjectName("statusbar")
|
||||
BaseStation.setStatusBar(self.statusbar)
|
||||
|
||||
self.retranslateUi(BaseStation)
|
||||
self.tabWidget.setCurrentIndex(0)
|
||||
QtCore.QMetaObject.connectSlotsByName(BaseStation)
|
||||
|
||||
def retranslateUi(self, BaseStation):
|
||||
_translate = QtCore.QCoreApplication.translate
|
||||
BaseStation.setWindowTitle(_translate("BaseStation", "BaseStation"))
|
||||
self.groupBox.setTitle(_translate("BaseStation", "Middle Page"))
|
||||
self.label.setText(_translate("BaseStation", "Potentia"))
|
||||
self.label_2.setText(_translate("BaseStation", "Robotics"))
|
||||
self.label_3.setText(_translate("BaseStation", "Control Systems"))
|
||||
self.label_4.setText(_translate("BaseStation", "V 1.0"))
|
||||
self.label_5.setText(_translate("BaseStation", "Profile: Raspberry Pi\n"
|
||||
"Speed:___\n"
|
||||
"Duration:____\n"
|
||||
"Connection:10/10"))
|
||||
self.label_7.setText(_translate("BaseStation", "Profile: Controller\n"
|
||||
"Speed:___\n"
|
||||
"Duration:____\n"
|
||||
"Connection:10/10"))
|
||||
self.pushButton_2.setText(_translate("BaseStation", "PushButton"))
|
||||
self.pushButton.setText(_translate("BaseStation", "PushButton"))
|
||||
self.pushButton_4.setText(_translate("BaseStation", "PushButton"))
|
||||
self.pushButton_3.setText(_translate("BaseStation", "PushButton"))
|
||||
self.label_6.setText(_translate("BaseStation", "Logs"))
|
||||
self.label_8.setText(_translate("BaseStation", "Graphs"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.MainInterface), _translate("BaseStation", "Main Interface"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.Sensors), _translate("BaseStation", "Sensors"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.RobotView), _translate("BaseStation", "Robot View"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("BaseStation", "Controller"))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
app = QtWidgets.QApplication(sys.argv)
|
||||
BaseStation = QtWidgets.QMainWindow()
|
||||
ui = Ui_BaseStation()
|
||||
ui.setupUi(BaseStation)
|
||||
BaseStation.show()
|
||||
sys.exit(app.exec_())
|
|
@ -7,9 +7,10 @@
|
|||
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
|
||||
# run again. Do not edit this file unless you know what you are doing.
|
||||
|
||||
|
||||
from PyQt5 import QtCore, QtGui, QtWidgets
|
||||
|
||||
from robotviewPage.robotView import RobotViewWindow
|
||||
from controllerPage.Controller import ControllerWindow
|
||||
|
||||
class Ui_BaseStation(object):
|
||||
def setupUi(self, BaseStation):
|
||||
|
@ -476,10 +477,10 @@ class Ui_BaseStation(object):
|
|||
self.Sensors = QtWidgets.QWidget()
|
||||
self.Sensors.setObjectName("Sensors")
|
||||
self.tabWidget.addTab(self.Sensors, "")
|
||||
self.RobotView = QtWidgets.QWidget()
|
||||
self.RobotView = RobotViewWindow()
|
||||
self.RobotView.setObjectName("RobotView")
|
||||
self.tabWidget.addTab(self.RobotView, "")
|
||||
self.tab_2 = QtWidgets.QWidget()
|
||||
self.tab_2 = ControllerWindow()
|
||||
self.tab_2.setObjectName("tab_2")
|
||||
self.tabWidget.addTab(self.tab_2, "")
|
||||
BaseStation.setCentralWidget(self.centralwidget)
|
||||
|
@ -517,7 +518,7 @@ class Ui_BaseStation(object):
|
|||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.Sensors), _translate("BaseStation", "Sensors"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.RobotView), _translate("BaseStation", "Robot View"))
|
||||
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_2), _translate("BaseStation", "Controller"))
|
||||
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
import sys
|
||||
|
|
|
@ -4,10 +4,10 @@ from PyQt5.QtGui import QFont
|
|||
from PyQt5.QtCore import Qt, QRect
|
||||
import sys
|
||||
|
||||
class MyWindow(QWidget):
|
||||
class RobotViewWindow(QWidget):
|
||||
|
||||
def __init__(self):
|
||||
super(MyWindow, self).__init__()
|
||||
super(RobotViewWindow, self).__init__()
|
||||
self.resize(812, 627)
|
||||
self.setWindowTitle("Base Station")
|
||||
self.initUI()
|
||||
|
@ -39,7 +39,7 @@ class MyWindow(QWidget):
|
|||
title.setStyleSheet("color:rgb(224, 251, 252)")
|
||||
title.setAlignment(Qt.AlignCenter)
|
||||
formLayout.addRow(title)
|
||||
for i in range(20):
|
||||
for i in range(20): # currently hardcoded num of logs
|
||||
b1 = QPushButton("Info")
|
||||
b1.setStyleSheet("background:rgb(152, 193, 217)")
|
||||
self.logs.append(b1)
|
||||
|
@ -73,18 +73,16 @@ class MyWindow(QWidget):
|
|||
columns.addLayout(columnLayout)
|
||||
columns.addLayout(columns2Layout)
|
||||
self.setLayout(columns)
|
||||
|
||||
# self.b1.clicked.connect(self.clicked)
|
||||
|
||||
def getInfo(self, label):
|
||||
self.logs[label].setText("Hey! You clicked on this button!")
|
||||
self.update(label)
|
||||
# def getInfo(self, label):
|
||||
# self.logs[label].setText("Hey! You clicked on this button!")
|
||||
# self.update(label)
|
||||
|
||||
def update(self, label):
|
||||
self.logs[label].adjustSize()
|
||||
# def update(self, label):
|
||||
# self.logs[label].adjustSize()
|
||||
|
||||
if __name__ == "__main__":
|
||||
app = QApplication(sys.argv)
|
||||
win = MyWindow()
|
||||
win = RobotViewWindow()
|
||||
win.show()
|
||||
sys.exit(app.exec_())
|
Loading…
Reference in New Issue
Block a user