hmi-demo code uncrustified
This commit is contained in:
parent
fffc983bb7
commit
d3be6aaa27
|
@ -65,8 +65,8 @@ static inline QFont qskFont( int pointSize )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DefaultSkin::DefaultSkin( const QString &name, QObject *parent )
|
DefaultSkin::DefaultSkin( const QString& name, QObject* parent ) :
|
||||||
: QskSkin( parent ),
|
QskSkin( parent ),
|
||||||
m_name( name ),
|
m_name( name ),
|
||||||
m_palette( new Palette ),
|
m_palette( new Palette ),
|
||||||
m_scheme( Daylight )
|
m_scheme( Daylight )
|
||||||
|
|
|
@ -14,7 +14,8 @@ public:
|
||||||
void toggleScheme();
|
void toggleScheme();
|
||||||
void resetColors();
|
void resetColors();
|
||||||
|
|
||||||
enum Scheme {
|
enum Scheme
|
||||||
|
{
|
||||||
Daylight,
|
Daylight,
|
||||||
Nighttime
|
Nighttime
|
||||||
};
|
};
|
||||||
|
|
|
@ -12,15 +12,16 @@
|
||||||
#include <QDate>
|
#include <QDate>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
namespace {
|
namespace
|
||||||
|
{
|
||||||
void addIcon( QskLayout* layout, const QString& fileName )
|
void addIcon( QskLayout* layout, const QString& fileName )
|
||||||
{
|
{
|
||||||
QImage buildIcon( fileName );
|
const QImage buildIcon( fileName );
|
||||||
QskGraphic graphic = QskGraphic::fromImage( buildIcon );
|
|
||||||
QskGraphicLabel* buildLabel = new QskGraphicLabel( layout );
|
QskGraphicLabel* buildLabel = new QskGraphicLabel( layout );
|
||||||
buildLabel->setFixedSize( 76, 36 );
|
buildLabel->setFixedSize( 76, 36 );
|
||||||
buildLabel->setMargins( QMarginsF( 20, 7, 20, 7 ) );
|
buildLabel->setMargins( QMarginsF( 20, 7, 20, 7 ) );
|
||||||
buildLabel->setGraphic( graphic );
|
buildLabel->setGraphic( QskGraphic::fromImage( buildIcon ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,8 +42,8 @@ static inline QFont qskFont( int pointSize )
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OtherSkin::OtherSkin( const QString &name, QObject *parent )
|
OtherSkin::OtherSkin( const QString& name, QObject* parent ) :
|
||||||
: QskSkin( parent ),
|
QskSkin( parent ),
|
||||||
m_name( name ),
|
m_name( name ),
|
||||||
m_palette( new Palette )
|
m_palette( new Palette )
|
||||||
{
|
{
|
||||||
|
@ -75,7 +75,6 @@ void OtherSkin::initHints()
|
||||||
|
|
||||||
setColor( BalanceFadeBox::Panel, m_palette->color5 );
|
setColor( BalanceFadeBox::Panel, m_palette->color5 );
|
||||||
setMetric( BalanceFadeBox::Panel | QskAspect::Radius, 15 );
|
setMetric( BalanceFadeBox::Panel | QskAspect::Radius, 15 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
OtherSkin::~OtherSkin()
|
OtherSkin::~OtherSkin()
|
||||||
|
|
|
@ -8,8 +8,9 @@
|
||||||
#include <QskTabButton.h>
|
#include <QskTabButton.h>
|
||||||
#include <QskTextLabel.h>
|
#include <QskTextLabel.h>
|
||||||
|
|
||||||
RadioControl::RadioControl( QQuickItem* parent ) : QskControl( parent )
|
RadioControl::RadioControl( QQuickItem* parent ):
|
||||||
, m_currentBand( "FM" )
|
QskControl( parent ),
|
||||||
|
m_currentBand( "FM" )
|
||||||
{
|
{
|
||||||
setMargins( QMarginsF( 40, 30, 40, 30 ) );
|
setMargins( QMarginsF( 40, 30, 40, 30 ) );
|
||||||
setAutoLayoutChildren( true );
|
setAutoLayoutChildren( true );
|
||||||
|
|
|
@ -36,7 +36,8 @@ QskAspect::Subcontrol BalanceFadeBox::effectiveSubcontrol(
|
||||||
|
|
||||||
class StackedControl : public QskControl {
|
class StackedControl : public QskControl {
|
||||||
public:
|
public:
|
||||||
StackedControl( QQuickItem* parent = nullptr ) : QskControl( parent ),
|
StackedControl( QQuickItem* parent = nullptr ):
|
||||||
|
QskControl( parent ),
|
||||||
m_offset( 0.0, 0.0 )
|
m_offset( 0.0, 0.0 )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -95,7 +96,8 @@ private:
|
||||||
QPointF m_offset;
|
QPointF m_offset;
|
||||||
};
|
};
|
||||||
|
|
||||||
SoundControl::SoundControl( QQuickItem *parent ) : QskControl( parent )
|
SoundControl::SoundControl( QQuickItem* parent ):
|
||||||
|
QskControl( parent )
|
||||||
{
|
{
|
||||||
setMargins( QMarginsF( 40, 20, 40, 20 ) );
|
setMargins( QMarginsF( 40, 20, 40, 20 ) );
|
||||||
setAutoLayoutChildren( true );
|
setAutoLayoutChildren( true );
|
||||||
|
|
|
@ -63,6 +63,7 @@ int main( int argc, char **argv )
|
||||||
|
|
||||||
MainWindow mainWindow;
|
MainWindow mainWindow;
|
||||||
mainWindow.show();
|
mainWindow.show();
|
||||||
|
|
||||||
return app.exec();
|
return app.exec();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue