-
Notifications
You must be signed in to change notification settings - Fork 0
/
W_dashboard.py
45 lines (39 loc) · 1.52 KB
/
W_dashboard.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
import os
from PyQt5.QtWidgets import QApplication, QWidget, QMessageBox, QLineEdit, QTableWidgetItem, QDialog
from GUI_dashboard import Ui_FormDashbord
import sys
class main(QWidget, Ui_FormDashbord):
##--------------------- constructor ----------------------------
def __init__(self):
QWidget.__init__(self)
self.setupUi(self)
##-------------------------- connect signals --------------------------
self.BT_employees.clicked.connect(self.openEmployeeForm)
self.BT_history.clicked.connect(self.openHistoryForm)
self.BT_timezone.clicked.connect(self.openTimezoneForm)
self.BT_system.clicked.connect(self.openSystemForm)
##------------------ open employee form ------------------------
def openEmployeeForm(self):
self.hide()
os.system("python W_employee.py") #waitting until form closed
self.show()
##------------------ open history form ------------------------
def openHistoryForm(self):
self.hide()
os.system("python W_zoneHisto.py")
self.show()
##------------------ open timezone form ------------------------
def openTimezoneForm(self):
self.hide()
os.system("python W_zoneTime.py")
self.show()
##------------------ open system form ------------------------
def openSystemForm(self):
self.hide()
os.system("python W_system.py")
self.show()
##----------------- Loop --------------------
app = QApplication(sys.argv)
window = main()
window.show()
app.exec()