-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfinal.py
49 lines (38 loc) · 1.58 KB
/
final.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import sys
import platform
from PyQt5.uic import loadUiType
from Tools.demo.beer import n
CPU_Scheduler, _ = loadUiType('CPU_Scheduler.ui')
class MainApp(QMainWindow, CPU_Scheduler):
def __init__(self, parent=None):
QMainWindow.__init__(self)
self.setupUi(self)
self.ui = CPU_Scheduler
self.handle_buttons()
self.handle_line_edits()
############################################################
# buttons connection to pages ##############################
def handle_buttons(self):
self.btn_1.clicked.connect(lambda: self.stackedWidget.setCurrentWidget(self.page_1))
self.btn_2.clicked.connect(lambda: self.stackedWidget.setCurrentWidget(self.page_2))
self.btn_3.clicked.connect(lambda: self.stackedWidget.setCurrentWidget(self.page_3))
self.btn_4.clicked.connect(lambda: self.stackedWidget.setCurrentWidget(self.page_4))
self.ok_2.clicked.connect(self.handle_line_edits)
self.show()
############################################################
# buttons connection to pages ##############################
def handle_line_edits(self):
n: int = self.process_no_2.text()
print(n)
############################################################
# fill data to the tables ##################################
def main():
app = QApplication(sys.argv)
window = MainApp()
window.show()
app.exec_()
if __name__ == '__main__':
main()