author | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-30 11:20:47 (UTC) |
commit | fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb (patch) (unidiff) | |
tree | 32e68b5b483dd3ce8041542e7d95f0b6d8dbf644 /core/pim/todo/todoview.h | |
parent | bd692f7ebe04e23151cce39baf311b925ccf91b1 (diff) | |
download | opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.zip opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.tar.gz opie-fdda15344fdf7f71fd9e1e4db15ecc5e12224ddb.tar.bz2 |
Back from hospital with new power
This versions clean up m failure on templates with Qt... in todoview
Implements Recurrance( backends to not safe it yet )
OPimState and Maintainer mode in some ways
and much more
This one also implements the OPimMainWindow specs
and has a small Memu replacement to get the toolbar in one line
-rw-r--r-- | core/pim/todo/todoview.h | 82 |
1 files changed, 9 insertions, 73 deletions
diff --git a/core/pim/todo/todoview.h b/core/pim/todo/todoview.h index e5c77f9..e73e808 100644 --- a/core/pim/todo/todoview.h +++ b/core/pim/todo/todoview.h | |||
@@ -40,49 +40,12 @@ | |||
40 | 40 | ||
41 | 41 | ||
42 | namespace Todo { | 42 | namespace Todo { |
43 | |||
44 | /** | ||
45 | * According to tronical it's not possible | ||
46 | * to have Q_OBJECT in a template at all | ||
47 | * so this is a hack widget not meant | ||
48 | * to be public | ||
49 | */ | ||
50 | class InternQtHack : public QObject { | ||
51 | Q_OBJECT | ||
52 | public: | ||
53 | InternQtHack() : QObject() {}; | ||
54 | void emitShow(int uid) { emit showTodo(uid); } | ||
55 | void emitEdit(int uid) { emit edit(uid ); } | ||
56 | void emitUpdate( int uid, | ||
57 | const SmallTodo& to) { | ||
58 | emit update(uid, to ); | ||
59 | } | ||
60 | void emitUpdate( int uid, | ||
61 | const OTodo& ev ){ | ||
62 | emit update(uid, ev ); | ||
63 | } | ||
64 | void emitRemove( int uid ) { | ||
65 | emit remove( uid ); | ||
66 | } | ||
67 | void emitUpdate( QWidget* wid ) { | ||
68 | emit update( wid ); | ||
69 | } | ||
70 | signals: | ||
71 | void showTodo(int uid ); | ||
72 | void edit(int uid ); | ||
73 | void update( int uid, const Todo::SmallTodo& ); | ||
74 | void update( int uid, const OTodo& ); | ||
75 | /* sorry you need to cast */; | ||
76 | void update( QWidget* wid ); | ||
77 | void remove( int uid ); | ||
78 | |||
79 | }; | ||
80 | class MainWindow; | 43 | class MainWindow; |
81 | 44 | ||
82 | /** | 45 | /** |
83 | * due to inheretince problems we need this base class | 46 | * due to inheretince problems we need this base class |
84 | */ | 47 | */ |
85 | class ViewBase { | 48 | struct ViewBase { |
86 | public: | 49 | public: |
87 | virtual QWidget* widget() = 0; | 50 | virtual QWidget* widget() = 0; |
88 | virtual QString type()const = 0; | 51 | virtual QString type()const = 0; |
@@ -102,16 +65,7 @@ namespace Todo { | |||
102 | virtual void setShowDeadline( bool ) = 0; | 65 | virtual void setShowDeadline( bool ) = 0; |
103 | virtual void setShowCategory( const QString& = QString::null ) = 0; | 66 | virtual void setShowCategory( const QString& = QString::null ) = 0; |
104 | virtual void clear() = 0; | 67 | virtual void clear() = 0; |
105 | /* virtual QArray<int> completed() = 0; */ | ||
106 | virtual void newDay() = 0; | 68 | virtual void newDay() = 0; |
107 | |||
108 | virtual void connectShow( QObject*, const char* ) = 0; | ||
109 | virtual void connectEdit( QObject*, const char* ) = 0; | ||
110 | virtual void connectUpdateSmall( QObject*, const char* ) = 0; | ||
111 | virtual void connectUpdateBig( QObject*, const char* ) = 0; | ||
112 | virtual void connectUpdateView( QObject*, const char*) = 0; | ||
113 | virtual void connectRemove( QObject*, const char* ) = 0; | ||
114 | |||
115 | }; | 69 | }; |
116 | 70 | ||
117 | /** | 71 | /** |
@@ -138,21 +92,6 @@ namespace Todo { | |||
138 | */ | 92 | */ |
139 | virtual ~TodoView(); | 93 | virtual ~TodoView(); |
140 | 94 | ||
141 | /* connect to the show signal */ | ||
142 | void connectShow(QObject* obj, | ||
143 | const char* slot ); | ||
144 | |||
145 | /* connect to edit */ | ||
146 | void connectEdit( QObject* obj, | ||
147 | const char* slot ); | ||
148 | void connectUpdateSmall( QObject* obj, | ||
149 | const char* slot ); | ||
150 | void connectUpdateBig( QObject* obj, | ||
151 | const char* slot ) ; | ||
152 | void connectUpdateView( QObject* obj, | ||
153 | const char* slot ); | ||
154 | void connectRemove( QObject* obj, | ||
155 | const char* slot ); | ||
156 | protected: | 95 | protected: |
157 | MainWindow* todoWindow(); | 96 | MainWindow* todoWindow(); |
158 | OTodo event(int uid ); | 97 | OTodo event(int uid ); |
@@ -164,20 +103,17 @@ namespace Todo { | |||
164 | void setAscending( bool ); | 103 | void setAscending( bool ); |
165 | 104 | ||
166 | /* | 105 | /* |
167 | These things needs to be implemented | 106 | * These things needs to be implemented |
168 | in a implementation | 107 | * in a implementation |
169 | signals: | 108 | */ |
170 | */ | 109 | void showTodo( int uid ); |
171 | protected: | 110 | void edit( int uid ); |
172 | void showTodo( int uid ) { hack->emitShow(uid); } | ||
173 | void edit( int uid ) { hack->emitEdit(uid); } | ||
174 | void update(int uid, const SmallTodo& to ); | 111 | void update(int uid, const SmallTodo& to ); |
175 | void update(int uid, const OTodo& ev); | 112 | void update(int uid, const OTodo& ev); |
176 | void remove( int uid ) { | 113 | void remove( int uid ); |
177 | hack->emitRemove( uid ); | 114 | void complete( int uid ); |
178 | } | 115 | void complete( const OTodo& ev ); |
179 | private: | 116 | private: |
180 | InternQtHack* hack; | ||
181 | MainWindow *m_main; | 117 | MainWindow *m_main; |
182 | OTodoAccess::List m_sort; | 118 | OTodoAccess::List m_sort; |
183 | bool m_asc : 1; | 119 | bool m_asc : 1; |