[][src]Struct qt_widgets::QDial

#[repr(C)]pub struct QDial { /* fields omitted */ }

The QDial class provides a rounded range control (like a speedometer or potentiometer).

C++ class: QDial.

C++ documentation:

The QDial class provides a rounded range control (like a speedometer or potentiometer).

QDial is used when the user needs to control a value within a program-definable range, and the range either wraps around (for example, with angles measured from 0 to 359 degrees) or the dialog layout needs a square widget.

Since QDial inherits from QAbstractSlider, the dial behaves in a similar way to a slider. When wrapping() is false (the default setting) there is no real difference between a slider and a dial. They both share the same signals, slots and member functions. Which one you use depends on the expectations of your users and on the type of application.

The dial initially emits valueChanged() signals continuously while the slider is being moved; you can make it emit the signal less often by disabling the tracking property. The sliderMoved() signal is emitted continuously even when tracking is disabled.

The dial also emits sliderPressed() and sliderReleased() signals when the mouse button is pressed and released. Note that the dial's value can change without these signals being emitted since the keyboard and wheel can also be used to change the value.

Unlike the slider, QDial attempts to draw a "nice" number of notches rather than one per line step. If possible, the number of notches drawn is one per line step, but if there aren't enough pixels to draw every one, QDial will skip notches to try and draw a uniform set (e.g. by drawing every second or third notch).

Like the slider, the dial makes the QAbstractSlider function setValue() available as a slot.

The dial's keyboard interface is fairly simple: The left/up and right/down arrow keys adjust the dial's value by the defined singleStep, Page Up and Page Down by the defined pageStep, and the Home and End keys set the value to the defined minimum and maximum values.

If you are using the mouse wheel to adjust the dial, the increment value is determined by the lesser value of wheelScrollLines multipled by singleStep, and pageStep.

Methods

impl QDial[src]

pub fn slot_set_notches_visible(&self) -> Receiver<(bool,)>[src]

This property holds whether the notches are shown

Returns a built-in Qt slot QDial::setNotchesVisible that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds whether the notches are shown

If the property is true, a series of notches are drawn around the dial to indicate the range of values available; otherwise no notches are shown.

By default, this property is disabled.

Access functions:

bool notchesVisible() const
void setNotchesVisible(bool visible)

pub fn slot_set_wrapping(&self) -> Receiver<(bool,)>[src]

This property holds whether wrapping is enabled

Returns a built-in Qt slot QDial::setWrapping that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds whether wrapping is enabled

If true, wrapping is enabled; otherwise some space is inserted at the bottom of the dial to separate the ends of the range of valid values.

If enabled, the arrow can be oriented at any angle on the dial. If disabled, the arrow will be restricted to the upper part of the dial; if it is rotated into the space at the bottom of the dial, it will be clamped to the closest end of the valid range of values.

By default this property is false.

Access functions:

bool wrapping() const
void setWrapping(bool on)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QDial::metaObject() const.

pub unsafe fn minimum_size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::minimumSizeHint().

Calls C++ function: virtual QSize QDial::minimumSizeHint() const.

C++ documentation:

Reimplemented from QWidget::minimumSizeHint().

pub unsafe fn new_1a(parent: impl CastInto<Ptr<QWidget>>) -> QBox<QDial>[src]

Constructs a dial.

Calls C++ function: [constructor] void QDial::QDial(QWidget* parent = …).

C++ documentation:

Constructs a dial.

The parent argument is sent to the QAbstractSlider constructor.

pub unsafe fn new_0a() -> QBox<QDial>[src]

The QDial class provides a rounded range control (like a speedometer or potentiometer).

Calls C++ function: [constructor] void QDial::QDial().

C++ documentation:

The QDial class provides a rounded range control (like a speedometer or potentiometer).

QDial is used when the user needs to control a value within a program-definable range, and the range either wraps around (for example, with angles measured from 0 to 359 degrees) or the dialog layout needs a square widget.

Since QDial inherits from QAbstractSlider, the dial behaves in a similar way to a slider. When wrapping() is false (the default setting) there is no real difference between a slider and a dial. They both share the same signals, slots and member functions. Which one you use depends on the expectations of your users and on the type of application.

The dial initially emits valueChanged() signals continuously while the slider is being moved; you can make it emit the signal less often by disabling the tracking property. The sliderMoved() signal is emitted continuously even when tracking is disabled.

The dial also emits sliderPressed() and sliderReleased() signals when the mouse button is pressed and released. Note that the dial's value can change without these signals being emitted since the keyboard and wheel can also be used to change the value.

Unlike the slider, QDial attempts to draw a "nice" number of notches rather than one per line step. If possible, the number of notches drawn is one per line step, but if there aren't enough pixels to draw every one, QDial will skip notches to try and draw a uniform set (e.g. by drawing every second or third notch).

Like the slider, the dial makes the QAbstractSlider function setValue() available as a slot.

The dial's keyboard interface is fairly simple: The left/up and right/down arrow keys adjust the dial's value by the defined singleStep, Page Up and Page Down by the defined pageStep, and the Home and End keys set the value to the defined minimum and maximum values.

If you are using the mouse wheel to adjust the dial, the increment value is determined by the lesser value of wheelScrollLines multipled by singleStep, and pageStep.

pub unsafe fn notch_size(&self) -> c_int[src]

This property holds the current notch size

Calls C++ function: int QDial::notchSize() const.

C++ documentation:

This property holds the current notch size

The notch size is in range control units, not pixels, and if possible it is a multiple of singleStep() that results in an on-screen notch size near notchTarget().

By default, this property has a value of 1.

Access functions:

int notchSize() const

See also notchTarget() and singleStep().

pub unsafe fn notch_target(&self) -> c_double[src]

This property holds the target number of pixels between notches

Calls C++ function: double QDial::notchTarget() const.

C++ documentation:

This property holds the target number of pixels between notches

The notch target is the number of pixels QDial attempts to put between each notch.

The actual size may differ from the target size.

The default notch target is 3.7 pixels.

Access functions:

qreal notchTarget() const
void setNotchTarget(double target)

pub unsafe fn notches_visible(&self) -> bool[src]

This property holds whether the notches are shown

Calls C++ function: bool QDial::notchesVisible() const.

C++ documentation:

This property holds whether the notches are shown

If the property is true, a series of notches are drawn around the dial to indicate the range of values available; otherwise no notches are shown.

By default, this property is disabled.

Access functions:

bool notchesVisible() const
void setNotchesVisible(bool visible)

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QDial::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QDial::qt_metacast(const char* arg1).

pub unsafe fn set_notch_target(&self, target: c_double)[src]

This property holds the target number of pixels between notches

Calls C++ function: void QDial::setNotchTarget(double target).

C++ documentation:

This property holds the target number of pixels between notches

The notch target is the number of pixels QDial attempts to put between each notch.

The actual size may differ from the target size.

The default notch target is 3.7 pixels.

Access functions:

qreal notchTarget() const
void setNotchTarget(double target)

pub unsafe fn set_notches_visible(&self, visible: bool)[src]

This property holds whether the notches are shown

Calls C++ function: [slot] void QDial::setNotchesVisible(bool visible).

C++ documentation:

This property holds whether the notches are shown

If the property is true, a series of notches are drawn around the dial to indicate the range of values available; otherwise no notches are shown.

By default, this property is disabled.

Access functions:

bool notchesVisible() const
void setNotchesVisible(bool visible)

pub unsafe fn set_wrapping(&self, on: bool)[src]

This property holds whether wrapping is enabled

Calls C++ function: [slot] void QDial::setWrapping(bool on).

C++ documentation:

This property holds whether wrapping is enabled

If true, wrapping is enabled; otherwise some space is inserted at the bottom of the dial to separate the ends of the range of valid values.

If enabled, the arrow can be oriented at any angle on the dial. If disabled, the arrow will be restricted to the upper part of the dial; if it is rotated into the space at the bottom of the dial, it will be clamped to the closest end of the valid range of values.

By default this property is false.

Access functions:

bool wrapping() const
void setWrapping(bool on)

pub unsafe fn size_hint(&self) -> CppBox<QSize>[src]

Reimplemented from QWidget::sizeHint().

Calls C++ function: virtual QSize QDial::sizeHint() const.

C++ documentation:

Reimplemented from QWidget::sizeHint().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QDial::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: *const c_char,
    c: *const c_char,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString QDial::trUtf8(const char* s, const char* c, int n).

pub unsafe fn wrapping(&self) -> bool[src]

This property holds whether wrapping is enabled

Calls C++ function: bool QDial::wrapping() const.

C++ documentation:

This property holds whether wrapping is enabled

If true, wrapping is enabled; otherwise some space is inserted at the bottom of the dial to separate the ends of the range of valid values.

If enabled, the arrow can be oriented at any angle on the dial. If disabled, the arrow will be restricted to the upper part of the dial; if it is rotated into the space at the bottom of the dial, it will be clamped to the closest end of the valid range of values.

By default this property is false.

Access functions:

bool wrapping() const
void setWrapping(bool on)

Methods from Deref<Target = QAbstractSlider>

pub fn slot_set_value(&self) -> Receiver<(c_int,)>[src]

This property holds the slider's current value

Returns a built-in Qt slot QAbstractSlider::setValue that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the slider's current value

The slider forces the value to be within the legal range: minimum <= value <= maximum.

Changing the value also changes the sliderPosition.

Access functions:

int value() const
void setValue(int)

Notifier signal:

void valueChanged(int value)

pub fn slot_set_orientation(&self) -> Receiver<(Orientation,)>[src]

This property holds the orientation of the slider

Returns a built-in Qt slot QAbstractSlider::setOrientation that can be passed to qt_core::Signal::connect.

C++ documentation:

This property holds the orientation of the slider

The orientation must be Qt::Vertical (the default) or Qt::Horizontal.

Access functions:

Qt::Orientation orientation() const
void setOrientation(Qt::Orientation)

pub fn slot_set_range(&self) -> Receiver<(c_int, c_int)>[src]

Sets the slider's minimum to min and its maximum to max.

Returns a built-in Qt slot QAbstractSlider::setRange that can be passed to qt_core::Signal::connect.

C++ documentation:

Sets the slider's minimum to min and its maximum to max.

If max is smaller than min, min becomes the only legal value.

See also minimum and maximum.

pub fn value_changed(&self) -> Signal<(c_int,)>[src]

This signal is emitted when the slider value has changed, with the new slider value as argument.

Returns a built-in Qt signal QAbstractSlider::valueChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the slider value has changed, with the new slider value as argument.

Note: Notifier signal for property value.

pub fn slider_pressed(&self) -> Signal<()>[src]

This signal is emitted when the user presses the slider with the mouse, or programmatically when setSliderDown(true) is called.

Returns a built-in Qt signal QAbstractSlider::sliderPressed that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user presses the slider with the mouse, or programmatically when setSliderDown(true) is called.

See also sliderReleased(), sliderMoved(), and isSliderDown().

pub fn slider_moved(&self) -> Signal<(c_int,)>[src]

This signal is emitted when sliderDown is true and the slider moves. This usually happens when the user is dragging the slider. The value is the new slider position.

Returns a built-in Qt signal QAbstractSlider::sliderMoved that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when sliderDown is true and the slider moves. This usually happens when the user is dragging the slider. The value is the new slider position.

This signal is emitted even when tracking is turned off.

Note: Notifier signal for property sliderPosition.

See also setTracking(), valueChanged(), isSliderDown(), sliderPressed(), and sliderReleased().

pub fn slider_released(&self) -> Signal<()>[src]

This signal is emitted when the user releases the slider with the mouse, or programmatically when setSliderDown(false) is called.

Returns a built-in Qt signal QAbstractSlider::sliderReleased that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the user releases the slider with the mouse, or programmatically when setSliderDown(false) is called.

See also sliderPressed(), sliderMoved(), and sliderDown.

pub fn range_changed(&self) -> Signal<(c_int, c_int)>[src]

This signal is emitted when the slider range has changed, with min being the new minimum, and max being the new maximum.

Returns a built-in Qt signal QAbstractSlider::rangeChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the slider range has changed, with min being the new minimum, and max being the new maximum.

See also minimum and maximum.

pub fn action_triggered(&self) -> Signal<(c_int,)>[src]

This signal is emitted when the slider action action is triggered. Actions are SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove.

Returns a built-in Qt signal QAbstractSlider::actionTriggered that can be passed to qt_core::Signal::connect.

C++ documentation:

This signal is emitted when the slider action action is triggered. Actions are SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove.

When the signal is emitted, the sliderPosition has been adjusted according to the action, but the value has not yet been propagated (meaning the valueChanged() signal was not yet emitted), and the visual display has not been updated. In slots connected to this signal you can thus safely adjust any action by calling setSliderPosition() yourself, based on both the action and the slider's value.

See also triggerAction().

pub unsafe fn has_tracking(&self) -> bool[src]

This property holds whether slider tracking is enabled

Calls C++ function: bool QAbstractSlider::hasTracking() const.

C++ documentation:

This property holds whether slider tracking is enabled

If tracking is enabled (the default), the slider emits the valueChanged() signal while the slider is being dragged. If tracking is disabled, the slider emits the valueChanged() signal only when the user releases the slider.

Access functions:

bool hasTracking() const
void setTracking(bool enable)

See also sliderDown.

pub unsafe fn inverted_appearance(&self) -> bool[src]

This property holds whether or not a slider shows its values inverted.

Calls C++ function: bool QAbstractSlider::invertedAppearance() const.

C++ documentation:

This property holds whether or not a slider shows its values inverted.

If this property is false (the default), the minimum and maximum will be shown in its classic position for the inherited widget. If the value is true, the minimum and maximum appear at their opposite location.

Note: This property makes most sense for sliders and dials. For scroll bars, the visual effect of the scroll bar subcontrols depends on whether or not the styles understand inverted appearance; most styles ignore this property for scroll bars.

Access functions:

bool invertedAppearance() const
void setInvertedAppearance(bool)

pub unsafe fn inverted_controls(&self) -> bool[src]

This property holds whether or not the slider inverts its wheel and key events.

Calls C++ function: bool QAbstractSlider::invertedControls() const.

C++ documentation:

This property holds whether or not the slider inverts its wheel and key events.

If this property is false, scrolling the mouse wheel "up" and using keys like page up will increase the slider's value towards its maximum. Otherwise pressing page up will move value towards the slider's minimum.

Access functions:

bool invertedControls() const
void setInvertedControls(bool)

pub unsafe fn is_slider_down(&self) -> bool[src]

This property holds whether the slider is pressed down.

Calls C++ function: bool QAbstractSlider::isSliderDown() const.

C++ documentation:

This property holds whether the slider is pressed down.

The property is set by subclasses in order to let the abstract slider know whether or not tracking has any effect.

Changing the slider down property emits the sliderPressed() and sliderReleased() signals.

Access functions:

bool isSliderDown() const
void setSliderDown(bool)

pub unsafe fn maximum(&self) -> c_int[src]

This property holds the slider's maximum value

Calls C++ function: int QAbstractSlider::maximum() const.

C++ documentation:

This property holds the slider's maximum value

When setting this property, the minimum 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.

Access functions:

int maximum() const
void setMaximum(int)

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* QAbstractSlider::metaObject() const.

pub unsafe fn minimum(&self) -> c_int[src]

This property holds the sliders's minimum value

Calls C++ function: int QAbstractSlider::minimum() const.

C++ documentation:

This property holds the sliders's minimum value

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.

Access functions:

int minimum() const
void setMinimum(int)

pub unsafe fn orientation(&self) -> Orientation[src]

This property holds the orientation of the slider

Calls C++ function: Qt::Orientation QAbstractSlider::orientation() const.

C++ documentation:

This property holds the orientation of the slider

The orientation must be Qt::Vertical (the default) or Qt::Horizontal.

Access functions:

Qt::Orientation orientation() const
void setOrientation(Qt::Orientation)

pub unsafe fn page_step(&self) -> c_int[src]

This property holds the page step.

Calls C++ function: int QAbstractSlider::pageStep() const.

C++ documentation:

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.

Access functions:

int pageStep() const
void setPageStep(int)

See also singleStep.

pub unsafe fn qt_metacall(
    &self,
    arg1: Call,
    arg2: c_int,
    arg3: *mut *mut c_void
) -> c_int
[src]

Calls C++ function: virtual int QAbstractSlider::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* QAbstractSlider::qt_metacast(const char* arg1).

pub unsafe fn set_inverted_appearance(&self, arg1: bool)[src]

This property holds whether or not a slider shows its values inverted.

Calls C++ function: void QAbstractSlider::setInvertedAppearance(bool arg1).

C++ documentation:

This property holds whether or not a slider shows its values inverted.

If this property is false (the default), the minimum and maximum will be shown in its classic position for the inherited widget. If the value is true, the minimum and maximum appear at their opposite location.

Note: This property makes most sense for sliders and dials. For scroll bars, the visual effect of the scroll bar subcontrols depends on whether or not the styles understand inverted appearance; most styles ignore this property for scroll bars.

Access functions:

bool invertedAppearance() const
void setInvertedAppearance(bool)

pub unsafe fn set_inverted_controls(&self, arg1: bool)[src]

This property holds whether or not the slider inverts its wheel and key events.

Calls C++ function: void QAbstractSlider::setInvertedControls(bool arg1).

C++ documentation:

This property holds whether or not the slider inverts its wheel and key events.

If this property is false, scrolling the mouse wheel "up" and using keys like page up will increase the slider's value towards its maximum. Otherwise pressing page up will move value towards the slider's minimum.

Access functions:

bool invertedControls() const
void setInvertedControls(bool)

pub unsafe fn set_maximum(&self, arg1: c_int)[src]

This property holds the slider's maximum value

Calls C++ function: void QAbstractSlider::setMaximum(int arg1).

C++ documentation:

This property holds the slider's maximum value

When setting this property, the minimum 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.

Access functions:

int maximum() const
void setMaximum(int)

pub unsafe fn set_minimum(&self, arg1: c_int)[src]

This property holds the sliders's minimum value

Calls C++ function: void QAbstractSlider::setMinimum(int arg1).

C++ documentation:

This property holds the sliders's minimum value

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.

Access functions:

int minimum() const
void setMinimum(int)

pub unsafe fn set_orientation(&self, arg1: Orientation)[src]

This property holds the orientation of the slider

Calls C++ function: [slot] void QAbstractSlider::setOrientation(Qt::Orientation arg1).

C++ documentation:

This property holds the orientation of the slider

The orientation must be Qt::Vertical (the default) or Qt::Horizontal.

Access functions:

Qt::Orientation orientation() const
void setOrientation(Qt::Orientation)

pub unsafe fn set_page_step(&self, arg1: c_int)[src]

This property holds the page step.

Calls C++ function: void QAbstractSlider::setPageStep(int arg1).

C++ documentation:

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.

Access functions:

int pageStep() const
void setPageStep(int)

See also singleStep.

pub unsafe fn set_range(&self, min: c_int, max: c_int)[src]

Sets the slider's minimum to min and its maximum to max.

Calls C++ function: [slot] void QAbstractSlider::setRange(int min, int max).

C++ documentation:

Sets the slider's minimum to min and its maximum to max.

If max is smaller than min, min becomes the only legal value.

See also minimum and maximum.

pub unsafe fn set_single_step(&self, arg1: c_int)[src]

This property holds the single step.

Calls C++ function: void QAbstractSlider::setSingleStep(int arg1).

C++ documentation:

This property holds the single step.

The smaller of two natural steps that an abstract sliders provides and typically corresponds to the user pressing an arrow key.

If the property is modified during an auto repeating key event, behavior is undefined.

Access functions:

int singleStep() const
void setSingleStep(int)

See also pageStep.

pub unsafe fn set_slider_down(&self, arg1: bool)[src]

This property holds whether the slider is pressed down.

Calls C++ function: void QAbstractSlider::setSliderDown(bool arg1).

C++ documentation:

This property holds whether the slider is pressed down.

The property is set by subclasses in order to let the abstract slider know whether or not tracking has any effect.

Changing the slider down property emits the sliderPressed() and sliderReleased() signals.

Access functions:

bool isSliderDown() const
void setSliderDown(bool)

pub unsafe fn set_slider_position(&self, arg1: c_int)[src]

This property holds the current slider position

Calls C++ function: void QAbstractSlider::setSliderPosition(int arg1).

C++ documentation:

This property holds the current slider position

If tracking is enabled (the default), this is identical to value.

Access functions:

int sliderPosition() const
void setSliderPosition(int)

Notifier signal:

void sliderMoved(int value)

pub unsafe fn set_tracking(&self, enable: bool)[src]

This property holds whether slider tracking is enabled

Calls C++ function: void QAbstractSlider::setTracking(bool enable).

C++ documentation:

This property holds whether slider tracking is enabled

If tracking is enabled (the default), the slider emits the valueChanged() signal while the slider is being dragged. If tracking is disabled, the slider emits the valueChanged() signal only when the user releases the slider.

Access functions:

bool hasTracking() const
void setTracking(bool enable)

See also sliderDown.

pub unsafe fn set_value(&self, arg1: c_int)[src]

This property holds the slider's current value

Calls C++ function: [slot] void QAbstractSlider::setValue(int arg1).

C++ documentation:

This property holds the slider's current value

The slider forces the value to be within the legal range: minimum <= value <= maximum.

Changing the value also changes the sliderPosition.

Access functions:

int value() const
void setValue(int)

Notifier signal:

void valueChanged(int value)

pub unsafe fn single_step(&self) -> c_int[src]

This property holds the single step.

Calls C++ function: int QAbstractSlider::singleStep() const.

C++ documentation:

This property holds the single step.

The smaller of two natural steps that an abstract sliders provides and typically corresponds to the user pressing an arrow key.

If the property is modified during an auto repeating key event, behavior is undefined.

Access functions:

int singleStep() const
void setSingleStep(int)

See also pageStep.

pub unsafe fn slider_position(&self) -> c_int[src]

This property holds the current slider position

Calls C++ function: int QAbstractSlider::sliderPosition() const.

C++ documentation:

This property holds the current slider position

If tracking is enabled (the default), this is identical to value.

Access functions:

int sliderPosition() const
void setSliderPosition(int)

Notifier signal:

void sliderMoved(int value)

pub unsafe fn trigger_action(&self, action: SliderAction)[src]

Triggers a slider action. Possible actions are SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove.

Calls C++ function: void QAbstractSlider::triggerAction(QAbstractSlider::SliderAction action).

C++ documentation:

Triggers a slider action. Possible actions are SliderSingleStepAdd, SliderSingleStepSub, SliderPageStepAdd, SliderPageStepSub, SliderToMinimum, SliderToMaximum, and SliderMove.

See also actionTriggered().

pub unsafe fn value(&self) -> c_int[src]

This property holds the slider's current value

Calls C++ function: int QAbstractSlider::value() const.

C++ documentation:

This property holds the slider's current value

The slider forces the value to be within the legal range: minimum <= value <= maximum.

Changing the value also changes the sliderPosition.

Access functions:

int value() const
void setValue(int)

Notifier signal:

void valueChanged(int value)

Trait Implementations

impl CppDeletable for QDial[src]

unsafe fn delete(&self)[src]

Destroys the dial.

Calls C++ function: virtual [destructor] void QDial::~QDial().

C++ documentation:

Destroys the dial.

impl Deref for QDial[src]

type Target = QAbstractSlider

The resulting type after dereferencing.

fn deref(&self) -> &QAbstractSlider[src]

Calls C++ function: QAbstractSlider* static_cast<QAbstractSlider*>(QDial* ptr).

impl DynamicCast<QDial> for QAbstractSlider[src]

unsafe fn dynamic_cast(ptr: Ptr<QAbstractSlider>) -> Ptr<QDial>[src]

Calls C++ function: QDial* dynamic_cast<QDial*>(QAbstractSlider* ptr).

impl DynamicCast<QDial> for QWidget[src]

unsafe fn dynamic_cast(ptr: Ptr<QWidget>) -> Ptr<QDial>[src]

Calls C++ function: QDial* dynamic_cast<QDial*>(QWidget* ptr).

impl DynamicCast<QDial> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QDial>[src]

Calls C++ function: QDial* dynamic_cast<QDial*>(QObject* ptr).

impl DynamicCast<QDial> for QPaintDevice[src]

unsafe fn dynamic_cast(ptr: Ptr<QPaintDevice>) -> Ptr<QDial>[src]

Calls C++ function: QDial* dynamic_cast<QDial*>(QPaintDevice* ptr).

impl StaticDowncast<QDial> for QAbstractSlider[src]

unsafe fn static_downcast(ptr: Ptr<QAbstractSlider>) -> Ptr<QDial>[src]

Calls C++ function: QDial* static_cast<QDial*>(QAbstractSlider* ptr).

impl StaticDowncast<QDial> for QWidget[src]

unsafe fn static_downcast(ptr: Ptr<QWidget>) -> Ptr<QDial>[src]

Calls C++ function: QDial* static_cast<QDial*>(QWidget* ptr).

impl StaticDowncast<QDial> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QDial>[src]

Calls C++ function: QDial* static_cast<QDial*>(QObject* ptr).

impl StaticDowncast<QDial> for QPaintDevice[src]

unsafe fn static_downcast(ptr: Ptr<QPaintDevice>) -> Ptr<QDial>[src]

Calls C++ function: QDial* static_cast<QDial*>(QPaintDevice* ptr).

impl StaticUpcast<QAbstractSlider> for QDial[src]

unsafe fn static_upcast(ptr: Ptr<QDial>) -> Ptr<QAbstractSlider>[src]

Calls C++ function: QAbstractSlider* static_cast<QAbstractSlider*>(QDial* ptr).

impl StaticUpcast<QObject> for QDial[src]

unsafe fn static_upcast(ptr: Ptr<QDial>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(QDial* ptr).

impl StaticUpcast<QPaintDevice> for QDial[src]

unsafe fn static_upcast(ptr: Ptr<QDial>) -> Ptr<QPaintDevice>[src]

Calls C++ function: QPaintDevice* static_cast<QPaintDevice*>(QDial* ptr).

impl StaticUpcast<QWidget> for QDial[src]

unsafe fn static_upcast(ptr: Ptr<QDial>) -> Ptr<QWidget>[src]

Calls C++ function: QWidget* static_cast<QWidget*>(QDial* ptr).

Auto Trait Implementations

impl RefUnwindSafe for QDial

impl Send for QDial

impl Sync for QDial

impl Unpin for QDial

impl UnwindSafe for QDial

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.