2020-08-14 10:48:15 +00:00
|
|
|
#include "IndoorTemperature.h"
|
2021-03-31 08:08:30 +00:00
|
|
|
#include "Skin.h"
|
2020-08-14 10:48:15 +00:00
|
|
|
#include "RoundedIcon.h"
|
2020-09-30 09:57:07 +00:00
|
|
|
#include "UpAndDownButton.h"
|
2020-08-14 10:48:15 +00:00
|
|
|
|
|
|
|
#include <QskBoxShapeMetrics.h>
|
|
|
|
#include <QskGraphic.h>
|
|
|
|
#include <QskGraphicLabel.h>
|
|
|
|
#include <QskPushButton.h>
|
|
|
|
#include <QskTextLabel.h>
|
|
|
|
|
|
|
|
#include <QImage>
|
|
|
|
|
2020-09-17 14:22:47 +00:00
|
|
|
IndoorTemperature::IndoorTemperature( QQuickItem* parent )
|
|
|
|
: Box( "", parent )
|
2020-08-14 10:48:15 +00:00
|
|
|
{
|
2020-09-23 15:45:06 +00:00
|
|
|
setPanel( true );
|
2020-12-17 08:45:31 +00:00
|
|
|
setPaddingHint( Panel, 8 );
|
2020-09-21 14:31:36 +00:00
|
|
|
setSizePolicy( Qt::Vertical, QskSizePolicy::Maximum );
|
2020-08-14 10:48:15 +00:00
|
|
|
|
2020-09-17 14:22:47 +00:00
|
|
|
auto* layout = new QskLinearBox( Qt::Horizontal, this );
|
|
|
|
layout->setSpacing( 20 );
|
2020-08-14 10:48:15 +00:00
|
|
|
|
2020-09-17 14:22:47 +00:00
|
|
|
QskGradient gradient( QskGradient::Vertical, "#ff7d34", "#ff3122" );
|
|
|
|
auto* icon = new RoundedIcon( "indoor-temperature", gradient, layout );
|
|
|
|
icon->setMinimumWidth( 68 );
|
|
|
|
icon->setFixedSize( 68, 68 ); // ### fix properly
|
2020-08-14 10:48:15 +00:00
|
|
|
|
2020-09-17 14:22:47 +00:00
|
|
|
auto* titleAndValue = new QskLinearBox( Qt::Vertical, layout );
|
2020-09-21 14:31:36 +00:00
|
|
|
titleAndValue->setMargins( {0, 10, 0, 0} );
|
2020-08-14 10:48:15 +00:00
|
|
|
|
2020-09-17 14:22:47 +00:00
|
|
|
auto* title = new QskTextLabel( "Indoor Temperature", titleAndValue );
|
|
|
|
title->setFontRole( DaytimeSkin::TitleFont );
|
2020-08-14 10:48:15 +00:00
|
|
|
|
2020-09-17 14:22:47 +00:00
|
|
|
auto* value = new QskTextLabel( "+24", titleAndValue );
|
|
|
|
value->setFontRole( QskSkin::HugeFont );
|
|
|
|
value->setTextColor( "#929CB2" );
|
2020-08-14 10:48:15 +00:00
|
|
|
|
2020-09-30 09:57:07 +00:00
|
|
|
auto* buttons = new UpAndDownButton( layout );
|
2020-12-17 08:28:54 +00:00
|
|
|
Q_UNUSED( buttons );
|
2020-08-14 10:48:15 +00:00
|
|
|
}
|