60a4f2ff1f
* Speedometer: Inherit from QskRangeControl We don't need start/endAngle() etc. and value() anymore, but can use the methods from QskRangeControl. * Speedometer: Make it skinnable * automotive example: Only use two specially created skins ... because the default skins do not have hints for e.g. the speedometer. Also, display the speedometer page by default.
27 lines
513 B
C++
27 lines
513 B
C++
#include "Speedometer.h"
|
|
|
|
#include <QskSkinlet.h>
|
|
#include <QskSkinnable.h>
|
|
|
|
QSK_SUBCONTROL( Speedometer, Panel )
|
|
QSK_SUBCONTROL( Speedometer, Labels )
|
|
QSK_SUBCONTROL( Speedometer, NeedleHead )
|
|
QSK_SUBCONTROL( Speedometer, Needle )
|
|
|
|
Speedometer::Speedometer( QQuickItem* parent ) :
|
|
QskRangeControl( parent )
|
|
{
|
|
}
|
|
|
|
QVector< QString > Speedometer::labels() const
|
|
{
|
|
return m_labels;
|
|
}
|
|
|
|
void Speedometer::setLabels( const QVector< QString >& labels )
|
|
{
|
|
m_labels = labels;
|
|
}
|
|
|
|
#include "moc_Speedometer.cpp"
|