00001 #ifndef PYTHON_SHELL_STATE_MACHINE_HH
00002 #define PYTHON_SHELL_STATE_MACHINE_HH
00003
00004 #include <QObject>
00005
00006
00007 class QEvent;
00008
00009 namespace ost { namespace gui {
00010
00011
00012 class State;
00013
00014 class StateMachine: public QObject{
00015 Q_OBJECT
00016 public:
00017 StateMachine(QObject* parent);
00018 void addState(State* state);
00019 void setInitialState(State* state);
00020 void start();
00021 bool isActive(State* state);
00022 void setActive(State* state);
00023 bool eventFilter (QObject * watched, QEvent * event);
00024 protected:
00025 State* active_state_;
00026 };
00027
00028 }}
00029
00030 #endif // PYTHON_SHELL_STATE_MACHINE_HH