2017-09-29 09:50:04 +00:00
|
|
|
#include "lib/qtmaterialstatetransition.h"
|
|
|
|
|
2022-02-17 01:59:33 +00:00
|
|
|
namespace md
|
|
|
|
{
|
|
|
|
StateTransition::StateTransition(StateTransitionType type)
|
2017-09-29 09:50:04 +00:00
|
|
|
: m_type(type)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2022-02-17 01:59:33 +00:00
|
|
|
bool StateTransition::eventTest(QEvent *event)
|
2017-09-29 09:50:04 +00:00
|
|
|
{
|
|
|
|
if (event->type() != QEvent::Type(QEvent::User + 1)) {
|
|
|
|
return false;
|
|
|
|
}
|
2022-02-17 01:59:33 +00:00
|
|
|
StateTransitionEvent *transition = static_cast<StateTransitionEvent *>(event);
|
2017-09-29 09:50:04 +00:00
|
|
|
return (m_type == transition->type);
|
|
|
|
}
|
|
|
|
|
2022-02-17 01:59:33 +00:00
|
|
|
void StateTransition::onTransition(QEvent *)
|
2017-09-29 09:50:04 +00:00
|
|
|
{
|
|
|
|
}
|
2022-02-17 01:59:33 +00:00
|
|
|
}
|