/******************************************************************************
* Copyright (C) 2021 Edelhirsch Software GmbH
* This file may be used under the terms of the 3-clause BSD License
*****************************************************************************/
#pragma once
#include "Box.h"
#include "RoundedIcon.h"
#include <QskBoxShapeMetrics.h>
#include <QskTextLabel.h>
class ButtonValueLabel : public QskTextLabel
{
Q_OBJECT
public:
QSK_SUBCONTROLS( Text )
ButtonValueLabel( const QString& text, QQuickItem* parent )
: QskTextLabel( text, parent )
}
QskAspect::Subcontrol effectiveSubcontrol(
QskAspect::Subcontrol subControl ) const override final
if( subControl == QskTextLabel::Text )
return Text;
return subControl;
};
class TitleAndValueBox : public QskLinearBox
QSK_SUBCONTROLS( Panel )
TitleAndValueBox( Qt::Orientation orientation, QQuickItem* parent )
: QskLinearBox( orientation, parent )
setPanel( true );
if( subControl == QskLinearBox::Panel )
return Panel;
class BoxWithButtons : public Box
BoxWithButtons( const QString& title, const QString& value, bool isBright, QQuickItem* parent = nullptr );
QskAspect::Subcontrol subControl ) const override
if( subControl == QskBox::Panel )
class IndoorTemperature : public BoxWithButtons
IndoorTemperature( QQuickItem* parent )
: BoxWithButtons( "Indoor Temperature", "+24", true, parent )
class Humidity : public BoxWithButtons
Humidity( QQuickItem* parent )
: BoxWithButtons( "Humidity", "30%", false, parent )