Where is the source of CircularGauge?
Solved
QML and Qt Quick
-
Looks like it is implemented in QML: https://code.woboq.org/qt5/qtquickcontrols/src/extras/plugin.cpp.html#83
-
Dear @sierdzio it is just registration of CircularGauge. Is it implemented by qml itself or it is implemented in C++ by inheritance of QGSNode/QPainter?
Also I have a look at CircularGauge.qml :
Control { id: circularGauge style: Settings.styleComponent(Settings.style, "CircularGaugeStyle.qml", circularGauge) /*! \qmlproperty real CircularGauge::minimumValue This property holds the smallest value displayed by the gauge. */ property alias minimumValue: range.minimumValue /*! \qmlproperty real CircularGauge::maximumValue This property holds the largest value displayed by the gauge. */ property alias maximumValue: range.maximumValue /*! This property holds the current value displayed by the gauge, which will always be between \l minimumValue and \l maximumValue, inclusive. */ property alias value: range.value /*! \qmlproperty real CircularGauge::stepSize This property holds the size of the value increments that the needle displays. For example, when stepSize is \c 10 and value is \c 0, adding \c 5 to \l value will have no visible effect on the needle, although \l value will still be incremented. Adding an extra \c 5 to \l value will then cause the needle to point to \c 10. */ property alias stepSize: range.stepSize /*! This property determines whether or not the gauge displays tickmarks, minor tickmarks, and labels. For more fine-grained control over what is displayed, the following style components of \l CircularGaugeStyle can be used: \list \li \l {CircularGaugeStyle::}{tickmark} \li \l {CircularGaugeStyle::}{minorTickmark} \li \l {CircularGaugeStyle::}{tickmarkLabel} \endlist */ property bool tickmarksVisible: true RangeModel { id: range minimumValue: 0 maximumValue: 100 stepSize: 0 value: minimumValue } }
Is it the whole implementation?!
-
See
qtquickcontrols/src/extras/Styles/Flat/CircularGaugeStyle.qml
It's implemented in QML, as I said already, and in a pretty bad way, too (2 Canvas elements...).