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.
24 lines
440 B
C++
24 lines
440 B
C++
#ifndef SPEEDOMETER_H
|
|
#define SPEEDOMETER_H
|
|
|
|
#include <QskRangeControl.h>
|
|
|
|
class Speedometer : public QskRangeControl
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
QSK_SUBCONTROLS( Panel, Labels, NeedleHead, Needle )
|
|
|
|
Speedometer( QQuickItem* parent = nullptr );
|
|
|
|
QVector< QString > labels() const;
|
|
void setLabels( const QVector< QString >& labels );
|
|
|
|
private:
|
|
float m_labelsStep;
|
|
QVector< QString > m_labels;
|
|
};
|
|
|
|
#endif // SPEEDOMETER_H
|