qt-material-widgets/components/drawer_internal.h

37 lines
691 B
C
Raw Normal View History

2016-06-24 04:50:11 +00:00
#ifndef DRAWER_INTERNAL_H
#define DRAWER_INTERNAL_H
2016-06-24 04:50:24 +00:00
#include <QStateMachine>
class Drawer;
class DrawerStateMachine : public QStateMachine
{
Q_OBJECT
Q_PROPERTY(int offset WRITE setOffset READ offset)
public:
explicit DrawerStateMachine(Drawer *drawer);
~DrawerStateMachine();
void setOffset(int offset);
inline int offset() const { return m_offset; }
2016-06-24 05:06:14 +00:00
void updatePropertyAssignments();
2016-06-24 04:50:24 +00:00
signals:
void enterOpenedState();
void enterClosedState();
private:
Q_DISABLE_COPY(DrawerStateMachine)
Drawer *const m_drawer;
QState *const m_openState;
QState *const m_closedState;
int m_offset;
};
2016-06-24 04:50:11 +00:00
#endif // DRAWER_INTERNAL_H