X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=HomeScreenSimulator%2Fsrc%2Fmainwindow.cpp;h=272adfc51c5286947a5ac1f8183120c0baa18ee5;hb=d19555c038f6f1f89f08f12c88908d84b32b1bbf;hp=743c8541b83fe3b805e1f339a2fe9323e4ba5dff;hpb=4e34fd88f65f8c1cd094ed24bd62d2c7f5418080;p=staging%2FHomeScreen.git 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(); +}