KLayout 0.29.8 (2024-10-28 63dd591e5) [master]

API reference - Class QScroller

Notation used in Ruby API documentation

Module: QtWidgets

Description: Binding of QScroller

Class hierarchy: QScroller » QObject

Sub-classes: Input, QFlags_Input, ScrollerGestureType, QFlags_ScrollerGestureType, State, QFlags_State

Public methods

[const]QScroller ptr_const_castReturns a non-const reference to self.
void_createEnsures the C++ object is created
[const]bool_destroyed?Returns a value indicating whether the object was already destroyed
[const]bool_is_const_object?Returns a value indicating whether the reference is a const reference
void_manageMarks the object as managed by the script side.
void_unmanageMarks the object as no longer owned by the script side.
[signal]voiddestroyed(QObject ptr arg1)Signal declaration for QScroller::destroyed(QObject *)
voidensureVisible(const QRectF rect,
double xmargin,
double ymargin)
Method void QScroller::ensureVisible(const QRectF &rect, double xmargin, double ymargin)
voidensureVisible(const QRectF rect,
double xmargin,
double ymargin,
int scrollTime)
Method void QScroller::ensureVisible(const QRectF &rect, double xmargin, double ymargin, int scrollTime)
[const]QPointFfinalPositionMethod QPointF QScroller::finalPosition()
boolhandleInput(const QScroller_Input input,
const QPointF position,
long long timestamp = 0)
Method bool QScroller::handleInput(QScroller::Input input, const QPointF &position, qint64 timestamp)
[signal]voidobjectNameChanged(string objectName)Signal declaration for QScroller::objectNameChanged(const QString &objectName)
[const]QPointFpixelPerMeterMethod QPointF QScroller::pixelPerMeter()
voidresendPrepareEventMethod void QScroller::resendPrepareEvent()
voidscrollTo(const QPointF pos)Method void QScroller::scrollTo(const QPointF &pos)
voidscrollTo(const QPointF pos,
int scrollTime)
Method void QScroller::scrollTo(const QPointF &pos, int scrollTime)
[const]QScrollerPropertiesscrollerPropertiesMethod QScrollerProperties QScroller::scrollerProperties()
voidscrollerProperties=(const QScrollerProperties prop)Method void QScroller::setScrollerProperties(const QScrollerProperties &prop)
[signal]voidscrollerPropertiesChanged(const QScrollerProperties arg1)Signal declaration for QScroller::scrollerPropertiesChanged(const QScrollerProperties &)
voidsetScrollerProperties(const QScrollerProperties prop)Method void QScroller::setScrollerProperties(const QScrollerProperties &prop)
voidsetSnapPositionsX(double[] positions)Method void QScroller::setSnapPositionsX(const QList<qreal> &positions)
voidsetSnapPositionsX(double first,
double interval)
Method void QScroller::setSnapPositionsX(double first, double interval)
voidsetSnapPositionsY(double[] positions)Method void QScroller::setSnapPositionsY(const QList<qreal> &positions)
voidsetSnapPositionsY(double first,
double interval)
Method void QScroller::setSnapPositionsY(double first, double interval)
[const]QScroller_StatestateMethod QScroller::State QScroller::state()
[signal]voidstateChanged(const QScroller_State newstate)Signal declaration for QScroller::stateChanged(QScroller::State newstate)
voidstopMethod void QScroller::stop()
[const]QObject ptrtargetMethod QObject *QScroller::target()
[const]QPointFvelocityMethod QPointF QScroller::velocity()

Public static methods and constants

[static,const]QScroller_StateDraggingEnum constant QScroller::Dragging
[static,const]QScroller_StateInactiveEnum constant QScroller::Inactive
[static,const]QScroller_InputInputMoveEnum constant QScroller::InputMove
[static,const]QScroller_InputInputPressEnum constant QScroller::InputPress
[static,const]QScroller_InputInputReleaseEnum constant QScroller::InputRelease
[static,const]QScroller_ScrollerGestureTypeLeftMouseButtonGestureEnum constant QScroller::LeftMouseButtonGesture
[static,const]QScroller_ScrollerGestureTypeMiddleMouseButtonGestureEnum constant QScroller::MiddleMouseButtonGesture
[static,const]QScroller_StatePressedEnum constant QScroller::Pressed
[static,const]QScroller_ScrollerGestureTypeRightMouseButtonGestureEnum constant QScroller::RightMouseButtonGesture
[static,const]QScroller_StateScrollingEnum constant QScroller::Scrolling
[static,const]QScroller_ScrollerGestureTypeTouchGestureEnum constant QScroller::TouchGesture
QScroller ptr[]activeScrollersStatic method QList<QScroller *> QScroller::activeScrollers()
Qt_GestureTypegrabGesture(QObject ptr target,
const QScroller_ScrollerGestureType gestureType = QScroller::TouchGesture)
Static method Qt::GestureType QScroller::grabGesture(QObject *target, QScroller::ScrollerGestureType gestureType)
Qt_GestureTypegrabbedGesture(QObject ptr target)Static method Qt::GestureType QScroller::grabbedGesture(QObject *target)
boolhasScroller(QObject ptr target)Static method bool QScroller::hasScroller(QObject *target)
QScroller ptrscroller(QObject ptr target)Static method QScroller *QScroller::scroller(QObject *target)
const QScroller ptrscroller(const QObject ptr target)Static method const QScroller *QScroller::scroller(const QObject *target)
QMetaObjectstaticMetaObjectObtains the static MetaObject for this class.
stringtr(string s,
string c = nullptr,
int n = -1)
Static method QString QScroller::tr(const char *s, const char *c, int n)
stringtrUtf8(string s,
string c = nullptr,
int n = -1)
Static method QString QScroller::trUtf8(const char *s, const char *c, int n)
voidungrabGesture(QObject ptr target)Static method void QScroller::ungrabGesture(QObject *target)

Detailed description

Dragging

Signature: [static,const] QScroller_State Dragging

Description: Enum constant QScroller::Dragging

Python specific notes:
The object exposes a readable attribute 'Dragging'. This is the getter.

Inactive

Signature: [static,const] QScroller_State Inactive

Description: Enum constant QScroller::Inactive

Python specific notes:
The object exposes a readable attribute 'Inactive'. This is the getter.

InputMove

Signature: [static,const] QScroller_Input InputMove

Description: Enum constant QScroller::InputMove

Python specific notes:
The object exposes a readable attribute 'InputMove'. This is the getter.

InputPress

Signature: [static,const] QScroller_Input InputPress

Description: Enum constant QScroller::InputPress

Python specific notes:
The object exposes a readable attribute 'InputPress'. This is the getter.

InputRelease

Signature: [static,const] QScroller_Input InputRelease

Description: Enum constant QScroller::InputRelease

Python specific notes:
The object exposes a readable attribute 'InputRelease'. This is the getter.

LeftMouseButtonGesture

Signature: [static,const] QScroller_ScrollerGestureType LeftMouseButtonGesture

Description: Enum constant QScroller::LeftMouseButtonGesture

Python specific notes:
The object exposes a readable attribute 'LeftMouseButtonGesture'. This is the getter.

MiddleMouseButtonGesture

Signature: [static,const] QScroller_ScrollerGestureType MiddleMouseButtonGesture

Description: Enum constant QScroller::MiddleMouseButtonGesture

Python specific notes:
The object exposes a readable attribute 'MiddleMouseButtonGesture'. This is the getter.

Pressed

Signature: [static,const] QScroller_State Pressed

Description: Enum constant QScroller::Pressed

Python specific notes:
The object exposes a readable attribute 'Pressed'. This is the getter.

RightMouseButtonGesture

Signature: [static,const] QScroller_ScrollerGestureType RightMouseButtonGesture

Description: Enum constant QScroller::RightMouseButtonGesture

Python specific notes:
The object exposes a readable attribute 'RightMouseButtonGesture'. This is the getter.

Scrolling

Signature: [static,const] QScroller_State Scrolling

Description: Enum constant QScroller::Scrolling

Python specific notes:
The object exposes a readable attribute 'Scrolling'. This is the getter.

TouchGesture

Signature: [static,const] QScroller_ScrollerGestureType TouchGesture

Description: Enum constant QScroller::TouchGesture

Python specific notes:
The object exposes a readable attribute 'TouchGesture'. This is the getter.

_const_cast

Signature: [const] QScroller ptr _const_cast

Description: Returns a non-const reference to self.

Basically, this method allows turning a const object reference to a non-const one. This method is provided as last resort to remove the constness from an object. Usually there is a good reason for a const object reference, so using this method may have undesired side effects.

This method has been introduced in version 0.29.6.

_create

Signature: void _create

Description: Ensures the C++ object is created

Use this method to ensure the C++ object is created, for example to ensure that resources are allocated. Usually C++ objects are created on demand and not necessarily when the script object is created.

_destroyed?

Signature: [const] bool _destroyed?

Description: Returns a value indicating whether the object was already destroyed

This method returns true, if the object was destroyed, either explicitly or by the C++ side. The latter may happen, if the object is owned by a C++ object which got destroyed itself.

_is_const_object?

Signature: [const] bool _is_const_object?

Description: Returns a value indicating whether the reference is a const reference

This method returns true, if self is a const reference. In that case, only const methods may be called on self.

_manage

Signature: void _manage

Description: Marks the object as managed by the script side.

After calling this method on an object, the script side will be responsible for the management of the object. This method may be called if an object is returned from a C++ function and the object is known not to be owned by any C++ instance. If necessary, the script side may delete the object if the script's reference is no longer required.

Usually it's not required to call this method. It has been introduced in version 0.24.

_unmanage

Signature: void _unmanage

Description: Marks the object as no longer owned by the script side.

Calling this method will make this object no longer owned by the script's memory management. Instead, the object must be managed in some other way. Usually this method may be called if it is known that some C++ object holds and manages this object. Technically speaking, this method will turn the script's reference into a weak reference. After the script engine decides to delete the reference, the object itself will still exist. If the object is not managed otherwise, memory leaks will occur.

Usually it's not required to call this method. It has been introduced in version 0.24.

activeScrollers

Signature: [static] QScroller ptr[] activeScrollers

Description: Static method QList<QScroller *> QScroller::activeScrollers()

This method is static and can be called without an instance.

destroyed

Signature: [signal] void destroyed (QObject ptr arg1)

Description: Signal declaration for QScroller::destroyed(QObject *)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'destroyed'. This is the getter.
The object exposes a writable attribute 'destroyed'. This is the setter.

ensureVisible

(1) Signature: void ensureVisible (const QRectF rect, double xmargin, double ymargin)

Description: Method void QScroller::ensureVisible(const QRectF &rect, double xmargin, double ymargin)

(2) Signature: void ensureVisible (const QRectF rect, double xmargin, double ymargin, int scrollTime)

Description: Method void QScroller::ensureVisible(const QRectF &rect, double xmargin, double ymargin, int scrollTime)

finalPosition

Signature: [const] QPointF finalPosition

Description: Method QPointF QScroller::finalPosition()

grabGesture

Signature: [static] Qt_GestureType grabGesture (QObject ptr target, const QScroller_ScrollerGestureType gestureType = QScroller::TouchGesture)

Description: Static method Qt::GestureType QScroller::grabGesture(QObject *target, QScroller::ScrollerGestureType gestureType)

This method is static and can be called without an instance.

grabbedGesture

Signature: [static] Qt_GestureType grabbedGesture (QObject ptr target)

Description: Static method Qt::GestureType QScroller::grabbedGesture(QObject *target)

This method is static and can be called without an instance.

handleInput

Signature: bool handleInput (const QScroller_Input input, const QPointF position, long long timestamp = 0)

Description: Method bool QScroller::handleInput(QScroller::Input input, const QPointF &position, qint64 timestamp)

hasScroller

Signature: [static] bool hasScroller (QObject ptr target)

Description: Static method bool QScroller::hasScroller(QObject *target)

This method is static and can be called without an instance.

objectNameChanged

Signature: [signal] void objectNameChanged (string objectName)

Description: Signal declaration for QScroller::objectNameChanged(const QString &objectName)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'objectNameChanged'. This is the getter.
The object exposes a writable attribute 'objectNameChanged'. This is the setter.

pixelPerMeter

Signature: [const] QPointF pixelPerMeter

Description: Method QPointF QScroller::pixelPerMeter()

resendPrepareEvent

Signature: void resendPrepareEvent

Description: Method void QScroller::resendPrepareEvent()

scrollTo

(1) Signature: void scrollTo (const QPointF pos)

Description: Method void QScroller::scrollTo(const QPointF &pos)

(2) Signature: void scrollTo (const QPointF pos, int scrollTime)

Description: Method void QScroller::scrollTo(const QPointF &pos, int scrollTime)

scroller

(1) Signature: [static] QScroller ptr scroller (QObject ptr target)

Description: Static method QScroller *QScroller::scroller(QObject *target)

This method is static and can be called without an instance.

(2) Signature: [static] const QScroller ptr scroller (const QObject ptr target)

Description: Static method const QScroller *QScroller::scroller(const QObject *target)

This method is static and can be called without an instance.

scrollerProperties

Signature: [const] QScrollerProperties scrollerProperties

Description: Method QScrollerProperties QScroller::scrollerProperties()

Python specific notes:
The object exposes a readable attribute 'scrollerProperties'. This is the getter.

scrollerProperties=

Signature: void scrollerProperties= (const QScrollerProperties prop)

Description: Method void QScroller::setScrollerProperties(const QScrollerProperties &prop)

Python specific notes:
The object exposes a writable attribute 'scrollerProperties'. This is the setter.

scrollerPropertiesChanged

Signature: [signal] void scrollerPropertiesChanged (const QScrollerProperties arg1)

Description: Signal declaration for QScroller::scrollerPropertiesChanged(const QScrollerProperties &)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'scrollerPropertiesChanged'. This is the getter.
The object exposes a writable attribute 'scrollerPropertiesChanged'. This is the setter.

setScrollerProperties

Signature: void setScrollerProperties (const QScrollerProperties prop)

Description: Method void QScroller::setScrollerProperties(const QScrollerProperties &prop)

Python specific notes:
The object exposes a writable attribute 'scrollerProperties'. This is the setter.

setSnapPositionsX

(1) Signature: void setSnapPositionsX (double[] positions)

Description: Method void QScroller::setSnapPositionsX(const QList<qreal> &positions)

(2) Signature: void setSnapPositionsX (double first, double interval)

Description: Method void QScroller::setSnapPositionsX(double first, double interval)

setSnapPositionsY

(1) Signature: void setSnapPositionsY (double[] positions)

Description: Method void QScroller::setSnapPositionsY(const QList<qreal> &positions)

(2) Signature: void setSnapPositionsY (double first, double interval)

Description: Method void QScroller::setSnapPositionsY(double first, double interval)

state

Signature: [const] QScroller_State state

Description: Method QScroller::State QScroller::state()

Python specific notes:
The object exposes a readable attribute 'state'. This is the getter.

stateChanged

Signature: [signal] void stateChanged (const QScroller_State newstate)

Description: Signal declaration for QScroller::stateChanged(QScroller::State newstate)

You can bind a procedure to this signal.

Python specific notes:
The object exposes a readable attribute 'stateChanged'. This is the getter.
The object exposes a writable attribute 'stateChanged'. This is the setter.

staticMetaObject

Signature: [static] QMetaObject staticMetaObject

Description: Obtains the static MetaObject for this class.

stop

Signature: void stop

Description: Method void QScroller::stop()

target

Signature: [const] QObject ptr target

Description: Method QObject *QScroller::target()

tr

Signature: [static] string tr (string s, string c = nullptr, int n = -1)

Description: Static method QString QScroller::tr(const char *s, const char *c, int n)

This method is static and can be called without an instance.

trUtf8

Signature: [static] string trUtf8 (string s, string c = nullptr, int n = -1)

Description: Static method QString QScroller::trUtf8(const char *s, const char *c, int n)

This method is static and can be called without an instance.

ungrabGesture

Signature: [static] void ungrabGesture (QObject ptr target)

Description: Static method void QScroller::ungrabGesture(QObject *target)

This method is static and can be called without an instance.

velocity

Signature: [const] QPointF velocity

Description: Method QPointF QScroller::velocity()