qskinny/examples/iot-dashboard/MainContent.h

69 lines
1.4 KiB
C
Raw Normal View History

2020-05-22 09:48:05 +00:00
#ifndef MAINCONTENT_H
#define MAINCONTENT_H
2021-03-26 16:03:02 +00:00
#include <QskGridBox.h>
2020-05-22 09:48:05 +00:00
#include <QskLinearBox.h>
class ShadowBox;
class ShadowedRectangle;
class ShadowPositioner : public QskControl
{
Q_OBJECT
public:
ShadowPositioner( QQuickItem* parent );
void updateLayout() override;
void setGridBox( QskGridBox* gridBox );
private:
QskGridBox* m_gridBox;
QVector<ShadowedRectangle*> m_rectangles;
};
2021-03-26 16:03:02 +00:00
class MainContentGridBox : public QskGridBox
{
Q_OBJECT
public:
QSK_SUBCONTROLS( Panel )
MainContentGridBox( QQuickItem* parent = nullptr )
: QskGridBox( parent )
{
}
QskAspect::Subcontrol effectiveSubcontrol(
QskAspect::Subcontrol subControl ) const override final
{
if( subControl == QskGridBox::Panel )
{
return Panel;
}
return subControl;
}
};
2020-05-22 09:48:05 +00:00
class MainContent : public QskLinearBox
{
2020-09-16 16:38:17 +00:00
Q_OBJECT
2020-05-22 09:48:05 +00:00
2020-09-16 16:38:17 +00:00
public:
2020-09-23 15:45:06 +00:00
QSK_SUBCONTROLS( Panel )
2020-09-16 16:38:17 +00:00
MainContent( QQuickItem* parent );
2020-05-22 09:48:05 +00:00
2020-09-23 15:45:06 +00:00
QskAspect::Subcontrol effectiveSubcontrol(
QskAspect::Subcontrol subControl ) const override final;
protected:
2020-12-17 08:28:54 +00:00
void geometryChangeEvent( QskGeometryChangeEvent* ) override;
2020-09-16 16:38:17 +00:00
private:
QList< QskLinearBox* > m_columns;
ShadowPositioner* m_shadowPositioner;
2020-05-22 09:48:05 +00:00
};
#endif // MAINCONTENT_H