Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Where is the source of CircularGauge?

Where is the source of CircularGauge?

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 2 Posters 943 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • AlienA Offline
    AlienA Offline
    Alien
    wrote on last edited by
    #1

    Hey,

    I want to know how QT's developers implement CircularGauge I don't know if they implement it in C++ or just made it in qml?
    In both case where is the source code?

    Yours,
    Alien

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      Looks like it is implemented in QML: https://code.woboq.org/qt5/qtquickcontrols/src/extras/plugin.cpp.html#83

      (Z(:^

      AlienA 1 Reply Last reply
      4
      • sierdzioS sierdzio

        Looks like it is implemented in QML: https://code.woboq.org/qt5/qtquickcontrols/src/extras/plugin.cpp.html#83

        AlienA Offline
        AlienA Offline
        Alien
        wrote on last edited by Alien
        #3

        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?!

        1 Reply Last reply
        0
        • sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #4

          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...).

          (Z(:^

          1 Reply Last reply
          2

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved