PythonQt.Qt.QSignalTransition
QSignalTransition
PythonQtInstanceWrapper object
Native bases: PythonQtInstanceWrapper
Supplemental documentation: Qt 5 reference:
Detailed Description
Typically you would use the overload of QState::addTransition() that takes a sender and signal as arguments, rather than creating QSignalTransition objects directly. QSignalTransition is part of The State Machine Framework.
You can subclass QSignalTransition and reimplement eventTest() to make a signal transition conditional; the event object passed to eventTest() will be a QStateMachine::SignalEvent object. Example:
class CheckedTransition : public QSignalTransition
{
public:
CheckedTransition(QCheckBox *check)
: QSignalTransition(check, SIGNAL(stateChanged(int))) {}
protected:
bool eventTest(QEvent *e) {
if (!QSignalTransition::eventTest(e))
return false;
QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
return (se->arguments().at(0).toInt() == Qt::Checked);
}
};
...
QCheckBox *check = new QCheckBox();
check->setTristate(true);
QState *s1 = new QState();
QState *s2 = new QState();
CheckedTransition *t1 = new CheckedTransition(check);
t1->setTargetState(s2);
s1->addTransition(t1);
Source: https://doc.qt.io/archives/qt-5.15/qsignaltransition.html
Complete member index
Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.
| Member | Kind | Signature | Summary |
|---|---|---|---|
ExternalTransition |
attribute | Any |
(shared captured text) |
InternalTransition |
attribute | Any |
(shared captured text) |
TransitionType |
attribute | type |
Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text) |
__init__ |
function | (self, *args: Any, **kwargs: Any) -> None |
Native constructor; consult class documentation for supported overloads. (shared captured text) |
addAnimation |
function | (self, animation: Any) -> Any |
(shared captured text) |
animations |
function | (self) -> tuple |
X.animations() -> tuple (shared captured text) |
blockSignals |
function | (self, b: Any) -> bool |
X.blockSignals(b) -> bool (shared captured text) |
childEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
children |
function | (self) -> tuple |
X.children() -> tuple (shared captured text) |
className |
function | (self, *args: Any, **kwargs: Any) -> Any |
Return the classname of the object (shared captured text) |
connect |
function | (self, signal: Any, receiver: Any, slot: Any, type: Any) -> bool |
X.connect(signal, receiver, slot, type) -> bool (shared captured text) |
customEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
delete |
function | (self, *args: Any, **kwargs: Any) -> Any |
Deletes the C++ object (at your own risk, my friend!) (shared captured text) |
deleteLater |
function | (self) -> Any |
(shared captured text) |
destroyed |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QSignalTransition.destroyed; argument details are not documented. |
disconnect |
function | (self, signal: Any, receiver: Any, slot: Any) -> bool |
X.disconnect(signal, receiver, slot) -> bool (shared captured text) |
dumpObjectInfo |
function | (self) -> Any |
(shared captured text) |
dumpObjectTree |
function | (self) -> Any |
(shared captured text) |
dynamicPropertyNames |
function | (self) -> Any |
(shared captured text) |
event |
function | (self, e: Any) -> bool |
X.event(e) -> bool (shared captured text) |
eventFilter |
function | (self, watched: Any, event: Any) -> bool |
X.eventFilter(watched, event) -> bool (shared captured text) |
eventTest |
function | (self, event: Any) -> bool |
X.eventTest(event) -> bool (shared captured text) |
findChild |
function | (self, type: Any, name: Any) -> Any |
X.findChild(type, name) -> PythonQt.private.QObject (shared captured text) |
findChildren |
function | (self, type: Any, name: Any) -> tuple |
X.findChildren(type, name) -> tuple (shared captured text) |
help |
function | (self, *args: Any, **kwargs: Any) -> Any |
Shows the help of available methods for this class (shared captured text) |
inherits |
function | (self, *args: Any, **kwargs: Any) -> Any |
Returns if the class inherits or is of given type name (shared captured text) |
installEventFilter |
function | (self, filterObj: Any) -> Any |
(shared captured text) |
isSignalConnected |
function | (self, signal: Any) -> bool |
X.isSignalConnected(signal) -> bool (shared captured text) |
isWidgetType |
function | (self) -> bool |
X.isWidgetType() -> bool (shared captured text) |
isWindowType |
function | (self) -> bool |
X.isWindowType() -> bool (shared captured text) |
killTimer |
function | (self, id: Any) -> Any |
(shared captured text) |
machine |
function | (self) -> Any |
X.machine() -> PythonQt.QtCore.QStateMachine (shared captured text) |
metaObject |
function | (self) -> Any |
X.metaObject() -> PythonQt.QtCore.QMetaObject (shared captured text) |
moveToThread |
function | (self, thread: Any) -> Any |
(shared captured text) |
objectName |
attribute | Any |
(shared captured text) |
objectNameChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QSignalTransition.objectNameChanged; argument details are not documented. |
onTransition |
function | (self, event: Any) -> None |
Reimplements: [QAbstractTransition::onTransition](https://doc.qt.io/archives/qt-5.15/qabstracttransition.html#onTransition)(QEvent *event). (shared captured text) |
parent |
function | (self) -> Any |
X.parent() -> PythonQt.private.QObject (shared captured text) |
property |
function | (self, name: Any) -> Any |
X.property(name) -> object (shared captured text) |
removeAnimation |
function | (self, animation: Any) -> Any |
(shared captured text) |
removeEventFilter |
function | (self, obj: Any) -> Any |
(shared captured text) |
sender |
function | (self) -> Any |
X.sender() -> PythonQt.private.QObject (shared captured text) |
senderObject |
attribute | QObject |
This property holds the sender object that this signal transition is associated with (shared captured text) |
senderObjectChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QSignalTransition.senderObjectChanged; argument details are not documented. |
senderSignalIndex |
function | (self) -> int |
X.senderSignalIndex() -> int (shared captured text) |
setObjectName |
function | (self, name: Any) -> Any |
(shared captured text) |
setParent |
function | (self, parent: Any) -> Any |
(shared captured text) |
setProperty |
function | (self, name: Any, value: Any) -> bool |
X.setProperty(name, value) -> bool (shared captured text) |
setSenderObject |
function | (self, sender: Any) -> None |
Sets the sender object associated with this signal transition. (shared captured text) |
setSignal |
function | (self, signal: Any) -> None |
Sets the signal associated with this signal transition. (shared captured text) |
setTargetState |
function | (self, target: Any) -> Any |
(shared captured text) |
setTargetStates |
function | (self, targets: Any) -> Any |
(shared captured text) |
setTransitionType |
function | (self, type: Any) -> Any |
(shared captured text) |
signal |
attribute | bytes |
This property holds the signal that this signal transition is associated with (shared captured text) |
signalChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QSignalTransition.signalChanged; argument details are not documented. |
signalsBlocked |
function | (self) -> bool |
X.signalsBlocked() -> bool (shared captured text) |
sourceState |
attribute | QState |
(shared captured text) |
startTimer |
function | (self, interval: Any, timerType: Any) -> int |
X.startTimer(interval, timerType) -> int (shared captured text) |
targetState |
attribute | QAbstractState |
(shared captured text) |
targetStateChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QSignalTransition.targetStateChanged; argument details are not documented. |
targetStates |
attribute | Any |
(shared captured text) |
targetStatesChanged |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QSignalTransition.targetStatesChanged; argument details are not documented. |
thread |
function | (self) -> Any |
(shared captured text) |
timerEvent |
function | (self, event: Any) -> Any |
(shared captured text) |
tr |
function | (self, text: Any, ambig: Any, n: Any) -> str |
X.tr(text, ambig, n) -> str (shared captured text) |
transitionType |
attribute | Any |
(shared captured text) |
triggered |
function | (self, *args: Any, **kwargs: Any) -> Any |
Native PythonQt.Qt.QSignalTransition.triggered; argument details are not documented. |