summaryrefslogtreecommitdiff
path: root/source/main.py
diff options
context:
space:
mode:
authornasrlol <nsrddyn@gmail.com>2024-12-03 02:02:04 +0100
committernasrlol <nsrddyn@gmail.com>2024-12-03 02:02:04 +0100
commit1a3c5ac8cbbf6e3fa72983156ff279b57785852a (patch)
treefe0ecd90b0113284624e1740a4b7fae3c944b46a /source/main.py
parent88567c71a6f9d78870e4c0ced326ae24f4b965aa (diff)
made the cli application
Diffstat (limited to 'source/main.py')
-rw-r--r--source/main.py50
1 files changed, 0 insertions, 50 deletions
diff --git a/source/main.py b/source/main.py
deleted file mode 100644
index 5a37a88..0000000
--- a/source/main.py
+++ /dev/null
@@ -1,50 +0,0 @@
1from PySide6.QtWidgets import (
2 QApplication,
3 QLabel,
4 QMainWindow,
5 QPushButton,
6 QVBoxLayout,
7 QWidget,
8)
9from PySide6.QtCore import Qt
10import hardware_driver as lcd
11import features as fe
12import sys
13
14F = fe.feat()
15L = lcd.LCD()
16
17
18class mainWindow(QMainWindow):
19 def __init__(self):
20 super().__init__()
21 self.setWindowTitle("I2C CONTROLLER")
22 self.setGeometry(200, 100, 800, 300)
23 self.mainUI()
24
25 def mainUI(self):
26 central_widget = QWidget(self)
27 self.setCentralWidget(central_widget)
28
29 self.label = QLabel("CONNECTED TO I2C DEVICE", self)
30 self.label.setAlignment(Qt.AlignCenter)
31
32 self.button = QPushButton("Clear Screen", self)
33 self.button.clicked.connect(self.clear_screen)
34
35 layout = QVBoxLayout()
36 layout.addWidget(self.label)
37 layout.addWidget(self.button)
38
39 central_widget.setLayout(layout)
40
41 def clear_screen(self):
42 F.clear()
43 self.label.setText("Cleared the LCD screen")
44
45
46if __name__ == "__main__":
47 app = QApplication(sys.argv)
48 window = mainWindow()
49 window.show()
50 sys.exit(app.exec())