Diffstat (limited to 'noncore/unsupported/libopie/pim/opimstate.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/unsupported/libopie/pim/opimstate.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/noncore/unsupported/libopie/pim/opimstate.h b/noncore/unsupported/libopie/pim/opimstate.h new file mode 100644 index 0000000..cf6af46 --- a/dev/null +++ b/noncore/unsupported/libopie/pim/opimstate.h | |||
@@ -0,0 +1,46 @@ | |||
1 | #ifndef OPIE_PIM_STATE_H | ||
2 | #define OPIE_PIM_STATE_H | ||
3 | |||
4 | #include <qstring.h> | ||
5 | |||
6 | /** | ||
7 | * The State of a Task | ||
8 | * This class encapsules the state of a todo | ||
9 | * and it's shared too | ||
10 | */ | ||
11 | /* | ||
12 | * in c a simple struct would be enough ;) | ||
13 | * g_new_state(); | ||
14 | * g_do_some_thing( state_t* ); | ||
15 | * ;) | ||
16 | */ | ||
17 | class OPimState { | ||
18 | public: | ||
19 | enum State { | ||
20 | Started = 0, | ||
21 | Postponed, | ||
22 | Finished, | ||
23 | NotStarted, | ||
24 | Undefined | ||
25 | }; | ||
26 | OPimState( int state = Undefined ); | ||
27 | OPimState( const OPimState& ); | ||
28 | ~OPimState(); | ||
29 | |||
30 | bool operator==( const OPimState& ); | ||
31 | OPimState &operator=( const OPimState& ); | ||
32 | void setState( int state); | ||
33 | int state()const; | ||
34 | private: | ||
35 | void deref(); | ||
36 | inline void copyInternally(); | ||
37 | |||
38 | struct Data; | ||
39 | Data* data; | ||
40 | |||
41 | class Private; | ||
42 | Private *d; | ||
43 | }; | ||
44 | |||
45 | |||
46 | #endif | ||