/*
- * Copyright (C) 2016 Mentor Graphics Development (Deutschland) GmbH
+ * Copyright (C) 2016, 2017 Mentor Graphics Development (Deutschland) GmbH
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
mp_ui(new Ui::MainWindow),
- mp_dBusDayNightModeAdapter(0),
+ mp_dBusDayNightModeAdaptor(0),
mp_dBusStatusBarProxy(0),
mp_dBusPopupProxy(0),
- mp_dBusProximityProxy(0)
+ mp_dBusProximityProxy(0),
+ mp_dBusHomeScreenProxy(0)
{
mp_ui->setupUi(this);
QDBusConnection dbus = QDBusConnection::sessionBus();
// publish dbus day night mode interface
- mp_dBusDayNightModeAdapter = new DaynightmodeAdaptor((QObject*)this);
+ mp_dBusDayNightModeAdaptor = new DaynightmodeAdaptor((QObject*)this);
dbus.registerService("org.agl.homescreen.simulator");
dbus.registerObject("/", this);
"/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"
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;
- if (0 == mp_dBusDayNightModeAdapter)
+ if (0 == mp_dBusDayNightModeAdaptor)
{
- delete mp_dBusDayNightModeAdapter;
+ delete mp_dBusDayNightModeAdaptor;
}
delete mp_ui;
}