summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/animation/stickman/lifecycle.cpp2
-rw-r--r--examples/statemachine/factorial/main.cpp6
-rw-r--r--examples/statemachine/rogue/movementtransition.h6
3 files changed, 7 insertions, 7 deletions
diff --git a/examples/animation/stickman/lifecycle.cpp b/examples/animation/stickman/lifecycle.cpp
index f5dca74..250fb85 100644
--- a/examples/animation/stickman/lifecycle.cpp
+++ b/examples/animation/stickman/lifecycle.cpp
@@ -64,7 +64,7 @@ public:
virtual bool eventTest(QEvent *e)
{
if (QSignalTransition::eventTest(e)) {
- QVariant key = static_cast<QSignalEvent*>(e)->arguments().at(0);
+ QVariant key = static_cast<QStateMachine::SignalEvent*>(e)->arguments().at(0);
return (key.toInt() == int(m_key));
}
diff --git a/examples/statemachine/factorial/main.cpp b/examples/statemachine/factorial/main.cpp
index 54f4ec0..018b84f 100644
--- a/examples/statemachine/factorial/main.cpp
+++ b/examples/statemachine/factorial/main.cpp
@@ -98,13 +98,13 @@ public:
{
if (!QSignalTransition::eventTest(e))
return false;
- QSignalEvent *se = static_cast<QSignalEvent*>(e);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
return se->arguments().at(0).toInt() > 1;
}
virtual void onTransition(QEvent *e)
{
- QSignalEvent *se = static_cast<QSignalEvent*>(e);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
int x = se->arguments().at(0).toInt();
int fac = m_fact->property("fac").toInt();
m_fact->setProperty("fac", x * fac);
@@ -128,7 +128,7 @@ public:
{
if (!QSignalTransition::eventTest(e))
return false;
- QSignalEvent *se = static_cast<QSignalEvent*>(e);
+ QStateMachine::SignalEvent *se = static_cast<QStateMachine::SignalEvent*>(e);
return se->arguments().at(0).toInt() <= 1;
}
diff --git a/examples/statemachine/rogue/movementtransition.h b/examples/statemachine/rogue/movementtransition.h
index dbaf8d9..b919360 100644
--- a/examples/statemachine/rogue/movementtransition.h
+++ b/examples/statemachine/rogue/movementtransition.h
@@ -62,8 +62,8 @@ public:
protected:
bool eventTest(QEvent *event) {
if (event->type() == QEvent::Wrapped &&
- static_cast<QWrappedEvent *>(event)->event()->type() == QEvent::KeyPress) {
- QEvent *wrappedEvent = static_cast<QWrappedEvent *>(event)->event();
+ static_cast<QStateMachine::WrappedEvent *>(event)->event()->type() == QEvent::KeyPress) {
+ QEvent *wrappedEvent = static_cast<QStateMachine::WrappedEvent *>(event)->event();
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(wrappedEvent);
int key = keyEvent->key();
@@ -78,7 +78,7 @@ protected:
//![2]
void onTransition(QEvent *event) {
QKeyEvent *keyEvent = static_cast<QKeyEvent *>(
- static_cast<QWrappedEvent *>(event)->event());
+ static_cast<QStateMachine::WrappedEvent *>(event)->event());
int key = keyEvent->key();
switch (key) {