diff options
author | 2016-10-26 15:53:34 +0200 | |
---|---|---|
committer | 2016-10-26 15:53:34 +0200 | |
commit | d19555c038f6f1f89f08f12c88908d84b32b1bbf (patch) | |
tree | 548d19680235aa91bc7a4948d78553e8f4a5c27b /HomeScreenSimulator | |
parent | 4e34fd88f65f8c1cd094ed24bd62d2c7f5418080 (diff) |
Implement toggle full screen mechanism.
Signed-off-by: Bocklage, Jens <Jens_Bocklage@mentor.com>
Diffstat (limited to 'HomeScreenSimulator')
-rw-r--r-- | HomeScreenSimulator/resources/mainwindow.ui | 20 | ||||
-rw-r--r-- | HomeScreenSimulator/src/mainwindow.cpp | 14 | ||||
-rw-r--r-- | HomeScreenSimulator/src/mainwindow.h | 4 |
3 files changed, 36 insertions, 2 deletions
diff --git a/HomeScreenSimulator/resources/mainwindow.ui b/HomeScreenSimulator/resources/mainwindow.ui index 6c6e7d0..dcdf2e7 100644 --- a/HomeScreenSimulator/resources/mainwindow.ui +++ b/HomeScreenSimulator/resources/mainwindow.ui @@ -39,7 +39,7 @@ <widget class="QPushButton" name="pushButton_Update"> <property name="geometry"> <rect> - <x>20</x> + <x>30</x> <y>380</y> <width>211</width> <height>27</height> @@ -214,6 +214,24 @@ </property> </widget> </widget> + <widget class="QWidget" name="tab_FullScreen"> + <attribute name="title"> + <string>FullScreen</string> + </attribute> + <widget class="QPushButton" name="pushButton_ToggleFullScreen"> + <property name="geometry"> + <rect> + <x>80</x> + <y>50</y> + <width>161</width> + <height>27</height> + </rect> + </property> + <property name="text"> + <string>Toggle full screen</string> + </property> + </widget> + </widget> <widget class="QWidget" name="tab_FutureFeatures"> <attribute name="title"> <string>Future features</string> diff --git a/HomeScreenSimulator/src/mainwindow.cpp b/HomeScreenSimulator/src/mainwindow.cpp index 743c854..272adfc 100644 --- a/HomeScreenSimulator/src/mainwindow.cpp +++ b/HomeScreenSimulator/src/mainwindow.cpp @@ -23,7 +23,8 @@ MainWindow::MainWindow(QWidget *parent) : mp_dBusDayNightModeAdapter(0), mp_dBusStatusBarProxy(0), mp_dBusPopupProxy(0), - mp_dBusProximityProxy(0) + mp_dBusProximityProxy(0), + mp_dBusHomeScreenProxy(0) { mp_ui->setupUi(this); @@ -48,6 +49,11 @@ MainWindow::MainWindow(QWidget *parent) : "/Proximity", QDBusConnection::sessionBus(), 0); + mp_dBusHomeScreenProxy = new org::agl::homescreen("org.agl.homescreen", + "/HomeScreen", + QDBusConnection::sessionBus(), + 0); + QSettings settings; this->move(settings.value("homescreensimulator/pos").toPoint()); mp_ui->radioButton_DayMode->setChecked(settings.value("homescreensimulator/daymode", true).toBool()); // if nothing is stored, use "true" @@ -61,6 +67,7 @@ MainWindow::~MainWindow() settings.setValue("homescreensimulator/daymode", mp_ui->radioButton_DayMode->isChecked()); settings.setValue("homescreensimulator/nightmode", mp_ui->radioButton_NightMode->isChecked()); + delete mp_dBusHomeScreenProxy; delete mp_dBusProximityProxy; delete mp_dBusPopupProxy; delete mp_dBusStatusBarProxy; @@ -170,3 +177,8 @@ void MainWindow::on_checkBox_ObjectDetected_clicked() { mp_dBusProximityProxy->setObjectDetected(Qt::Checked == mp_ui->checkBox_ObjectDetected->checkState()); } + +void MainWindow::on_pushButton_ToggleFullScreen_clicked() +{ + mp_dBusHomeScreenProxy->toggleFullScreen(); +} diff --git a/HomeScreenSimulator/src/mainwindow.h b/HomeScreenSimulator/src/mainwindow.h index 702a338..ca368f0 100644 --- a/HomeScreenSimulator/src/mainwindow.h +++ b/HomeScreenSimulator/src/mainwindow.h @@ -24,6 +24,7 @@ #include "statusbar_proxy.h" #include "popup_proxy.h" #include "proximity_proxy.h" +#include "homescreen_proxy.h" namespace Ui { class MainWindow; @@ -62,12 +63,15 @@ private slots: void on_checkBox_ObjectDetected_clicked(); + void on_pushButton_ToggleFullScreen_clicked(); + private: Ui::MainWindow *mp_ui; DaynightmodeAdaptor *mp_dBusDayNightModeAdapter; org::agl::statusbar *mp_dBusStatusBarProxy; org::agl::popup *mp_dBusPopupProxy; org::agl::proximity *mp_dBusProximityProxy; + org::agl::homescreen *mp_dBusHomeScreenProxy; }; #endif // MAINWINDOW_H |