qskinny/examples/iot-dashboard/TopBar.h

40 lines
793 B
C++

#pragma once
#include <QskLinearBox.h>
#include <QGradient>
class TopBarItem : public QskLinearBox
{
Q_OBJECT
public:
TopBarItem( const QString& name, const QColor& textColor, const QGradient& gradient, int progress, int value, QQuickItem* parent );
private:
QString m_name;
};
class TopBar : public QskLinearBox
{
Q_OBJECT
public:
QSK_SUBCONTROLS( Panel )
TopBar( QQuickItem* parent );
QskAspect::Subcontrol effectiveSubcontrol(
QskAspect::Subcontrol subControl ) const override final
{
if( subControl == QskLinearBox::Panel )
{
return Panel;
}
return subControl;
}
private:
QList< TopBarItem* > m_entries;
};