Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QQuickRangeSliderNodePrivate Class Reference

Used to select a range of values by sliding two handles along a track. More...

+ Inheritance diagram for QQuickRangeSliderNodePrivate:
+ Collaboration diagram for QQuickRangeSliderNodePrivate:

Public Member Functions

 QQuickRangeSliderNodePrivate (qreal value, QQuickRangeSlider *slider)
 
bool isFirst () const
 
void setPosition (qreal position, bool ignoreOtherPosition=false)
 
void updatePosition (bool ignoreOtherPosition=false)
 
void cancelHandle ()
 
void executeHandle (bool complete=false)
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Static Public Member Functions

static QQuickRangeSliderNodePrivateget (QQuickRangeSliderNode *node)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (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< QQuickItemhandle
 
QQuickRangeSliderslider = nullptr
 
bool pressed = false
 
bool hovered = false
 
int touchId = -1
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
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 receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(* StaticMetaCallFunction) (QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Detailed Description

Used to select a range of values by sliding two handles along a track.

\qmltype RangeSlider
\inherits Control

! \instantiates QQuickRangeSlider \inqmlmodule QtQuick.Controls

Since
5.7

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:

RangeSlider {
from: 1
to: 100
first.value: 25
second.value: 75
}
GLint first

In order to perform an action when the value for a particular handle changes, use the following syntax:

first.onMoved: console.log("first.value changed to " + first.value)

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.

See also
{Customizing RangeSlider}, {Input Controls}, {Focus Management in Qt Quick Controls}

Definition at line 62 of file qquickrangeslider.cpp.

Constructor & Destructor Documentation

◆ QQuickRangeSliderNodePrivate()

QQuickRangeSliderNodePrivate::QQuickRangeSliderNodePrivate ( qreal value,
QQuickRangeSlider * slider )
inline

Definition at line 66 of file qquickrangeslider.cpp.

Member Function Documentation

◆ cancelHandle()

void QQuickRangeSliderNodePrivate::cancelHandle ( )

Definition at line 120 of file qquickrangeslider.cpp.

References handleName(), and quickCancelDeferred().

+ Here is the call graph for this function:

◆ executeHandle()

void QQuickRangeSliderNodePrivate::executeHandle ( bool complete = false)

Definition at line 126 of file qquickrangeslider.cpp.

References handleName(), quickBeginDeferred(), and quickCompleteDeferred().

Referenced by QQuickRangeSliderNode::handle().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ get()

◆ isFirst()

bool QQuickRangeSliderNodePrivate::isFirst ( ) const

Definition at line 93 of file qquickrangeslider.cpp.

References QQuickRangeSlider::first, get(), and slider.

Referenced by setPosition().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setPosition()

void QQuickRangeSliderNodePrivate::setPosition ( qreal position,
bool ignoreOtherPosition = false )

Definition at line 98 of file qquickrangeslider.cpp.

References emit, QQuickRangeSlider::first, isFirst(), position, QQuickRangeSliderNode::position, qBound(), qFuzzyCompare(), QQuickRangeSlider::second, and slider.

+ Here is the call graph for this function:

◆ updatePosition()

void QQuickRangeSliderNodePrivate::updatePosition ( bool ignoreOtherPosition = false)

Definition at line 112 of file qquickrangeslider.cpp.

References QQuickRangeSlider::from, pos, qFuzzyCompare(), setPosition(), slider, and QQuickRangeSlider::to.

+ Here is the call graph for this function:

Member Data Documentation

◆ handle

QQuickDeferredPointer<QQuickItem> QQuickRangeSliderNodePrivate::handle

Definition at line 86 of file qquickrangeslider.cpp.

◆ hovered

bool QQuickRangeSliderNodePrivate::hovered = false

Definition at line 89 of file qquickrangeslider.cpp.

◆ isPendingValue

bool QQuickRangeSliderNodePrivate::isPendingValue = false

Definition at line 83 of file qquickrangeslider.cpp.

◆ pendingValue

qreal QQuickRangeSliderNodePrivate::pendingValue = 0

Definition at line 84 of file qquickrangeslider.cpp.

◆ position

qreal QQuickRangeSliderNodePrivate::position = 0

Definition at line 85 of file qquickrangeslider.cpp.

Referenced by setPosition().

◆ pressed

bool QQuickRangeSliderNodePrivate::pressed = false

Definition at line 88 of file qquickrangeslider.cpp.

◆ slider

QQuickRangeSlider* QQuickRangeSliderNodePrivate::slider = nullptr

Definition at line 87 of file qquickrangeslider.cpp.

Referenced by isFirst(), setPosition(), and updatePosition().

◆ touchId

int QQuickRangeSliderNodePrivate::touchId = -1

Definition at line 90 of file qquickrangeslider.cpp.

◆ value

qreal QQuickRangeSliderNodePrivate::value = 0

Definition at line 82 of file qquickrangeslider.cpp.


The documentation for this class was generated from the following file: