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_Window.ui | |
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_Window.ui')
-rw-r--r-- | Main_Window.ui | 610 |
1 files changed, 277 insertions, 333 deletions
diff --git a/Main_Window.ui b/Main_Window.ui index 6b8ba83..7bfb0ef 100644 --- a/Main_Window.ui +++ b/Main_Window.ui @@ -9,8 +9,8 @@ <rect> <x>0</x> <y>0</y> - <width>1297</width> - <height>739</height> + <width>903</width> + <height>705</height> </rect> </property> <property name="palette"> @@ -542,273 +542,8 @@ QStackedWidget{ <property name="autoFillBackground"> <bool>false</bool> </property> - <layout class="QGridLayout" name="gridLayout"> - <item row="2" column="2"> - <widget class="QWidget" name="BottomMenuContainer" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="styleSheet"> - <string notr="true"/> - </property> - <layout class="QVBoxLayout" name="verticalLayout_2"> - <property name="spacing"> - <number>0</number> - </property> - <property name="leftMargin"> - <number>0</number> - </property> - <property name="topMargin"> - <number>0</number> - </property> - <property name="rightMargin"> - <number>0</number> - </property> - <property name="bottomMargin"> - <number>0</number> - </property> - <item> - <widget class="QWidget" name="BottomMenuSubContainer" native="true"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Ignored"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="minimumSize"> - <size> - <width>0</width> - <height>70</height> - </size> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_9"> - <item alignment="Qt::AlignLeft"> - <widget class="QFrame" name="frame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout"> - <item> - <widget class="QPushButton" name="dashboardButton"> - <property name="font"> - <font> - <family>DejaVu Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/Carbon_Icons/carbon_icons/workspace.svg</normaloff>:/Carbon_Icons/carbon_icons/workspace.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>35</width> - <height>35</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_2"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Maximum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item alignment="Qt::AlignHCenter|Qt::AlignVCenter"> - <widget class="QFrame" name="navigationFrame"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QHBoxLayout" name="horizontalLayout_10"> - <item> - <widget class="QPushButton" name="icButton"> - <property name="enabled"> - <bool>true</bool> - </property> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="font"> - <font> - <family>DejaVu Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - <kerning>true</kerning> - </font> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/Carbon_Icons/carbon_icons/meter.svg</normaloff>:/Carbon_Icons/carbon_icons/meter.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>35</width> - <height>35</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="hvacButton"> - <property name="font"> - <font> - <family>DejaVu Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - <kerning>true</kerning> - </font> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/Carbon_Icons/carbon_icons/windy--strong.svg</normaloff>:/Carbon_Icons/carbon_icons/windy--strong.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>35</width> - <height>35</height> - </size> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="steeringCtrlButton"> - <property name="font"> - <font> - <family>DejaVu Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - <kerning>true</kerning> - </font> - </property> - <property name="text"> - <string/> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/Images/Images/steering-wheel.svg</normaloff>:/Images/Images/steering-wheel.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>35</width> - <height>35</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - <item> - <spacer name="horizontalSpacer_3"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType"> - <enum>QSizePolicy::Maximum</enum> - </property> - <property name="sizeHint" stdset="0"> - <size> - <width>40</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item alignment="Qt::AlignRight"> - <widget class="QFrame" name="settingsFrame"> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> - </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> - </property> - <layout class="QVBoxLayout" name="verticalLayout_5"> - <item> - <widget class="QPushButton" name="settingsBtn"> - <property name="font"> - <font> - <family>DejaVu Sans</family> - <weight>75</weight> - <italic>true</italic> - <bold>true</bold> - </font> - </property> - <property name="text"> - <string>Configure</string> - </property> - <property name="icon"> - <iconset resource="assets/res.qrc"> - <normaloff>:/Carbon_Icons/carbon_icons/settings.svg</normaloff>:/Carbon_Icons/carbon_icons/settings.svg</iconset> - </property> - <property name="iconSize"> - <size> - <width>35</width> - <height>35</height> - </size> - </property> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> - </layout> - </widget> - </item> - <item row="0" column="2" rowspan="2"> + <layout class="QVBoxLayout" name="verticalLayout_3"> + <item> <widget class="QWidget" name="mainContainer" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> @@ -835,7 +570,7 @@ QStackedWidget{ <item> <widget class="QWidget" name="headerContainer" native="true"> <property name="sizePolicy"> - <sizepolicy hsizetype="Preferred" vsizetype="Preferred"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> @@ -957,13 +692,6 @@ QStackedWidget{ <number>0</number> </property> <item> - <widget class="Line" name="line"> - <property name="orientation"> - <enum>Qt::Vertical</enum> - </property> - </widget> - </item> - <item> <widget class="QPushButton" name="minimizeBtn"> <property name="text"> <string/> @@ -1031,6 +759,12 @@ QStackedWidget{ </property> <item> <widget class="QWidget" name="Stackwidget" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <layout class="QHBoxLayout" name="horizontalLayout_6"> <property name="spacing"> <number>0</number> @@ -1049,8 +783,14 @@ QStackedWidget{ </property> <item> <widget class="QStackedWidget" name="stackedWidget"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Preferred" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="currentIndex"> - <number>1</number> + <number>3</number> </property> <widget class="Dashboard" name="Dashboard"/> <widget class="ICWidget" name="ICPage"/> @@ -1065,99 +805,303 @@ QStackedWidget{ </layout> </widget> </item> - <item> - <widget class="QWidget" name="notificationContent" native="true"> + </layout> + </widget> + </item> + <item> + <widget class="QWidget" name="BottomMenuContainer" native="true"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="styleSheet"> + <string notr="true"/> + </property> + <layout class="QVBoxLayout" name="verticalLayout_2"> + <property name="spacing"> + <number>0</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item alignment="Qt::AlignBottom"> + <widget class="QWidget" name="BottomMenuSubContainer" native="true"> <property name="sizePolicy"> <sizepolicy hsizetype="Preferred" vsizetype="Ignored"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="maximumSize"> + <property name="minimumSize"> <size> - <width>16777215</width> - <height>100</height> + <width>0</width> + <height>70</height> </size> </property> - <layout class="QVBoxLayout" name="verticalLayout_6"> - <item> - <widget class="QFrame" name="notificationFrame"> + <layout class="QHBoxLayout" name="horizontalLayout_9"> + <item alignment="Qt::AlignLeft|Qt::AlignVCenter"> + <widget class="QFrame" name="frame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> <property name="frameShape"> <enum>QFrame::StyledPanel</enum> </property> <property name="frameShadow"> <enum>QFrame::Raised</enum> </property> - <layout class="QHBoxLayout" name="horizontalLayout_7"> + <layout class="QHBoxLayout" name="horizontalLayout"> <item> - <widget class="QFrame" name="frame_2"> - <property name="frameShape"> - <enum>QFrame::StyledPanel</enum> + <widget class="QPushButton" name="dashboardButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + </font> </property> - <property name="frameShadow"> - <enum>QFrame::Raised</enum> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/workspace.svg</normaloff>:/Carbon_Icons/carbon_icons/workspace.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>35</width> + <height>35</height> + </size> </property> - <layout class="QHBoxLayout" name="horizontalLayout_8"> - <item> - <widget class="QLabel" name="messageIcon"> - <property name="text"> - <string/> - </property> - <property name="pixmap"> - <pixmap>:/icons/feather/alert-octagon.svg</pixmap> - </property> - </widget> - </item> - <item> - <widget class="QLabel" name="message"> - <property name="sizePolicy"> - <sizepolicy hsizetype="Expanding" vsizetype="Preferred"> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text"> - <string>Establish Connection to server </string> - </property> - </widget> - </item> - </layout> </widget> </item> - <item alignment="Qt::AlignRight"> - <widget class="QPushButton" name="ackBtn"> + </layout> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Maximum</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item alignment="Qt::AlignHCenter|Qt::AlignVCenter"> + <widget class="QFrame" name="navigationFrame"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_10"> + <property name="spacing"> + <number>6</number> + </property> + <property name="leftMargin"> + <number>0</number> + </property> + <property name="topMargin"> + <number>0</number> + </property> + <property name="rightMargin"> + <number>0</number> + </property> + <property name="bottomMargin"> + <number>0</number> + </property> + <item> + <widget class="QPushButton" name="icButton"> + <property name="enabled"> + <bool>true</bool> + </property> <property name="sizePolicy"> - <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> <horstretch>0</horstretch> <verstretch>0</verstretch> </sizepolicy> </property> - <property name="minimumSize"> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + <kerning>true</kerning> + </font> + </property> + <property name="text"> + <string/> + </property> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/meter.svg</normaloff>:/Carbon_Icons/carbon_icons/meter.svg</iconset> + </property> + <property name="iconSize"> <size> - <width>40</width> - <height>0</height> + <width>35</width> + <height>35</height> </size> </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="hvacButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + <kerning>true</kerning> + </font> + </property> <property name="text"> - <string>OK</string> + <string/> + </property> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/windy--strong.svg</normaloff>:/Carbon_Icons/carbon_icons/windy--strong.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>35</width> + <height>35</height> + </size> </property> </widget> </item> <item> - <spacer name="horizontalSpacer"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> + <widget class="QPushButton" name="steeringCtrlButton"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + <kerning>true</kerning> + </font> </property> - <property name="sizeType"> - <enum>QSizePolicy::Fixed</enum> + <property name="text"> + <string/> </property> - <property name="sizeHint" stdset="0"> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Images/Images/steering-wheel.svg</normaloff>:/Images/Images/steering-wheel.svg</iconset> + </property> + <property name="iconSize"> <size> - <width>20</width> - <height>20</height> + <width>35</width> + <height>35</height> </size> </property> - </spacer> + </widget> + </item> + </layout> + </widget> + </item> + <item> + <spacer name="horizontalSpacer_3"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Maximum</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item alignment="Qt::AlignRight"> + <widget class="QFrame" name="settingsFrame"> + <property name="frameShape"> + <enum>QFrame::StyledPanel</enum> + </property> + <property name="frameShadow"> + <enum>QFrame::Raised</enum> + </property> + <layout class="QHBoxLayout" name="horizontalLayout_11"> + <item alignment="Qt::AlignVCenter"> + <widget class="QPushButton" name="settingsBtn"> + <property name="sizePolicy"> + <sizepolicy hsizetype="Expanding" vsizetype="Expanding"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="font"> + <font> + <family>DejaVu Sans</family> + <weight>75</weight> + <italic>true</italic> + <bold>true</bold> + </font> + </property> + <property name="text"> + <string>Configure</string> + </property> + <property name="icon"> + <iconset resource="assets/res.qrc"> + <normaloff>:/Carbon_Icons/carbon_icons/settings.svg</normaloff>:/Carbon_Icons/carbon_icons/settings.svg</iconset> + </property> + <property name="iconSize"> + <size> + <width>35</width> + <height>35</height> + </size> + </property> + </widget> </item> </layout> </widget> |