CopperSpice API  1.9.1
QSwipeGesture Class Reference

The QSwipeGesture class describes a swipe gesture made by the user. More...

Inheritance diagram for QSwipeGesture:
QGesture QObject

Public Types

enum  SwipeDirection
 
- Public Types inherited from QGesture
enum  GestureCancelPolicy
 

Public Methods

 QSwipeGesture (QObject *parent=nullptr)
 
SwipeDirection horizontalDirection () const
 
void setSwipeAngle (qreal value)
 
qreal swipeAngle () const
 
SwipeDirection verticalDirection () const
 
- Public Methods inherited from QGesture
 QGesture (QObject *parent=nullptr)
 
 ~QGesture ()
 
GestureCancelPolicy gestureCancelPolicy () const
 
Qt::GestureType gestureType () const
 
bool hasHotSpot () const
 
QPointF hotSpot () const
 
void setGestureCancelPolicy (GestureCancelPolicy policy)
 
void setHotSpot (const QPointF &value)
 
Qt::GestureState state () const
 
void unsetHotSpot ()
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &childName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 

Properties

 horizontalDirection
 
 swipeAngle
 
 verticalDirection
 
- Properties inherited from QGesture
 gestureCancelPolicy
 
 gestureType
 
 hasHotSpot
 
 hotSpot
 
 state
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 
- Public Slots inherited from QObject
void deleteLater ()
 
- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, std::nullptr_t, const QObject *receiver, std::nullptr_t)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Detailed Description

The QSwipeGesture class describes a swipe gesture made by the user. For an overview of gesture handling in CopperSpice and information on using gestures in your applications, refer to Gestures Programming.

See also
QPanGesture, QPinchGesture

Member Enumeration Documentation

This enum describes the possible directions for the gesture's motion along the horizontal and vertical axes.

ConstantValueDescription
QSwipeGesture::NoDirection0The gesture had no motion associated with it on a particular axis.
QSwipeGesture::Left1The gesture involved a horizontal motion to the left.
QSwipeGesture::Right2The gesture involved a horizontal motion to the right.
QSwipeGesture::Up3The gesture involved an upward vertical motion.
QSwipeGesture::Down4The gesture involved a downward vertical motion.

Constructor & Destructor Documentation

QSwipeGesture::QSwipeGesture ( QObject parent = nullptr)
explicit

Constructs a new QSwipeGesture with the given parent.

Method Documentation

SwipeDirection QSwipeGesture::horizontalDirection ( ) const

Returns the value of the property.

void QSwipeGesture::setSwipeAngle ( qreal  value)

Sets the value of the property to value.

qreal QSwipeGesture::swipeAngle ( ) const

Returns the value of the property.

SwipeDirection QSwipeGesture::verticalDirection ( ) const

Returns the value of the property.

Property Documentation

QSwipeGesture::horizontalDirection

This property holds the horizontal direction of the gesture.

If the gesture has a horizontal component, the horizontal direction is either Left or Right, otherwise it is NoDirection.

See also
verticalDirection, swipeAngle
PropertiesClass Methods
read horizontalDirection
stored true
QSwipeGesture::swipeAngle

This property holds the angle of the motion associated with the gesture.

If the gesture has either a horizontal or vertical component, the swipe angle describes the angle between the direction of motion and the x-axis as defined using the standard widget coordinate system.

See also
horizontalDirection, verticalDirection
PropertiesClass Methods
read swipeAngle
write setSwipeAngle
QSwipeGesture::verticalDirection

This property holds the vertical direction of the gesture.

If the gesture has a vertical component, the vertical direction is either Up or Down, otherwise it is NoDirection.

See also
horizontalDirection, swipeAngle
PropertiesClass Methods
read verticalDirection
stored true