pub struct ResultFlag(/* private fields */);
Expand description
This enum describes the result of the current event filtering step in a gesture recognizer state machine.
C++ enum: QGestureRecognizer::ResultFlag
.
This enum describes the result of the current event filtering step in a gesture recognizer state machine.
The result consists of a state value (one of Ignore, MayBeGesture, TriggerGesture, FinishGesture, CancelGesture) and an optional hint (ConsumeEventHint).
The Result type is a typedef for QFlags<ResultFlag>. It stores an OR combination of ResultFlag values.
See also QGestureRecognizer::recognize().
Implementations§
Source§impl ResultFlag
impl ResultFlag
Sourcepub const Ignore: ResultFlag
pub const Ignore: ResultFlag
The event does not change the state of the recognizer. (C++ enum variant: Ignore = 1
)
Sourcepub const MayBeGesture: ResultFlag
pub const MayBeGesture: ResultFlag
The event changed the internal state of the recognizer, but it isn’t clear yet if it is a gesture or not. The recognizer needs to filter more events to decide. Gesture recognizers in the MayBeGesture state may be reset automatically if they take too long to recognize gestures. (C++ enum variant: MayBeGesture = 2
)
Sourcepub const TriggerGesture: ResultFlag
pub const TriggerGesture: ResultFlag
The gesture has been triggered and the appropriate QGesture object will be delivered to the target as a part of a QGestureEvent. (C++ enum variant: TriggerGesture = 4
)
Sourcepub const FinishGesture: ResultFlag
pub const FinishGesture: ResultFlag
The gesture has been finished successfully and the appropriate QGesture object will be delivered to the target as a part of a QGestureEvent. (C++ enum variant: FinishGesture = 8
)
Sourcepub const CancelGesture: ResultFlag
pub const CancelGesture: ResultFlag
The event made it clear that it is not a gesture. If the gesture recognizer was in GestureTriggered state before, then the gesture is canceled and the appropriate QGesture object will be delivered to the target as a part of a QGestureEvent. (C++ enum variant: CancelGesture = 16
)
Sourcepub const ResultStateMask: ResultFlag
pub const ResultStateMask: ResultFlag
C++ enum variant: ResultState_Mask = 255
Sourcepub const ConsumeEventHint: ResultFlag
pub const ConsumeEventHint: ResultFlag
This hint specifies that the gesture framework should consume the filtered event and not deliver it to the receiver. (C++ enum variant: ConsumeEventHint = 256
)
Sourcepub const ResultHintMask: ResultFlag
pub const ResultHintMask: ResultFlag
C++ enum variant: ResultHint_Mask = 65280
Trait Implementations§
Source§impl<T: Into<QFlags<ResultFlag>>> BitOr<T> for ResultFlag
impl<T: Into<QFlags<ResultFlag>>> BitOr<T> for ResultFlag
Source§impl Clone for ResultFlag
impl Clone for ResultFlag
Source§fn clone(&self) -> ResultFlag
fn clone(&self) -> ResultFlag
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more