-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoptions.py
241 lines (225 loc) · 13 KB
/
options.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
from PyQt5 import QtCore, QtGui, QtWidgets
## For each of the module there is a label and an icon. Icon can be changed by replacing the image location in the addPixmap method
class Modules(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1920, 1080)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.Subconhiringicon = QtWidgets.QPushButton(self.centralwidget)
self.Subconhiringicon.setGeometry(QtCore.QRect(610, 170, 102, 90))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Subconhiringicon.sizePolicy().hasHeightForWidth())
self.Subconhiringicon.setSizePolicy(sizePolicy)
self.Subconhiringicon.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("hiring.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) ## For ex., replacing the image location for icon of hiring request module here will do the work.
self.Subconhiringicon.setIcon(icon)
self.Subconhiringicon.setIconSize(QtCore.QSize(80, 80))
self.Subconhiringicon.setObjectName("Subconhiringicon")
self.subconhiring = QtWidgets.QLabel(self.centralwidget)
self.subconhiring.setGeometry(QtCore.QRect(410, 310, 489, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.subconhiring.setFont(font)
self.subconhiring.setText("Subcon Hiring Request")
self.subconhiring.setAlignment(QtCore.Qt.AlignCenter)
self.subconhiring.setObjectName("subconhiring")
## Subcon Extension Button ##
self.Subconextensionicon = QtWidgets.QPushButton(self.centralwidget)
self.Subconextensionicon.setGeometry(QtCore.QRect(1200, 380, 102, 90))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Subconextensionicon.sizePolicy().hasHeightForWidth())
self.Subconextensionicon.setSizePolicy(sizePolicy)
self.Subconextensionicon.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("renewal.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.Subconextensionicon.setIcon(icon)
self.Subconextensionicon.setIconSize(QtCore.QSize(80, 80))
self.Subconextensionicon.setObjectName("Subconextensionicon")
self.Subconextension = QtWidgets.QLabel(self.centralwidget)
self.Subconextension.setGeometry(QtCore.QRect(1010, 520, 489, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.Subconextension.setFont(font)
self.Subconextension.setAlignment(QtCore.Qt.AlignCenter)
self.Subconextension.setText("Subcon Extension")
self.Subconextension.setObjectName("Subconextension")
## Allocation Update Module ##
self.Subconallocationicon = QtWidgets.QPushButton(self.centralwidget)
self.Subconallocationicon.setGeometry(QtCore.QRect(1200,170, 102, 90))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Subconallocationicon.sizePolicy().hasHeightForWidth())
self.Subconallocationicon.setSizePolicy(sizePolicy)
self.Subconallocationicon.setStyleSheet('background-color: #404040;')
self.Subconallocationicon.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("allocation.jpg"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.Subconallocationicon.setIcon(icon)
self.Subconallocationicon.setIconSize(QtCore.QSize(80, 80))
self.Subconallocationicon.setObjectName("Subconallocationicon")
self.subconallocation = QtWidgets.QLabel(self.centralwidget)
self.subconallocation.setGeometry(QtCore.QRect(1010, 310, 489, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.subconallocation.setFont(font)
self.subconallocation.setAlignment(QtCore.Qt.AlignCenter)
self.subconallocation.setText("Subcon Allocation Details")
self.subconallocation.setObjectName("subconallocation")
## Subcon Portfolio module ##
self.Subconportfolioicon = QtWidgets.QPushButton(self.centralwidget)
self.Subconportfolioicon.setGeometry(QtCore.QRect(610, 580, 102, 90))
self.Subconportfolioicon.setStyleSheet('background-color: #404040;')
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Subconportfolioicon.sizePolicy().hasHeightForWidth())
self.Subconportfolioicon.setSizePolicy(sizePolicy)
self.Subconportfolioicon.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("portfolio.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.Subconportfolioicon.setIcon(icon)
self.Subconportfolioicon.setIconSize(QtCore.QSize(80, 80))
self.Subconportfolioicon.setObjectName("Subconportfolioicon")
self.Subconportfolio = QtWidgets.QLabel(self.centralwidget)
self.Subconportfolio.setGeometry(QtCore.QRect(410, 710, 489, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.Subconportfolio.setFont(font)
self.Subconportfolio.setAlignment(QtCore.Qt.AlignCenter)
self.Subconportfolio.setObjectName("Subconportfolio")
self.Subconportfolio.setText("Subcon Portfolio")
## Subcon Performance Evaluation module ##
self.label_10 = QtWidgets.QLabel(self.centralwidget)
self.label_10.setGeometry(QtCore.QRect(1010, 710, 489, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.label_10.setFont(font)
self.label_10.setAlignment(QtCore.Qt.AlignCenter)
self.label_10.setObjectName("label_10")
self.label_10.setText("Subcon Performance Evaluation")
self.Subconperformanceicon = QtWidgets.QPushButton(self.centralwidget)
self.Subconperformanceicon.setGeometry(QtCore.QRect(1200, 580, 102, 90))
self.Subconperformanceicon.setStyleSheet('background-color: #404040;')
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Subconperformanceicon.sizePolicy().hasHeightForWidth())
self.Subconperformanceicon.setSizePolicy(sizePolicy)
self.Subconperformanceicon.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("performance.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.Subconperformanceicon.setIcon(icon)
self.Subconperformanceicon.setIconSize(QtCore.QSize(80, 80))
self.Subconperformanceicon.setObjectName("Subconperformanceicon")
## Vendor Management module ##
self.Vendor = QtWidgets.QLabel(self.centralwidget)
self.Vendor.setGeometry(QtCore.QRect(1010, 910, 489, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.Vendor.setFont(font)
self.Vendor.setAlignment(QtCore.Qt.AlignCenter)
self.Vendor.setObjectName("Vendor")
self.Vendor.setText("Vendor Management")
self.Vendoricon = QtWidgets.QPushButton(self.centralwidget)
self.Vendoricon.setGeometry(QtCore.QRect(1200, 780, 102, 90))
self.Vendoricon.setStyleSheet('background-color: #404040;')
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Vendoricon.sizePolicy().hasHeightForWidth())
self.Vendoricon.setSizePolicy(sizePolicy)
self.Vendoricon.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("Vendor.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.Vendoricon.setIcon(icon)
self.Vendoricon.setIconSize(QtCore.QSize(80, 80))
self.Vendoricon.setObjectName("Vendoricon")
## Timesheet module ##
self.Timesheeticon = QtWidgets.QPushButton(self.centralwidget)
self.Timesheeticon.setGeometry(QtCore.QRect(610, 380, 102, 90))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Timesheeticon.sizePolicy().hasHeightForWidth())
self.Timesheeticon.setSizePolicy(sizePolicy)
self.Timesheeticon.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("timesheet.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.Timesheeticon.setIcon(icon)
self.Timesheeticon.setIconSize(QtCore.QSize(80, 80))
self.Timesheeticon.setObjectName("Timesheeticon")
self.Timesheet = QtWidgets.QLabel(self.centralwidget)
self.Timesheet.setGeometry(QtCore.QRect(410, 520, 489, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.Timesheet.setFont(font)
self.Timesheet.setAlignment(QtCore.Qt.AlignCenter)
self.Timesheet.setObjectName("Timesheet")
self.Timesheet.setText("Timesheet and Expenses")
## Dashboard module ##
self.Dashboardicon = QtWidgets.QPushButton(self.centralwidget)
self.Dashboardicon.setGeometry(QtCore.QRect(610, 780, 102, 90))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.Dashboardicon.sizePolicy().hasHeightForWidth())
self.Dashboardicon.setSizePolicy(sizePolicy)
self.Dashboardicon.setText("")
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap("dashboard.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
self.Dashboardicon.setIcon(icon)
self.Dashboardicon.setIconSize(QtCore.QSize(80, 80))
self.Dashboardicon.setObjectName("Dashboardicon")
self.Dashboard = QtWidgets.QLabel(self.centralwidget)
self.Dashboard.setGeometry(QtCore.QRect(410, 910, 489, 23))
font = QtGui.QFont()
font.setPointSize(15)
self.Dashboard.setFont(font)
self.Dashboard.setAlignment(QtCore.Qt.AlignCenter)
self.Dashboard.setObjectName("Dashboard")
self.Dashboard.setText("Dashboard")
MainWindow.setCentralWidget(self.centralwidget)
## Menubar ##
self.menubar = QtWidgets.QMenuBar(self.centralwidget)
self.menubar.setStyleSheet("QMenuBar{background-color: rgb(0,0,0); color: #e0e0e0; font-size: 20px;} QMenuBar::item:selected{background-color: #e0e0e0; color: #2e2e2e; font-size: 20px;} QMenu{background-color: rgb(0,0,0); color: rgb(255,255,255); font-size: 18px; font-weight: 150} QMenu::item:selected{background-color: #e0e0e0; color: #2e2e2e; font-size: 18px;}") ## Properties of Menubar
self.menubar.setGeometry(QtCore.QRect(0, 0, 1920, 32))
self.homescreen = QtWidgets.QAction("Home", self.menubar) ## Home Button on Menubar
self.font_1 = QtGui.QFont()
self.font_1.setBold(True)
self.font_1.setWeight(30)
self.menubar.addAction(self.homescreen)
self.modules_menu = self.menubar.addMenu("Modules") ## Modules menu
self.modules_menu.setFont(self.font_1)
self.accessdashboard = QtWidgets.QAction("Dashboard", self.menubar) ## Dashboard Menu
self.menubar.addAction(self.accessdashboard)
## Sub-menus under Modules Menu
self.hiring = QtWidgets.QAction("Subcon Hiring Request", self.menubar)
self.renewal = QtWidgets.QAction("Subcon Renewal", self.menubar)
self.allocation = QtWidgets.QAction("Subcon Allocation Update", self.menubar)
self.performance = QtWidgets.QAction("Subcon Performance Evaluation", self.menubar)
self.portfolio = QtWidgets.QAction("Subcon Portfolio", self.menubar)
self.timesheet = QtWidgets.QAction("Timesheet and Expenses", self.menubar)
self.vendor = QtWidgets.QAction("Vendor Management", self.menubar)
self.modules_menu.addAction(self.hiring)
self.modules_menu.addAction(self.renewal)
self.modules_menu.addAction(self.allocation)
self.modules_menu.addAction(self.performance)
self.modules_menu.addAction(self.portfolio)
self.modules_menu.addAction(self.timesheet)
self.modules_menu.addAction(self.vendor)
QtCore.QMetaObject.connectSlotsByName(MainWindow)
if __name__ == "__main__":
import sys
app = QtWidgets.QApplication(sys.argv)
MainWindow = QtWidgets.QMainWindow()
ui = Modules()
ui.setupUi(MainWindow)
MainWindow.show()
sys.exit(app.exec_())