diff options
author | Rayyan Ansari <rayyan@ansari.sh> | 2022-02-18 15:32:46 +0000 |
---|---|---|
committer | Arisotura <thetotalworm@gmail.com> | 2022-03-07 21:08:54 +0100 |
commit | 2569c67a13a6ce855d27821cc6863ebea82c429d (patch) | |
tree | 6eb326bfadb2dc28999bb722731c006c4dc327f9 /src/frontend/qt_sdl/PowerManagement/PowerManagementDialog.ui | |
parent | c3adf6f606c694221342111a850e7b76ac77a56d (diff) |
Add support for changing the DS and DSi battery level
The DS battery level is configured via the SPI Power Management Device,
and the DSi's is configured via the I2C BPTWL. Add support for changing
these registers and add the "Power Management" dialog in the UI.
Diffstat (limited to 'src/frontend/qt_sdl/PowerManagement/PowerManagementDialog.ui')
-rw-r--r-- | src/frontend/qt_sdl/PowerManagement/PowerManagementDialog.ui | 258 |
1 files changed, 258 insertions, 0 deletions
diff --git a/src/frontend/qt_sdl/PowerManagement/PowerManagementDialog.ui b/src/frontend/qt_sdl/PowerManagement/PowerManagementDialog.ui new file mode 100644 index 0000000..a2c1216 --- /dev/null +++ b/src/frontend/qt_sdl/PowerManagement/PowerManagementDialog.ui @@ -0,0 +1,258 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ui version="4.0"> + <class>PowerManagementDialog</class> + <widget class="QDialog" name="PowerManagementDialog"> + <property name="geometry"> + <rect> + <x>0</x> + <y>0</y> + <width>562</width> + <height>279</height> + </rect> + </property> + <property name="sizePolicy"> + <sizepolicy hsizetype="Fixed" vsizetype="Fixed"> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="windowTitle"> + <string>Power management - melonDS</string> + </property> + <layout class="QGridLayout" name="gridLayout"> + <item row="0" column="0"> + <widget class="QGroupBox" name="grpDSBattery"> + <property name="title"> + <string>DS Battery</string> + </property> + <layout class="QGridLayout" name="gridLayout_2"> + <item row="1" column="1"> + <widget class="QRadioButton" name="rbDSBatteryLow"> + <property name="text"> + <string>Low</string> + </property> + </widget> + </item> + <item row="0" column="0" rowspan="2"> + <widget class="QLabel" name="label"> + <property name="text"> + <string>Battery Level</string> + </property> + </widget> + </item> + <item row="0" column="1"> + <widget class="QRadioButton" name="rbDSBatteryOkay"> + <property name="text"> + <string>Okay</string> + </property> + </widget> + </item> + </layout> + </widget> + </item> + <item row="3" column="0"> + <widget class="QDialogButtonBox" name="buttonBox"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="standardButtons"> + <set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set> + </property> + </widget> + </item> + <item row="2" column="0"> + <widget class="QGroupBox" name="grpDSiBattery"> + <property name="title"> + <string>DSi Battery</string> + </property> + <layout class="QGridLayout" name="gridLayout_6"> + <item row="1" column="2"> + <widget class="QLabel" name="label_2"> + <property name="text"> + <string>Almost Empty</string> + </property> + </widget> + </item> + <item row="1" column="1"> + <spacer name="horizontalSpacer"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType"> + <enum>QSizePolicy::Preferred</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item row="0" column="0" colspan="5"> + <widget class="QCheckBox" name="cbDSiBatteryCharging"> + <property name="text"> + <string>Charging</string> + </property> + </widget> + </item> + <item row="1" column="8"> + <widget class="QLabel" name="label_3"> + <property name="text"> + <string>Full</string> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="1" column="0"> + <widget class="QLabel" name="label_1"> + <property name="text"> + <string>Battery Level</string> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="2" column="3"> + <widget class="QLabel" name="label_4"> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="resources/battery.qrc">:/dsibattery/dsi_batteryalmostempty.svg</pixmap> + </property> + <property name="scaledContents"> + <bool>false</bool> + </property> + </widget> + </item> + <item row="2" column="4"> + <widget class="QLabel" name="label_5"> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="resources/battery.qrc">:/dsibattery/dsi_batterylow.svg</pixmap> + </property> + <property name="alignment"> + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="2" column="5"> + <widget class="QLabel" name="label_6"> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="resources/battery.qrc">:/dsibattery/dsi_battery2.svg</pixmap> + </property> + <property name="alignment"> + <set>Qt::AlignCenter</set> + </property> + </widget> + </item> + <item row="2" column="6"> + <widget class="QLabel" name="label_7"> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="resources/battery.qrc">:/dsibattery/dsi_battery3.svg</pixmap> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="2" column="7"> + <widget class="QLabel" name="label_8"> + <property name="text"> + <string/> + </property> + <property name="pixmap"> + <pixmap resource="resources/battery.qrc">:/dsibattery/dsi_batteryfull.svg</pixmap> + </property> + <property name="alignment"> + <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set> + </property> + </widget> + </item> + <item row="1" column="3" colspan="5"> + <widget class="QSlider" name="sliderDSiBatteryLevel"> + <property name="maximum"> + <number>4</number> + </property> + <property name="pageStep"> + <number>1</number> + </property> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="tickPosition"> + <enum>QSlider::TicksBothSides</enum> + </property> + <property name="tickInterval"> + <number>1</number> + </property> + </widget> + </item> + <item row="2" column="0" colspan="3"> + <spacer name="horizontalSpacer_2"> + <property name="orientation"> + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeHint" stdset="0"> + <size> + <width>40</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + </layout> + </widget> + </item> + </layout> + </widget> + <resources> + <include location="resources/battery.qrc"/> + </resources> + <connections> + <connection> + <sender>buttonBox</sender> + <signal>accepted()</signal> + <receiver>PowerManagementDialog</receiver> + <slot>accept()</slot> + <hints> + <hint type="sourcelabel"> + <x>248</x> + <y>254</y> + </hint> + <hint type="destinationlabel"> + <x>157</x> + <y>274</y> + </hint> + </hints> + </connection> + <connection> + <sender>buttonBox</sender> + <signal>rejected()</signal> + <receiver>PowerManagementDialog</receiver> + <slot>reject()</slot> + <hints> + <hint type="sourcelabel"> + <x>316</x> + <y>260</y> + </hint> + <hint type="destinationlabel"> + <x>286</x> + <y>274</y> + </hint> + </hints> + </connection> + </connections> +</ui> |