cadMousePro-gui/src/MouseMainWindow.h
branchv_0
changeset 21 642f32f76c9d
parent 20 cfb5f62ea048
child 26 fff8e9a86e85
--- a/cadMousePro-gui/src/MouseMainWindow.h	Tue Sep 03 23:55:00 2019 +0200
+++ b/cadMousePro-gui/src/MouseMainWindow.h	Wed Sep 04 19:41:21 2019 +0200
@@ -25,9 +25,11 @@
 #include <QButtonGroup>
 #include <QLineEdit>
 #include <QLabel>
+#include <QProgressBar>
 #include <QtDBus/QDBusConnection>
 
 #include "generated-sources/Proxy.h"
+#include "generated-sources/UPowerProxy.h"
 
 class MouseMainWindow : public QMainWindow {
 	Q_OBJECT
@@ -43,6 +45,7 @@
 	QCheckBox* statusUPower = new QCheckBox("connected to UPower", this);
 	QCheckBox* statusDevice = new QCheckBox("mouse found", this);
 	QLabel* statusName = new QLabel(this);
+	QProgressBar* statusBattery = new QProgressBar(this);
 
 	QCheckBox* configureSmartScrolling = new QCheckBox("smart scrolling (free wheel)", this);
 	QCheckBox* configureLiftOffDetection = new QCheckBox("lift-off detection", this);
@@ -55,12 +58,15 @@
 
 	QDBusConnection connection = QDBusConnection::systemBus();
 	InfoGlobalcodeMouseCadMouseProInterface* proxy;
+	OrgFreedesktopUPowerInterface* upowerProxy;
 
 	void initStatusPanel();
 	void initConfigurationPanel();
 	void initAboutPanel();
 	
 	void appendAboutLine(QFormLayout* layout, const QString& label, const QString& value, QWidget* parent);
+	
+	int getBatteryLevel();
 
 private slots:
 	void refresh();