Mentions légales du service

Skip to content

Feature/scientific-spinbox-real-integer

KLOCZKO Thibaud requested to merge feature/qt6 into develop

close #1 (closed)

Warning ! This merge request removes the X.SpinBoxLong and X.SpinboxDouble and replaces them with X.ScientificSpinBoxInteger and X.ScientificSpinBoxReal. It is thus necessary to adapt the client code.

In order to manage long long int, we had to use QVariant as numerical type because QML only handles int32. However, internally, in the c++ code, we store the from, to and value as long long int. QVariant is only used to transfer the data from c++ to JS and conversely.

The main properties of these new items are:

  • value (Read Write, QVariant or double)
  • from (RW, QVariant or double)
  • to (RW, QVariant or double)
  • increment (int RW)
  • decimals (int RW for Real spinbox only)
  • Notation (Enum RW property that can be either Standard or Scientific for Real spinbox only)
  • editable (bool RW)
  • gaugeControl (Enum RW)
  • enableGauge (bool RW)

The enableGauge property is true by default and activates a slider, materialized as a gauge, inside the spinbox. This gauge can be control through two fashions:

  • a linear control: the value varies linearly between fromand to
  • a polynomial control: when the range [from, to] is large, this control enables to flat the scale (in a similar way than a Log scale) and allows to easily get value in the whole range

By default, the linear control is enabled for Integer spinbox while the polynomial control is enabled for real spinbox. Moreover when the range is far too big, the gauge and the gauge control are automatically inactivated.

Edited by KLOCZKO Thibaud

Merge request reports