author | zecke <zecke> | 2002-09-24 16:12:30 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-09-24 16:12:30 (UTC) |
commit | 262dfbf10d031ab8a80948cd1485d747ad2c931b (patch) (unidiff) | |
tree | eac43bd496fc1886584fcbf174271f0d396fbc3e | |
parent | 7b065f0388604e0485fa64a14abdf939dceab954 (diff) | |
download | opie-262dfbf10d031ab8a80948cd1485d747ad2c931b.zip opie-262dfbf10d031ab8a80948cd1485d747ad2c931b.tar.gz opie-262dfbf10d031ab8a80948cd1485d747ad2c931b.tar.bz2 |
this inline makes loading todos twice as fast
but there is still room for improvisation
-rw-r--r-- | libopie/pim/otodo.h | 2 | ||||
-rw-r--r-- | libopie2/opiepim/otodo.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/libopie/pim/otodo.h b/libopie/pim/otodo.h index 1443e4f..5bd91d6 100644 --- a/libopie/pim/otodo.h +++ b/libopie/pim/otodo.h | |||
@@ -102,108 +102,108 @@ public: | |||
102 | 102 | ||
103 | /** | 103 | /** |
104 | * The due Date | 104 | * The due Date |
105 | */ | 105 | */ |
106 | QDate dueDate()const; | 106 | QDate dueDate()const; |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * Alarm Date and Time | 109 | * Alarm Date and Time |
110 | */ | 110 | */ |
111 | QDateTime alarmDateTime()const; | 111 | QDateTime alarmDateTime()const; |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * The description of the todo | 114 | * The description of the todo |
115 | */ | 115 | */ |
116 | QString description()const; | 116 | QString description()const; |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * A small summary of the todo | 119 | * A small summary of the todo |
120 | */ | 120 | */ |
121 | QString summary() const; | 121 | QString summary() const; |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * @reimplemented | 124 | * @reimplemented |
125 | * Return this todoevent in a RichText formatted QString | 125 | * Return this todoevent in a RichText formatted QString |
126 | */ | 126 | */ |
127 | QString toRichText() const; | 127 | QString toRichText() const; |
128 | 128 | ||
129 | /** | 129 | /** |
130 | * reimplementation | 130 | * reimplementation |
131 | */ | 131 | */ |
132 | QString type()const; | 132 | QString type()const; |
133 | QString toShortText()const; | 133 | QString toShortText()const; |
134 | QMap<QString, QString> toExtraMap()const; | 134 | QMap<QString, QString> toExtraMap()const; |
135 | QString recordField(int id )const; | 135 | QString recordField(int id )const; |
136 | 136 | ||
137 | /** | 137 | /** |
138 | * toMap puts all data into the map. int relates | 138 | * toMap puts all data into the map. int relates |
139 | * to ToDoEvent RecordFields enum | 139 | * to ToDoEvent RecordFields enum |
140 | */ | 140 | */ |
141 | QMap<int, QString> toMap()const; | 141 | QMap<int, QString> toMap()const; |
142 | 142 | ||
143 | /** | 143 | /** |
144 | * Set if this Todo is completed | 144 | * Set if this Todo is completed |
145 | */ | 145 | */ |
146 | void setCompleted(bool completed ); | 146 | void setCompleted(bool completed ); |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * set if this todo got an end data | 149 | * set if this todo got an end data |
150 | */ | 150 | */ |
151 | void setHasDueDate( bool hasDate ); | 151 | void setHasDueDate( bool hasDate ); |
152 | 152 | ||
153 | /** | 153 | /** |
154 | * set if this todo has an alarm time and date | 154 | * set if this todo has an alarm time and date |
155 | */ | 155 | */ |
156 | void setHasAlarmDateTime ( bool hasAlarm ); | 156 | void setHasAlarmDateTime ( bool hasAlarm ); |
157 | 157 | ||
158 | /** | 158 | /** |
159 | * Set the priority of the Todo | 159 | * Set the priority of the Todo |
160 | */ | 160 | */ |
161 | void setPriority(int priority ); | 161 | void setPriority(int priority ); |
162 | 162 | ||
163 | /** | 163 | /** |
164 | * Set the progress. | 164 | * Set the progress. |
165 | */ | 165 | */ |
166 | void setProgress( ushort progress ); | 166 | void setProgress( ushort progress ); |
167 | 167 | ||
168 | /** | 168 | /** |
169 | * set the end date | 169 | * set the end date |
170 | */ | 170 | */ |
171 | void setDueDate( QDate date ); | 171 | void setDueDate( QDate date ); |
172 | 172 | ||
173 | /** | 173 | /** |
174 | * set the alarm time | 174 | * set the alarm time |
175 | */ | 175 | */ |
176 | void setAlarmDateTime ( const QDateTime& alarm ); | 176 | void setAlarmDateTime ( const QDateTime& alarm ); |
177 | 177 | ||
178 | void setDescription(const QString& ); | 178 | void setDescription(const QString& ); |
179 | void setSummary(const QString& ); | 179 | void setSummary(const QString& ); |
180 | bool isOverdue(); | 180 | bool isOverdue(); |
181 | 181 | ||
182 | 182 | ||
183 | bool match( const QRegExp &r )const; | 183 | bool match( const QRegExp &r )const; |
184 | 184 | ||
185 | bool operator<(const OTodo &toDoEvent )const; | 185 | bool operator<(const OTodo &toDoEvent )const; |
186 | bool operator<=(const OTodo &toDoEvent )const; | 186 | bool operator<=(const OTodo &toDoEvent )const; |
187 | bool operator!=(const OTodo &toDoEvent )const; | 187 | bool operator!=(const OTodo &toDoEvent )const; |
188 | bool operator>(const OTodo &toDoEvent )const; | 188 | bool operator>(const OTodo &toDoEvent )const; |
189 | bool operator>=(const OTodo &toDoEvent)const; | 189 | bool operator>=(const OTodo &toDoEvent)const; |
190 | bool operator==(const OTodo &toDoEvent )const; | 190 | bool operator==(const OTodo &toDoEvent )const; |
191 | OTodo &operator=(const OTodo &toDoEvent ); | 191 | OTodo &operator=(const OTodo &toDoEvent ); |
192 | 192 | ||
193 | private: | 193 | private: |
194 | class OTodoPrivate; | 194 | class OTodoPrivate; |
195 | struct OTodoData; | 195 | struct OTodoData; |
196 | 196 | ||
197 | void deref(); | 197 | void deref(); |
198 | void changeOrModify(); | 198 | inline void changeOrModify(); |
199 | void copy( OTodoData* src, OTodoData* dest ); | 199 | void copy( OTodoData* src, OTodoData* dest ); |
200 | OTodoPrivate *d; | 200 | OTodoPrivate *d; |
201 | OTodoData *data; | 201 | OTodoData *data; |
202 | 202 | ||
203 | }; | 203 | }; |
204 | inline bool OTodo::operator!=(const OTodo &toDoEvent )const { | 204 | inline bool OTodo::operator!=(const OTodo &toDoEvent )const { |
205 | return !(*this == toDoEvent); | 205 | return !(*this == toDoEvent); |
206 | } | 206 | } |
207 | 207 | ||
208 | 208 | ||
209 | #endif | 209 | #endif |
diff --git a/libopie2/opiepim/otodo.h b/libopie2/opiepim/otodo.h index 1443e4f..5bd91d6 100644 --- a/libopie2/opiepim/otodo.h +++ b/libopie2/opiepim/otodo.h | |||
@@ -102,108 +102,108 @@ public: | |||
102 | 102 | ||
103 | /** | 103 | /** |
104 | * The due Date | 104 | * The due Date |
105 | */ | 105 | */ |
106 | QDate dueDate()const; | 106 | QDate dueDate()const; |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * Alarm Date and Time | 109 | * Alarm Date and Time |
110 | */ | 110 | */ |
111 | QDateTime alarmDateTime()const; | 111 | QDateTime alarmDateTime()const; |
112 | 112 | ||
113 | /** | 113 | /** |
114 | * The description of the todo | 114 | * The description of the todo |
115 | */ | 115 | */ |
116 | QString description()const; | 116 | QString description()const; |
117 | 117 | ||
118 | /** | 118 | /** |
119 | * A small summary of the todo | 119 | * A small summary of the todo |
120 | */ | 120 | */ |
121 | QString summary() const; | 121 | QString summary() const; |
122 | 122 | ||
123 | /** | 123 | /** |
124 | * @reimplemented | 124 | * @reimplemented |
125 | * Return this todoevent in a RichText formatted QString | 125 | * Return this todoevent in a RichText formatted QString |
126 | */ | 126 | */ |
127 | QString toRichText() const; | 127 | QString toRichText() const; |
128 | 128 | ||
129 | /** | 129 | /** |
130 | * reimplementation | 130 | * reimplementation |
131 | */ | 131 | */ |
132 | QString type()const; | 132 | QString type()const; |
133 | QString toShortText()const; | 133 | QString toShortText()const; |
134 | QMap<QString, QString> toExtraMap()const; | 134 | QMap<QString, QString> toExtraMap()const; |
135 | QString recordField(int id )const; | 135 | QString recordField(int id )const; |
136 | 136 | ||
137 | /** | 137 | /** |
138 | * toMap puts all data into the map. int relates | 138 | * toMap puts all data into the map. int relates |
139 | * to ToDoEvent RecordFields enum | 139 | * to ToDoEvent RecordFields enum |
140 | */ | 140 | */ |
141 | QMap<int, QString> toMap()const; | 141 | QMap<int, QString> toMap()const; |
142 | 142 | ||
143 | /** | 143 | /** |
144 | * Set if this Todo is completed | 144 | * Set if this Todo is completed |
145 | */ | 145 | */ |
146 | void setCompleted(bool completed ); | 146 | void setCompleted(bool completed ); |
147 | 147 | ||
148 | /** | 148 | /** |
149 | * set if this todo got an end data | 149 | * set if this todo got an end data |
150 | */ | 150 | */ |
151 | void setHasDueDate( bool hasDate ); | 151 | void setHasDueDate( bool hasDate ); |
152 | 152 | ||
153 | /** | 153 | /** |
154 | * set if this todo has an alarm time and date | 154 | * set if this todo has an alarm time and date |
155 | */ | 155 | */ |
156 | void setHasAlarmDateTime ( bool hasAlarm ); | 156 | void setHasAlarmDateTime ( bool hasAlarm ); |
157 | 157 | ||
158 | /** | 158 | /** |
159 | * Set the priority of the Todo | 159 | * Set the priority of the Todo |
160 | */ | 160 | */ |
161 | void setPriority(int priority ); | 161 | void setPriority(int priority ); |
162 | 162 | ||
163 | /** | 163 | /** |
164 | * Set the progress. | 164 | * Set the progress. |
165 | */ | 165 | */ |
166 | void setProgress( ushort progress ); | 166 | void setProgress( ushort progress ); |
167 | 167 | ||
168 | /** | 168 | /** |
169 | * set the end date | 169 | * set the end date |
170 | */ | 170 | */ |
171 | void setDueDate( QDate date ); | 171 | void setDueDate( QDate date ); |
172 | 172 | ||
173 | /** | 173 | /** |
174 | * set the alarm time | 174 | * set the alarm time |
175 | */ | 175 | */ |
176 | void setAlarmDateTime ( const QDateTime& alarm ); | 176 | void setAlarmDateTime ( const QDateTime& alarm ); |
177 | 177 | ||
178 | void setDescription(const QString& ); | 178 | void setDescription(const QString& ); |
179 | void setSummary(const QString& ); | 179 | void setSummary(const QString& ); |
180 | bool isOverdue(); | 180 | bool isOverdue(); |
181 | 181 | ||
182 | 182 | ||
183 | bool match( const QRegExp &r )const; | 183 | bool match( const QRegExp &r )const; |
184 | 184 | ||
185 | bool operator<(const OTodo &toDoEvent )const; | 185 | bool operator<(const OTodo &toDoEvent )const; |
186 | bool operator<=(const OTodo &toDoEvent )const; | 186 | bool operator<=(const OTodo &toDoEvent )const; |
187 | bool operator!=(const OTodo &toDoEvent )const; | 187 | bool operator!=(const OTodo &toDoEvent )const; |
188 | bool operator>(const OTodo &toDoEvent )const; | 188 | bool operator>(const OTodo &toDoEvent )const; |
189 | bool operator>=(const OTodo &toDoEvent)const; | 189 | bool operator>=(const OTodo &toDoEvent)const; |
190 | bool operator==(const OTodo &toDoEvent )const; | 190 | bool operator==(const OTodo &toDoEvent )const; |
191 | OTodo &operator=(const OTodo &toDoEvent ); | 191 | OTodo &operator=(const OTodo &toDoEvent ); |
192 | 192 | ||
193 | private: | 193 | private: |
194 | class OTodoPrivate; | 194 | class OTodoPrivate; |
195 | struct OTodoData; | 195 | struct OTodoData; |
196 | 196 | ||
197 | void deref(); | 197 | void deref(); |
198 | void changeOrModify(); | 198 | inline void changeOrModify(); |
199 | void copy( OTodoData* src, OTodoData* dest ); | 199 | void copy( OTodoData* src, OTodoData* dest ); |
200 | OTodoPrivate *d; | 200 | OTodoPrivate *d; |
201 | OTodoData *data; | 201 | OTodoData *data; |
202 | 202 | ||
203 | }; | 203 | }; |
204 | inline bool OTodo::operator!=(const OTodo &toDoEvent )const { | 204 | inline bool OTodo::operator!=(const OTodo &toDoEvent )const { |
205 | return !(*this == toDoEvent); | 205 | return !(*this == toDoEvent); |
206 | } | 206 | } |
207 | 207 | ||
208 | 208 | ||
209 | #endif | 209 | #endif |