IOT dashboard: Add more dummy pages

This commit is contained in:
Peter Hartmann 2023-01-02 09:42:41 +01:00 committed by uwerat
parent 39d75edda0
commit c904f33cf1
11 changed files with 181 additions and 2 deletions

View File

@ -0,0 +1,21 @@
/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#include "DevicesPage.h"
#include <QskSkin.h>
#include <QskTextLabel.h>
QSK_SUBCONTROL( DevicesPage, Panel )
DevicesPage::DevicesPage( QQuickItem* parent )
: QskLinearBox( Qt::Vertical, parent )
{
auto* const textLabel = new QskTextLabel( "devices page", this );
textLabel->setAlignmentHint( QskTextLabel::Text, Qt::AlignCenter );
textLabel->setFontRole( QskSkin::HugeFont );
}
#include "moc_DevicesPage.cpp"

View File

@ -0,0 +1,19 @@
/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#pragma once
#include <QskGridBox.h>
#include <QskLinearBox.h>
class DevicesPage : public QskLinearBox
{
Q_OBJECT
public:
QSK_SUBCONTROLS( Panel )
DevicesPage( QQuickItem* parent );
};

View File

@ -1,8 +1,12 @@
#include "MainItem.h"
#include "DashboardPage.h"
#include "DevicesPage.h"
#include "MenuBar.h"
#include "MembersPage.h"
#include "RoomsPage.h"
#include "StatisticsPage.h"
#include "StoragePage.h"
#include <QskGesture.h>
#include <QskEvent.h>
@ -108,9 +112,17 @@ MainItem::MainItem( QQuickItem* parent )
auto* const dashboardPage = new DashboardPage( m_cube );
auto* const roomsPage = new RoomsPage( m_cube );
auto* const devicesPage = new DevicesPage( m_cube );
auto* const statisticsPage = new StatisticsPage( m_cube );
auto* const storagePage = new StoragePage( m_cube );
auto* const membersPage = new MembersPage( m_cube );
m_cube->addItem( dashboardPage );
m_cube->addItem( roomsPage );
m_cube->addItem( devicesPage );
m_cube->addItem( statisticsPage );
m_cube->addItem( storagePage );
m_cube->addItem( membersPage );
m_cube->setCurrentItem( dashboardPage );
}

View File

@ -0,0 +1,21 @@
/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#include "MembersPage.h"
#include <QskSkin.h>
#include <QskTextLabel.h>
QSK_SUBCONTROL( MembersPage, Panel )
MembersPage::MembersPage( QQuickItem* parent )
: QskLinearBox( Qt::Vertical, parent )
{
auto* const textLabel = new QskTextLabel( "members page", this );
textLabel->setAlignmentHint( QskTextLabel::Text, Qt::AlignCenter );
textLabel->setFontRole( QskSkin::HugeFont );
}
#include "moc_MembersPage.cpp"

View File

@ -0,0 +1,19 @@
/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#pragma once
#include <QskGridBox.h>
#include <QskLinearBox.h>
class MembersPage : public QskLinearBox
{
Q_OBJECT
public:
QSK_SUBCONTROLS( Panel )
MembersPage( QQuickItem* parent );
};

View File

@ -65,7 +65,6 @@ void MenuBar::setActivePage( const int index )
{
m_entries.at( m_currentIndex )->setChecked( false );
m_currentIndex = index;
m_entries.at( m_currentIndex )->setChecked( true );
}
#include "moc_MenuBar.cpp"

View File

@ -0,0 +1,21 @@
/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#include "StatisticsPage.h"
#include <QskSkin.h>
#include <QskTextLabel.h>
QSK_SUBCONTROL( StatisticsPage, Panel )
StatisticsPage::StatisticsPage( QQuickItem* parent )
: QskLinearBox( Qt::Vertical, parent )
{
auto* const textLabel = new QskTextLabel( "statistics page", this );
textLabel->setAlignmentHint( QskTextLabel::Text, Qt::AlignCenter );
textLabel->setFontRole( QskSkin::HugeFont );
}
#include "moc_StatisticsPage.cpp"

View File

@ -0,0 +1,19 @@
/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#pragma once
#include <QskGridBox.h>
#include <QskLinearBox.h>
class StatisticsPage : public QskLinearBox
{
Q_OBJECT
public:
QSK_SUBCONTROLS( Panel )
StatisticsPage( QQuickItem* parent );
};

View File

@ -0,0 +1,21 @@
/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#include "StoragePage.h"
#include <QskSkin.h>
#include <QskTextLabel.h>
QSK_SUBCONTROL( StoragePage, Panel )
StoragePage::StoragePage( QQuickItem* parent )
: QskLinearBox( Qt::Vertical, parent )
{
auto* const textLabel = new QskTextLabel( "storage page", this );
textLabel->setAlignmentHint( QskTextLabel::Text, Qt::AlignCenter );
textLabel->setFontRole( QskSkin::HugeFont );
}
#include "moc_StoragePage.cpp"

View File

@ -0,0 +1,19 @@
/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#pragma once
#include <QskGridBox.h>
#include <QskLinearBox.h>
class StoragePage : public QskLinearBox
{
Q_OBJECT
public:
QSK_SUBCONTROLS( Panel )
StoragePage( QQuickItem* parent );
};

View File

@ -6,6 +6,7 @@ SOURCES += \
CircularProgressBar.cpp \
CircularProgressBarSkinlet.cpp \
DashboardPage.cpp \
DevicesPage.cpp \
Diagram.cpp \
DiagramSkinlet.cpp \
EnergyMeter.cpp \
@ -14,16 +15,19 @@ SOURCES += \
LightDisplaySkinlet.cpp \
LightDisplay.cpp \
MainItem.cpp \
MainWindow.cpp \
MenuBar.cpp \
MembersPage.cpp \
MyDevices.cpp \
RoomsPage.cpp \
RoundedIcon.cpp \
Skin.cpp \
StatisticsPage.cpp \
StoragePage.cpp \
TopBar.cpp \
RoundButton.cpp \
UsageBox.cpp \
UsageDiagram.cpp \
MainWindow.cpp \
main.cpp \
SOURCES += \
@ -44,13 +48,17 @@ HEADERS += \
LightDisplaySkinlet.h \
LightDisplay.h \
DashboardPage.h \
DevicesPage.h \
MainItem.h \
MainWindow.h \
MembersPage.h \
MenuBar.h \
MyDevices.h \
RoomsPage.h \
RoundedIcon.h \
Skin.h \
StatisticsPage.h \
StoragePage.h \
TopBar.h \
RoundButton.h \
UsageBox.h \