OpenStructure
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
state_machine.hh
Go to the documentation of this file.
1 #ifndef PYTHON_SHELL_STATE_MACHINE_HH
2 #define PYTHON_SHELL_STATE_MACHINE_HH
3 
4 #include <QObject>
5 
6 //fw decl
7 class QEvent;
8 
9 namespace ost { namespace gui {
10 
11 //fw decl
12 class State;
13 
14 class StateMachine: public QObject{
15 Q_OBJECT
16 public:
17  StateMachine(QObject* parent);
18  void addState(State* state);
19  void setInitialState(State* state);
20  void start();
21  bool isActive(State* state);
22  void setActive(State* state);
23  bool eventFilter (QObject * watched, QEvent * event);
24 protected:
26 };
27 
28 }}//ns
29 
30 #endif // PYTHON_SHELL_STATE_MACHINE_HH