diff --git a/examples/iot-dashboard/BoxWithButtons.cpp b/examples/iot-dashboard/BoxWithButtons.cpp index d76c5b37..8a4c8c19 100644 --- a/examples/iot-dashboard/BoxWithButtons.cpp +++ b/examples/iot-dashboard/BoxWithButtons.cpp @@ -11,7 +11,7 @@ QSK_SUBCONTROL( BoxWithButtons, Panel ) QSK_SUBCONTROL( IndoorTemperature, Panel ) QSK_SUBCONTROL( Humidity, Panel ) -BoxWithButtons::BoxWithButtons( const QString& title, bool isBright, QQuickItem* parent ) +BoxWithButtons::BoxWithButtons( const QString& title, const QString& value, bool isBright, QQuickItem* parent ) : Box( "", parent ) { setPanel( true ); @@ -30,9 +30,9 @@ BoxWithButtons::BoxWithButtons( const QString& title, bool isBright, QQuickItem* auto* titleLabel = new QskTextLabel( title, titleAndValue ); titleLabel->setFontRole( Skin::TitleFont ); - auto* value = new QskTextLabel( "+24", titleAndValue ); - value->setFontRole( QskSkin::HugeFont ); - value->setTextColor( "#929CB2" ); + auto* valueLabel = new QskTextLabel( value, titleAndValue ); + valueLabel->setFontRole( QskSkin::HugeFont ); + valueLabel->setTextColor( "#929CB2" ); new UpAndDownButton( layout ); } diff --git a/examples/iot-dashboard/BoxWithButtons.h b/examples/iot-dashboard/BoxWithButtons.h index 7f5c96d1..a81cf2ee 100644 --- a/examples/iot-dashboard/BoxWithButtons.h +++ b/examples/iot-dashboard/BoxWithButtons.h @@ -11,7 +11,7 @@ class BoxWithButtons : public Box public: QSK_SUBCONTROLS( Panel ) - BoxWithButtons( const QString& title, bool isBright, QQuickItem* parent = nullptr ); + BoxWithButtons( const QString& title, const QString& value, bool isBright, QQuickItem* parent = nullptr ); QskAspect::Subcontrol effectiveSubcontrol( QskAspect::Subcontrol subControl ) const override @@ -31,7 +31,7 @@ class IndoorTemperature : public BoxWithButtons QSK_SUBCONTROLS( Panel ) IndoorTemperature( QQuickItem* parent ) - : BoxWithButtons( "Indoor Temperature", true, parent ) + : BoxWithButtons( "Indoor Temperature", "+24", true, parent ) { } }; @@ -42,7 +42,7 @@ class Humidity: public BoxWithButtons QSK_SUBCONTROLS( Panel ) Humidity( QQuickItem* parent ) - : BoxWithButtons( "Humidity", false, parent ) + : BoxWithButtons( "Humidity", "30%", false, parent ) { } };