|
|
@ -12,22 +12,24 @@ |
|
|
|
#include <QLocale>
|
|
|
|
|
|
|
|
#include "zoneitem.h"
|
|
|
|
#include "settings.h"
|
|
|
|
#include "mainwindow.h"
|
|
|
|
|
|
|
|
MainWindow::MainWindow(QWidget *parent) : |
|
|
|
QMainWindow(parent) |
|
|
|
{ |
|
|
|
Settings *s = Settings::getInstance(); |
|
|
|
|
|
|
|
/*
|
|
|
|
* Sensors-related layout |
|
|
|
*/ |
|
|
|
QGridLayout *mainLayout = new QGridLayout; |
|
|
|
|
|
|
|
mainLayout->addWidget(new ZoneItem(tr("Living room"), this), 0, 0); |
|
|
|
mainLayout->addWidget(new ZoneItem(tr("Workspace"), this), 0, 1); |
|
|
|
mainLayout->addWidget(new ZoneItem(s->m_rooms_names[0], this), 0, 0); |
|
|
|
mainLayout->addWidget(new ZoneItem(s->m_rooms_names[1], this), 0, 1); |
|
|
|
mainLayout->addWidget(new QPushButton(tr("Menu")), 0, 2); |
|
|
|
mainLayout->addWidget(new ZoneItem(tr("Bathroom"), this), 1, 0); |
|
|
|
mainLayout->addWidget(new ZoneItem(tr("Bedroom"), this), 1, 1); |
|
|
|
mainLayout->addWidget(new ZoneItem(s->m_rooms_names[2], this), 1, 0); |
|
|
|
mainLayout->addWidget(new ZoneItem(s->m_rooms_names[3], this), 1, 1); |
|
|
|
mainLayout->addWidget(new QPushButton(tr("Auto")), 1, 2); |
|
|
|
|
|
|
|
QWidget *mainWidget = new QWidget; |
|
|
|