diff options
author | suchinton2001 <suchinton.2001@gmail.com> | 2023-10-15 23:30:36 +0530 |
---|---|---|
committer | Jan-Simon Moeller <jsmoeller@linuxfoundation.org> | 2023-10-19 16:19:32 +0000 |
commit | 20fe2d131df0041e121eccaf4fc58d4ac88dfbbc (patch) | |
tree | d555cd863e644014e9eb7a3fb9b759de246b6c2e /main.py | |
parent | e875973f63fc9a9582e957eb7264a4a589b78a97 (diff) |
agl-demo-control-panel: Refactor Settings, Config and UI scaling
V1:
- Add template to specify new configs in config.ini
- Add drop-down to load all configurations specified in config.ini
- Add new assets and refine UI elements (Scaling issue fixed)
- Add size grip to main window
- Add options in settings to configure port and AGL's CA.pem file
- Removed unused or redundant files
V2:
- Check for user configs agl-demo-control-panel.ini & config.ini
before resorting to default config.ini
- Check for CA.pem and jwt tokens in default paths
- Add new fields in settings for CA.pem file, jwt token path, TLS Server name
- Fix crash in dashboard.py module due to icon.availableSizes()
V3: Add Start/Stop states for the client
V4: Block subscription event updates to the UI when values are changed on the control panel
Bug-AGL: SPEC-4905
Signed-off-by: suchinton2001 <suchinton.2001@gmail.com>
Change-Id: Id7883ba3bc88248dabb58d54e6e931f6d365fd54
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 22 |
1 files changed, 20 insertions, 2 deletions
@@ -52,7 +52,7 @@ class MainWindow(Base, Form): self.setAttribute(QtCore.Qt.WA_TranslucentBackground) self.setStyle(QtWidgets.QStyleFactory.create('Fusion')) - + #self.resize(1400,840) self.headerContainer = self.findChild(QWidget, 'headerContainer') self.headerContainer.DoubleClickMaximize = lambda: UI_Handeler.toggleMaximized(self) self.headerContainer.mouseMoveEvent = lambda event: UI_Handeler.moveWindow(self, event) @@ -96,7 +96,7 @@ class MainWindow(Base, Form): self.stop_thread_signal.connect(self.stackedWidget.widget(0).feed_kuksa.stop) - self.stackedWidget.setCurrentIndex(0) + self.stackedWidget.setCurrentIndex(0) self.dashboardButton.setChecked(True) UI_Handeler.Hide_Navbar(self,bool_arg=False) @@ -105,6 +105,24 @@ class MainWindow(Base, Form): self.current_page = self.stackedWidget.currentIndex() + self.centralwidget = self.findChild(QWidget, 'centralwidget') + self.size_grip = QtWidgets.QSizeGrip(self) + self.size_grip.setFixedSize(20, 20) + #self.size_grip.setStyleSheet("QSizeGrip { background-color: transparent; }") + self.size_grip.setStyleSheet(""" + QSizeGrip { + background-color: transparent; + background-image: url(:/Carbon_Icons/carbon_icons/corner.svg); + background-repeat: no-repeat; + background-position: center; + border: none; + } + """) + self.centralwidget.layout().addWidget(self.size_grip, 0, Qt.AlignBottom | Qt.AlignRight) + + def VSS_callback(self,data): + pass + def handleTileClicked(self): """ Handles the tile clicked signal from the Dashboard object. |