-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathOSVirtualLab.py
55 lines (41 loc) · 1.58 KB
/
OSVirtualLab.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
50
51
52
53
54
55
from PyQt5 import QtWidgets
from PyQt5.QtWidgets import QMainWindow
from PyQt5.uic import loadUi
from ProcessScheduler.ProcessScheduler import UI_ProcessScheduler
from PageReplacement.PageReplacements import UI_PageReplacement
from DiskScheduler.DiskScheduling import UI_DiskScheduling
from ConcurrencyDeadlock.ConcurrencyDeadlock import UI_Concurrency
class Main(QMainWindow):
def __init__(self):
super(Main, self).__init__()
loadUi('UI/main.ui', self)
self.show()
self.btn_process.clicked.connect(self.processScheduler)
self.btn_page.clicked.connect(self.pageReplacement)
self.btn_disk.clicked.connect(self.diskScheduling)
self.btn_concurrency.clicked.connect(self.concurrencyDeadlock)
def processScheduler(self):
self.process = QtWidgets.QMainWindow()
self.ui = UI_ProcessScheduler()
self.ui.setupUi(self.process)
self.process.show()
def pageReplacement(self):
self.page = QtWidgets.QMainWindow()
self.ui = UI_PageReplacement()
self.ui.setupUi(self.page)
self.page.show()
def diskScheduling(self):
self.disk = QtWidgets.QMainWindow()
self.ui = UI_DiskScheduling()
self.ui.setupUi(self.disk)
self.disk.show()
def concurrencyDeadlock(self):
self.concurrency = QtWidgets.QMainWindow()
self.ui = UI_Concurrency()
self.ui.setupUi(self.concurrency)
self.concurrency.show()
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
mainUI = Main()
sys.exit(app.exec_())