![]() |
Qt 6.x
The Qt SDK
|
Used to select a range of values by sliding two handles along a track. More...
Static Public Member Functions | |
static QQuickRangeSliderNodePrivate * | get (QQuickRangeSliderNode *node) |
![]() | |
static bool | removeConnection (Connection *c) |
static QObjectPrivate * | get (QObject *o) |
static const QObjectPrivate * | get (const QObject *o) |
template<typename Func1 , typename Func2 > | |
static QMetaObject::Connection | connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection) |
template<typename Func1 , typename Func2 > | |
static bool | disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot) |
static QMetaObject::Connection | connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static QMetaObject::Connection | connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type) |
static bool | disconnect (const QObject *sender, int signal_index, void **slot) |
static bool | disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot) |
Public Attributes | ||
qreal | value = 0 | |
bool | isPendingValue = false | |
qreal | pendingValue = 0 | |
qreal | position = 0 | |
QQuickDeferredPointer< QQuickItem > | handle | |
QQuickRangeSlider * | slider = nullptr | |
bool | pressed = false | |
bool | hovered = false | |
int | touchId = -1 | |
![]() | ||
ExtraData * | extraData | |
QAtomicPointer< QThreadData > | threadData | |
QAtomicPointer< ConnectionData > | connections | |
union { | ||
QObject * currentChildBeingDeleted | ||
QAbstractDeclarativeData * declarativeData | ||
}; | ||
QAtomicPointer< QtSharedPointer::ExternalRefCountData > | sharedRefcount | |
![]() | ||
QObject * | q_ptr | |
QObject * | parent | |
QObjectList | children | |
uint | isWidget: 1 | |
uint | blockSig: 1 | |
uint | wasDeleted: 1 | |
uint | isDeletingChildren: 1 | |
uint | sendChildEvents: 1 | |
uint | receiveChildEvents: 1 | |
uint | isWindow: 1 | |
uint | deleteLaterCalled: 1 | |
uint | isQuickItem: 1 | |
uint | willBeWidget: 1 | |
uint | wasWidget: 1 | |
uint | unused: 21 | |
QAtomicInt | postedEvents | |
QDynamicMetaObjectData * | metaObject | |
QBindingStorage | bindingStorage | |
Additional Inherited Members | |
![]() | |
typedef void(* | StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **) |
using | ConnectionDataPointer = QExplicitlySharedDataPointer< ConnectionData > |
Used to select a range of values by sliding two handles along a track.
\qmltype RangeSlider \inherits Control
! \instantiates QQuickRangeSlider \inqmlmodule QtQuick.Controls
RangeSlider is used to select a range specified by two values, by sliding each handle along a track.
In the example below, custom \l from and \l to values are set, and the initial positions of the \l first and \l second handles are set:
In order to perform an action when the value for a particular handle changes, use the following syntax:
The \l {first.position} and \l {second.position} properties are expressed as fractions of the control's size, in the range {0.0
- 1.0}. The \l {first.visualPosition} and \l {second.visualPosition} properties are the same, except that they are reversed in a \l {Right-to-left User Interfaces}{right-to-left} application. The visualPosition
is useful for positioning the handles when styling RangeSlider. In the example above, \l {first.visualPosition} will be 0.24
in a left-to-right application, and 0.76
in a right-to-left application.
For a slider that allows the user to select a single value, see \l Slider.
Definition at line 62 of file qquickrangeslider.cpp.
|
inline |
Definition at line 66 of file qquickrangeslider.cpp.
void QQuickRangeSliderNodePrivate::cancelHandle | ( | ) |
Definition at line 120 of file qquickrangeslider.cpp.
References handleName(), and quickCancelDeferred().
Definition at line 126 of file qquickrangeslider.cpp.
References handleName(), quickBeginDeferred(), and quickCompleteDeferred().
Referenced by QQuickRangeSlider::componentComplete().
|
static |
Definition at line 138 of file qquickrangeslider.cpp.
Referenced by QQuickRangeSlider::componentComplete(), QQuickRangeSliderPrivate::handleMove(), QQuickRangeSliderPrivate::handlePress(), QQuickRangeSliderPrivate::handleRelease(), QQuickRangeSliderPrivate::handleUngrab(), isFirst(), QQuickRangeSliderPrivate::pressedNode(), QQuickRangeSlider::setFrom(), QQuickRangeSliderNode::setHandle(), QQuickRangeSlider::setTo(), and QQuickRangeSlider::setValues().
bool QQuickRangeSliderNodePrivate::isFirst | ( | ) | const |
Definition at line 93 of file qquickrangeslider.cpp.
References QQuickRangeSlider::first, get(), and slider.
Referenced by setPosition().
Definition at line 98 of file qquickrangeslider.cpp.
References emit, QQuickRangeSlider::first, isFirst(), position, QQuickRangeSliderNode::position, qBound(), qFuzzyCompare(), QQuickRangeSlider::second, and slider.
Referenced by QQuickRangeSliderPrivate::handleMove(), and QQuickRangeSliderPrivate::handleRelease().
Definition at line 112 of file qquickrangeslider.cpp.
References QQuickRangeSlider::from, pos, qFuzzyCompare(), setPosition(), slider, and QQuickRangeSlider::to.
Referenced by QQuickRangeSlider::componentComplete(), and QQuickRangeSlider::setValues().
QQuickDeferredPointer<QQuickItem> QQuickRangeSliderNodePrivate::handle |
Definition at line 86 of file qquickrangeslider.cpp.
Referenced by QQuickRangeSliderNode::setHandle().
bool QQuickRangeSliderNodePrivate::hovered = false |
Definition at line 89 of file qquickrangeslider.cpp.
bool QQuickRangeSliderNodePrivate::isPendingValue = false |
Definition at line 83 of file qquickrangeslider.cpp.
Referenced by QQuickRangeSlider::componentComplete().
qreal QQuickRangeSliderNodePrivate::pendingValue = 0 |
Definition at line 84 of file qquickrangeslider.cpp.
Referenced by QQuickRangeSlider::componentComplete().
qreal QQuickRangeSliderNodePrivate::position = 0 |
Definition at line 85 of file qquickrangeslider.cpp.
Referenced by setPosition().
bool QQuickRangeSliderNodePrivate::pressed = false |
Definition at line 88 of file qquickrangeslider.cpp.
QQuickRangeSlider* QQuickRangeSliderNodePrivate::slider = nullptr |
Definition at line 87 of file qquickrangeslider.cpp.
Referenced by isFirst(), setPosition(), and updatePosition().
int QQuickRangeSliderNodePrivate::touchId = -1 |
Definition at line 90 of file qquickrangeslider.cpp.
Referenced by QQuickRangeSliderPrivate::handlePress(), QQuickRangeSliderPrivate::handleRelease(), QQuickRangeSliderPrivate::handleUngrab(), and QQuickRangeSliderPrivate::pressedNode().
qreal QQuickRangeSliderNodePrivate::value = 0 |
Definition at line 82 of file qquickrangeslider.cpp.
Referenced by QQuickRangeSlider::componentComplete(), and QQuickRangeSlider::setValues().