-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNetSIP_ui.py
More file actions
77 lines (53 loc) · 1.84 KB
/
NetSIP_ui.py
File metadata and controls
77 lines (53 loc) · 1.84 KB
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
import PyQt6.QtCore as QtCore
import PyQt6.QtWidgets as QtWidgets
import PyQt6.QtGui as QtGui
try:
from . import tab1_modifier
except:
import tab1_modifier
class MainWindow(QtWidgets.QMainWindow):
def __init__(self):
super().__init__()
self.setWindowTitle("NetSIP")
# Create layout for the tabs
self.tab_layout = QtWidgets.QVBoxLayout()
self.tab_widget = QtWidgets.QTabWidget()
self.tab_layout.addWidget(self.tab_widget)
# Get the widget for tab1
tab1 = tab1_modifier.tab1_modifier(self)
self.tab_widget.addTab(tab1, "SIP Modifier")
# Add the widget as the central widget
self.setCentralWidget(self.tab_widget)
# set the default window size
self.resize(1080, 720)
# Add an icon for the program
try:
self.setWindowIcon(QtGui.QIcon("images/netspi.png"))
except:
pass
# Show the UI window
self.show()
def clicked(self, checked):
pass
def mousePressEvent(self, event):
super().mousePressEvent(event)
def contextMenuEvent(self, e):
context = QtWidgets.QMenu(self)
context.exec(e.globalPos())
class Color(QtWidgets.QWidget):
def __init__(self, color):
super(Color, self).__init__()
self.setAutoFillBackground(True)
palette = self.palette()
palette.setColor(QtGui.QPalette.ColorRole.Window, QtGui.QColor(color))
self.setPalette(palette)
if(__name__ == "__main__"):
app = QtWidgets.QApplication([])
app.setStyle("Fusion")
window = MainWindow()
app.exec()
def launch():
app = QtWidgets.QApplication([])
app.setStyle("Fusion")
window = MainWindow()
app.exec()