|
@@ -102,8 +102,8 @@ public:
|
|
|
/// When setting this property, the maximum is adjusted if necessary
|
|
|
/// to ensure that the range remains valid.
|
|
|
/// Also the slider's current value is adjusted to be within the new range.
|
|
|
- double minimum()const;
|
|
|
- void setMinimum(double minimum);
|
|
|
+ virtual double minimum()const;
|
|
|
+ virtual void setMinimum(double minimum);
|
|
|
|
|
|
///
|
|
|
/// This property holds the sliders and spinbox minimum value.
|
|
@@ -111,11 +111,11 @@ public:
|
|
|
/// When setting this property, the maximum is adjusted if necessary
|
|
|
/// to ensure that the range remains valid.
|
|
|
/// Also the slider's current value is adjusted to be within the new range.
|
|
|
- double maximum()const;
|
|
|
- void setMaximum(double maximum);
|
|
|
+ virtual double maximum()const;
|
|
|
+ virtual void setMaximum(double maximum);
|
|
|
/// Description
|
|
|
/// Utility function that set the min/max in once
|
|
|
- void setRange(double min, double max);
|
|
|
+ virtual void setRange(double min, double max);
|
|
|
|
|
|
///
|
|
|
/// This property holds the current slider position.
|
|
@@ -127,63 +127,63 @@ public:
|
|
|
/// This property holds the slider and spinbox current value.
|
|
|
/// ctkSliderWidget forces the value to be within the
|
|
|
/// legal range: minimum <= value <= maximum.
|
|
|
- double value()const;
|
|
|
+ virtual double value()const;
|
|
|
|
|
|
///
|
|
|
/// This property holds the single step.
|
|
|
/// The smaller of two natural steps that the
|
|
|
/// slider provides and typically corresponds to the
|
|
|
/// user pressing an arrow key.
|
|
|
- double singleStep()const;
|
|
|
- void setSingleStep(double step);
|
|
|
+ virtual double singleStep()const;
|
|
|
+ virtual void setSingleStep(double step);
|
|
|
|
|
|
///
|
|
|
/// This property holds the page step.
|
|
|
/// The larger of two natural steps that an abstract slider provides and
|
|
|
/// typically corresponds to the user pressing PageUp or PageDown.
|
|
|
- double pageStep()const;
|
|
|
- void setPageStep(double step);
|
|
|
+ virtual double pageStep()const;
|
|
|
+ virtual void setPageStep(double step);
|
|
|
|
|
|
///
|
|
|
/// Return the decimals property value.
|
|
|
/// \sa decimals, setDecimals(), decimalsChanged()
|
|
|
- int decimals()const;
|
|
|
+ virtual int decimals()const;
|
|
|
|
|
|
///
|
|
|
/// This property holds the spin box's prefix.
|
|
|
/// The prefix is prepended to the start of the displayed value.
|
|
|
/// Typical use is to display a unit of measurement or a currency symbol
|
|
|
- QString prefix()const;
|
|
|
- void setPrefix(const QString& prefix);
|
|
|
+ virtual QString prefix()const;
|
|
|
+ virtual void setPrefix(const QString& prefix);
|
|
|
|
|
|
///
|
|
|
/// This property holds the spin box's suffix.
|
|
|
/// The suffix is appended to the end of the displayed value.
|
|
|
/// Typical use is to display a unit of measurement or a currency symbol
|
|
|
- QString suffix()const;
|
|
|
- void setSuffix(const QString& suffix);
|
|
|
+ virtual QString suffix()const;
|
|
|
+ virtual void setSuffix(const QString& suffix);
|
|
|
|
|
|
///
|
|
|
/// This property holds the interval between tickmarks.
|
|
|
/// This is a value interval, not a pixel interval.
|
|
|
/// If it is 0, the slider will choose between lineStep() and pageStep().
|
|
|
/// The default value is 0.
|
|
|
- double tickInterval()const;
|
|
|
- void setTickInterval(double tick);
|
|
|
+ virtual double tickInterval()const;
|
|
|
+ virtual void setTickInterval(double tick);
|
|
|
|
|
|
///
|
|
|
/// This property holds the tickmark position for the slider.
|
|
|
/// The valid values are described by the QSlider::TickPosition enum.
|
|
|
/// The default value is QSlider::NoTicks.
|
|
|
- void setTickPosition(QSlider::TickPosition position);
|
|
|
- QSlider::TickPosition tickPosition()const;
|
|
|
+ virtual void setTickPosition(QSlider::TickPosition position);
|
|
|
+ virtual QSlider::TickPosition tickPosition()const;
|
|
|
|
|
|
///
|
|
|
/// This property holds the alignment of the spin box.
|
|
|
/// Possible Values are Qt::AlignLeft, Qt::AlignRight, and Qt::AlignHCenter.
|
|
|
/// By default, the alignment is Qt::AlignLeft
|
|
|
- void setSpinBoxAlignment(Qt::Alignment alignment);
|
|
|
- Qt::Alignment spinBoxAlignment()const;
|
|
|
+ virtual void setSpinBoxAlignment(Qt::Alignment alignment);
|
|
|
+ virtual Qt::Alignment spinBoxAlignment()const;
|
|
|
|
|
|
///
|
|
|
/// This property holds whether slider tracking is enabled.
|
|
@@ -191,16 +191,16 @@ public:
|
|
|
/// signal while the slider or spinbox is being dragged. If tracking is
|
|
|
/// disabled, the widget emits the valueChanged() signal only when the user
|
|
|
/// releases the slider or spinbox.
|
|
|
- void setTracking(bool enable);
|
|
|
- bool hasTracking()const;
|
|
|
+ virtual void setTracking(bool enable);
|
|
|
+ virtual bool hasTracking()const;
|
|
|
|
|
|
///
|
|
|
/// Set/Get the synchronize siblings mode. This helps when having multiple
|
|
|
/// ctkSliderWidget stacked upon each other.
|
|
|
/// Default flag is SynchronizeWidth | SynchronizeDecimals.
|
|
|
/// \sa SynchronizeSiblingsModes
|
|
|
- ctkSliderWidget::SynchronizeSiblings synchronizeSiblings() const;
|
|
|
- void setSynchronizeSiblings(ctkSliderWidget::SynchronizeSiblings options);
|
|
|
+ virtual ctkSliderWidget::SynchronizeSiblings synchronizeSiblings() const;
|
|
|
+ virtual void setSynchronizeSiblings(ctkSliderWidget::SynchronizeSiblings options);
|
|
|
|
|
|
/// This property holds whether or not a slider shows its values inverted.
|
|
|
/// If this property is false (the default), the minimum and maximum will
|
|
@@ -211,8 +211,8 @@ public:
|
|
|
/// or not the styles understand inverted appearance; most styles ignore this
|
|
|
/// property for scroll bars.
|
|
|
/// \sa invertedControls
|
|
|
- void setInvertedAppearance(bool invertedAppearance);
|
|
|
- bool invertedAppearance()const;
|
|
|
+ virtual void setInvertedAppearance(bool invertedAppearance);
|
|
|
+ virtual bool invertedAppearance()const;
|
|
|
|
|
|
/// This property holds whether or not the slider and the spinbox invert
|
|
|
/// their wheel and key events.
|
|
@@ -221,13 +221,13 @@ public:
|
|
|
/// maximum. Otherwise, pressing page up will move value towards the minimum.
|
|
|
/// The default value of the property is false.
|
|
|
/// \sa invertedAppearance
|
|
|
- void setInvertedControls(bool invertedControls);
|
|
|
- bool invertedControls()const;
|
|
|
+ virtual void setInvertedControls(bool invertedControls);
|
|
|
+ virtual bool invertedControls()const;
|
|
|
|
|
|
///
|
|
|
/// The Spinbox visibility can be controlled using setSpinBoxVisible() and
|
|
|
/// isSpinBoxVisible().
|
|
|
- bool isSpinBoxVisible()const;
|
|
|
+ virtual bool isSpinBoxVisible()const;
|
|
|
|
|
|
///
|
|
|
/// The slider can be handled as a popup for the spinbox. The location where
|
|
@@ -236,45 +236,45 @@ public:
|
|
|
/// Note: some sizing issues in the popup can happen if the ctkSliderWidget
|
|
|
/// has already parent. You might want to consider setting this property
|
|
|
/// before setting a parent to ctkSliderWidget.
|
|
|
- bool hasPopupSlider()const;
|
|
|
- void setPopupSlider(bool popup);
|
|
|
+ virtual bool hasPopupSlider()const;
|
|
|
+ virtual void setPopupSlider(bool popup);
|
|
|
|
|
|
///
|
|
|
/// Return the popup if ctkSliderWidget hasPopupSlider() is true, 0 otherwise.
|
|
|
/// It can be useful to control where the popup shows up relative to the
|
|
|
/// spinbox the popup \sa ctkPopupWidget::baseWidget.
|
|
|
- ctkPopupWidget* popup()const;
|
|
|
+ virtual ctkPopupWidget* popup()const;
|
|
|
|
|
|
///
|
|
|
/// Returns the spinbox synchronized with the slider. Be careful
|
|
|
/// with what you do with the spinbox as the slider might change
|
|
|
/// properties automatically.
|
|
|
- ctkDoubleSpinBox* spinBox();
|
|
|
+ virtual ctkDoubleSpinBox* spinBox();
|
|
|
|
|
|
///
|
|
|
/// Returns the slider synchronized with the spinbox. Be careful
|
|
|
/// with what you do with the slider as the spinbox might change
|
|
|
/// properties automatically.
|
|
|
- ctkDoubleSlider* slider();
|
|
|
+ virtual ctkDoubleSlider* slider();
|
|
|
|
|
|
///
|
|
|
/// Set/Get a value proxy filter.
|
|
|
/// This simply sets the same value proxy filter on the spinbox
|
|
|
/// and the slider
|
|
|
/// \sa setValueProxy(), valueProxy()
|
|
|
- void setValueProxy(ctkValueProxy* proxy);
|
|
|
- ctkValueProxy* valueProxy() const;
|
|
|
+ virtual void setValueProxy(ctkValueProxy* proxy);
|
|
|
+ virtual ctkValueProxy* valueProxy() const;
|
|
|
|
|
|
public Q_SLOTS:
|
|
|
///
|
|
|
/// Reset the slider and spinbox to zero (value and position)
|
|
|
- void reset();
|
|
|
- void setValue(double value);
|
|
|
- void setSpinBoxVisible(bool);
|
|
|
+ virtual void reset();
|
|
|
+ virtual void setValue(double value);
|
|
|
+ virtual void setSpinBoxVisible(bool);
|
|
|
|
|
|
/// Sets how many decimals the spinbox uses for displaying and
|
|
|
/// interpreting doubles.
|
|
|
- void setDecimals(int decimals);
|
|
|
+ virtual void setDecimals(int decimals);
|
|
|
|
|
|
Q_SIGNALS:
|
|
|
/// When tracking is on (default), valueChanged is emitted when the
|
|
@@ -295,13 +295,13 @@ Q_SIGNALS:
|
|
|
void decimalsChanged(int decimals);
|
|
|
|
|
|
protected Q_SLOTS:
|
|
|
-
|
|
|
- void startChanging();
|
|
|
- void stopChanging();
|
|
|
- void setSpinBoxValue(double sliderValue);
|
|
|
- void setSliderValue(double spinBoxValue);
|
|
|
- void onValueProxyAboutToBeModified();
|
|
|
- void onValueProxyModified();
|
|
|
+
|
|
|
+ virtual void startChanging();
|
|
|
+ virtual void stopChanging();
|
|
|
+ virtual void setSpinBoxValue(double sliderValue);
|
|
|
+ virtual void setSliderValue(double spinBoxValue);
|
|
|
+ virtual void onValueProxyAboutToBeModified();
|
|
|
+ virtual void onValueProxyModified();
|
|
|
|
|
|
protected:
|
|
|
virtual bool eventFilter(QObject *obj, QEvent *event);
|