ArchitectureColoredPainting/qt-material-widgets/components/lib/qtmaterialstatetransition.cpp

20 lines
509 B
C++
Raw Permalink Normal View History

2023-03-06 12:38:25 +08:00
#include "lib/qtmaterialstatetransition.h"
QtMaterialStateTransition::QtMaterialStateTransition(QtMaterialStateTransitionType type)
: m_type(type)
{
}
bool QtMaterialStateTransition::eventTest(QEvent *event)
{
if (event->type() != QEvent::Type(QEvent::User + 1)) {
return false;
}
QtMaterialStateTransitionEvent *transition = static_cast<QtMaterialStateTransitionEvent *>(event);
return (m_type == transition->type);
}
void QtMaterialStateTransition::onTransition(QEvent *)
{
}