-rw-r--r-- | korganizer/kolistview.h | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h index 0d9c525..eca71e2 100644 --- a/korganizer/kolistview.h +++ b/korganizer/kolistview.h | |||
@@ -130,177 +130,175 @@ void pickAlarmSound() | |||
130 | if (!fileName.isEmpty()) { | 130 | if (!fileName.isEmpty()) { |
131 | mAlarmSound = fileName; | 131 | mAlarmSound = fileName; |
132 | mAlarmLabel->setText( "..."+fileName.right( 30 ) ); | 132 | mAlarmLabel->setText( "..."+fileName.right( 30 ) ); |
133 | QToolTip::remove(mAlarmSoundButton); | 133 | QToolTip::remove(mAlarmSoundButton); |
134 | QString dispStr = i18n("Playing '%1'").arg(fileName); | 134 | QString dispStr = i18n("Playing '%1'").arg(fileName); |
135 | QToolTip::add(mAlarmSoundButton, dispStr); | 135 | QToolTip::add(mAlarmSoundButton, dispStr); |
136 | mAlarmProgramButton->setOn(false); | 136 | mAlarmProgramButton->setOn(false); |
137 | mAlarmSoundButton->setOn(true); | 137 | mAlarmSoundButton->setOn(true); |
138 | } else { | 138 | } else { |
139 | mAlarmProgramButton->setOn(true); | 139 | mAlarmProgramButton->setOn(true); |
140 | mAlarmSoundButton->setOn(false); | 140 | mAlarmSoundButton->setOn(false); |
141 | 141 | ||
142 | } | 142 | } |
143 | } | 143 | } |
144 | }; | 144 | }; |
145 | 145 | ||
146 | void pickAlarmProgram() | 146 | void pickAlarmProgram() |
147 | { | 147 | { |
148 | if (!mAlarmProgramButton->isOn()) { | 148 | if (!mAlarmProgramButton->isOn()) { |
149 | //mAlarmProgram = ""; | 149 | //mAlarmProgram = ""; |
150 | QToolTip::remove(mAlarmProgramButton); | 150 | QToolTip::remove(mAlarmProgramButton); |
151 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); | 151 | QToolTip::add(mAlarmProgramButton, i18n("No program set")); |
152 | mAlarmProgramButton->setOn(false); | 152 | mAlarmProgramButton->setOn(false); |
153 | mAlarmSoundButton->setOn(true); | 153 | mAlarmSoundButton->setOn(true); |
154 | } else { | 154 | } else { |
155 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); | 155 | QString fileName(KFileDialog::getOpenFileName(mAlarmProgram,i18n("Procedure Alarm.: ") , 0)); |
156 | if (!fileName.isEmpty()) { | 156 | if (!fileName.isEmpty()) { |
157 | mAlarmProgram = fileName; | 157 | mAlarmProgram = fileName; |
158 | mAlarmLabel->setText( "..."+fileName.right( 30 ) ); | 158 | mAlarmLabel->setText( "..."+fileName.right( 30 ) ); |
159 | QToolTip::remove(mAlarmProgramButton); | 159 | QToolTip::remove(mAlarmProgramButton); |
160 | QString dispStr = i18n("Running '%1'").arg(fileName); | 160 | QString dispStr = i18n("Running '%1'").arg(fileName); |
161 | QToolTip::add(mAlarmProgramButton, dispStr); | 161 | QToolTip::add(mAlarmProgramButton, dispStr); |
162 | mAlarmSoundButton->setOn(false); | 162 | mAlarmSoundButton->setOn(false); |
163 | mAlarmProgramButton->setOn(true); | 163 | mAlarmProgramButton->setOn(true); |
164 | } else { | 164 | } else { |
165 | mAlarmProgramButton->setOn(false); | 165 | mAlarmProgramButton->setOn(false); |
166 | mAlarmSoundButton->setOn(true); | 166 | mAlarmSoundButton->setOn(true); |
167 | } | 167 | } |
168 | } | 168 | } |
169 | }; | 169 | }; |
170 | 170 | ||
171 | }; | 171 | }; |
172 | 172 | ||
173 | 173 | ||
174 | 174 | ||
175 | 175 | ||
176 | 176 | ||
177 | 177 | ||
178 | 178 | ||
179 | typedef CustomListViewItem<Incidence *> KOListViewItem; | 179 | typedef CustomListViewItem<Incidence *> KOListViewItem; |
180 | 180 | ||
181 | /** | 181 | /** |
182 | This class provides the initialisation of a KOListViewItem for calendar | 182 | This class provides the initialisation of a KOListViewItem for calendar |
183 | components using the Incidence::Visitor. | 183 | components using the Incidence::Visitor. |
184 | */ | 184 | */ |
185 | class ListItemVisitor : public Incidence::Visitor | 185 | class ListItemVisitor : public Incidence::Visitor |
186 | { | 186 | { |
187 | public: | 187 | public: |
188 | ListItemVisitor(KOListViewItem *, QDate d); | 188 | ListItemVisitor(KOListViewItem *, QDate d); |
189 | ~ListItemVisitor(); | 189 | ~ListItemVisitor(); |
190 | 190 | ||
191 | bool visit(Event *); | 191 | bool visit(Event *); |
192 | bool visit(Todo *); | 192 | bool visit(Todo *); |
193 | bool visit(Journal *); | 193 | bool visit(Journal *); |
194 | 194 | ||
195 | private: | 195 | private: |
196 | KOListViewItem *mItem; | 196 | KOListViewItem *mItem; |
197 | QDate mDate; | 197 | QDate mDate; |
198 | }; | 198 | }; |
199 | 199 | ||
200 | /** | 200 | /** |
201 | This class provides a multi-column list view of events. It can | 201 | This class provides a multi-column list view of events. It can |
202 | display events from one particular day or several days, it doesn't | 202 | display events from one particular day or several days, it doesn't |
203 | matter. To use a view that only handles one day at a time, use | 203 | matter. To use a view that only handles one day at a time, use |
204 | KODayListView. | 204 | KODayListView. |
205 | 205 | ||
206 | @short multi-column list view of various events. | 206 | @short multi-column list view of various events. |
207 | @author Preston Brown <pbrown@kde.org> | 207 | @author Preston Brown <pbrown@kde.org> |
208 | @see KOBaseView, KODayListView | 208 | @see KOBaseView, KODayListView |
209 | */ | 209 | */ |
210 | class KOListView; | 210 | class KOListView; |
211 | 211 | ||
212 | class KOListViewListView : public KListView | 212 | class KOListViewListView : public KListView |
213 | { | 213 | { |
214 | Q_OBJECT | 214 | Q_OBJECT |
215 | public: | 215 | public: |
216 | KOListViewListView(KOListView * lv ); | 216 | KOListViewListView(KOListView * lv ); |
217 | signals: | 217 | signals: |
218 | void newEvent(); | 218 | void newEvent(); |
219 | void showIncidence( Incidence* ); | 219 | void showIncidence( Incidence* ); |
220 | private: | 220 | private: |
221 | void keyPressEvent ( QKeyEvent * ) ; | 221 | void keyPressEvent ( QKeyEvent * ) ; |
222 | void contentsMouseDoubleClickEvent(QMouseEvent *e); | 222 | void contentsMouseDoubleClickEvent(QMouseEvent *e); |
223 | void contentsMousePressEvent(QMouseEvent *e); | 223 | void contentsMousePressEvent(QMouseEvent *e); |
224 | void contentsMouseReleaseEvent(QMouseEvent *e); | 224 | void contentsMouseReleaseEvent(QMouseEvent *e); |
225 | void contentsMouseMoveEvent(QMouseEvent *e); | 225 | void contentsMouseMoveEvent(QMouseEvent *e); |
226 | bool mAllowPopupMenu; | ||
227 | bool mMouseDown; | 226 | bool mMouseDown; |
228 | int mYMousePos; | ||
229 | }; | 227 | }; |
230 | 228 | ||
231 | class KOListView : public KOEventView | 229 | class KOListView : public KOEventView |
232 | { | 230 | { |
233 | Q_OBJECT | 231 | Q_OBJECT |
234 | public: | 232 | public: |
235 | KOListView(Calendar *calendar, QWidget *parent = 0, | 233 | KOListView(Calendar *calendar, QWidget *parent = 0, |
236 | const char *name = 0); | 234 | const char *name = 0); |
237 | ~KOListView(); | 235 | ~KOListView(); |
238 | 236 | ||
239 | virtual int maxDatesHint(); | 237 | virtual int maxDatesHint(); |
240 | virtual int currentDateCount(); | 238 | virtual int currentDateCount(); |
241 | virtual QPtrList<Incidence> selectedIncidences(); | 239 | virtual QPtrList<Incidence> selectedIncidences(); |
242 | virtual DateList selectedDates(); | 240 | virtual DateList selectedDates(); |
243 | 241 | ||
244 | void showDates(bool show); | 242 | void showDates(bool show); |
245 | Incidence* currentItem(); | 243 | Incidence* currentItem(); |
246 | void addTodos(QPtrList<Todo> eventList); | 244 | void addTodos(QPtrList<Todo> eventList); |
247 | void addJournals(QPtrList<Journal> eventList); | 245 | void addJournals(QPtrList<Journal> eventList); |
248 | virtual void printPreview(CalPrinter *calPrinter, | 246 | virtual void printPreview(CalPrinter *calPrinter, |
249 | const QDate &, const QDate &); | 247 | const QDate &, const QDate &); |
250 | 248 | ||
251 | void readSettings(KConfig *config, QString setting = "KOListView Layout"); | 249 | void readSettings(KConfig *config, QString setting = "KOListView Layout"); |
252 | void writeSettings(KConfig *config, QString setting = "KOListView Layout"); | 250 | void writeSettings(KConfig *config, QString setting = "KOListView Layout"); |
253 | void updateList(); | 251 | void updateList(); |
254 | void setStartDate(const QDate &start); | 252 | void setStartDate(const QDate &start); |
255 | int count(); | 253 | int count(); |
256 | QString getWhatsThisText(QPoint p); | 254 | QString getWhatsThisText(QPoint p); |
257 | void resetFocus(); | 255 | void resetFocus(); |
258 | signals: | 256 | signals: |
259 | void signalNewEvent(); | 257 | void signalNewEvent(); |
260 | void beamIncidenceList(QPtrList<Incidence>); | 258 | void beamIncidenceList(QPtrList<Incidence>); |
261 | 259 | ||
262 | public slots: | 260 | public slots: |
263 | virtual void updateView(); | 261 | virtual void updateView(); |
264 | virtual void showDates(const QDate &start, const QDate &end); | 262 | virtual void showDates(const QDate &start, const QDate &end); |
265 | virtual void showEvents(QPtrList<Event> eventList); | 263 | virtual void showEvents(QPtrList<Event> eventList); |
266 | void clearSelection(); | 264 | void clearSelection(); |
267 | void allSelection(); | 265 | void allSelection(); |
268 | 266 | ||
269 | void clear(); | 267 | void clear(); |
270 | void beamDone( Ir *ir ); | 268 | void beamDone( Ir *ir ); |
271 | void showDates(); | 269 | void showDates(); |
272 | void hideDates(); | 270 | void hideDates(); |
273 | void deleteAll(); | 271 | void deleteAll(); |
274 | void saveToFile(); | 272 | void saveToFile(); |
275 | void saveToFileVCS(); | 273 | void saveToFileVCS(); |
276 | void saveDescriptionToFile(); | 274 | void saveDescriptionToFile(); |
277 | void beamSelected(); | 275 | void beamSelected(); |
278 | void updateConfig(); | 276 | void updateConfig(); |
279 | void addCat(); | 277 | void addCat(); |
280 | void setCat(); | 278 | void setCat(); |
281 | void setAlarm(); | 279 | void setAlarm(); |
282 | void setCategories( bool removeOld ); | 280 | void setCategories( bool removeOld ); |
283 | void changeEventDisplay(Event *, int); | 281 | void changeEventDisplay(Event *, int); |
284 | 282 | ||
285 | void defaultItemAction(QListViewItem *item); | 283 | void defaultItemAction(QListViewItem *item); |
286 | void popupMenu(QListViewItem *item,const QPoint &,int); | 284 | void popupMenu(QListViewItem *item,const QPoint &,int); |
287 | 285 | ||
288 | protected slots: | 286 | protected slots: |
289 | void processSelectionChange(QListViewItem *); | 287 | void processSelectionChange(QListViewItem *); |
290 | 288 | ||
291 | protected: | 289 | protected: |
292 | void writeToFile( bool iCal ); | 290 | void writeToFile( bool iCal ); |
293 | void addEvents(QPtrList<Event> eventList); | 291 | void addEvents(QPtrList<Event> eventList); |
294 | void addIncidence(Incidence *); | 292 | void addIncidence(Incidence *); |
295 | KOListViewItem *getItemForEvent(Event *event); | 293 | KOListViewItem *getItemForEvent(Event *event); |
296 | 294 | ||
297 | private: | 295 | private: |
298 | KOListViewListView *mListView; | 296 | KOListViewListView *mListView; |
299 | KOEventPopupMenu *mPopupMenu; | 297 | KOEventPopupMenu *mPopupMenu; |
300 | KOListViewItem *mActiveItem; | 298 | KOListViewItem *mActiveItem; |
301 | QDict<Incidence> mUidDict; | 299 | QDict<Incidence> mUidDict; |
302 | QDate mStartDate; | 300 | QDate mStartDate; |
303 | void keyPressEvent ( QKeyEvent * ) ; | 301 | void keyPressEvent ( QKeyEvent * ) ; |
304 | }; | 302 | }; |
305 | 303 | ||
306 | #endif | 304 | #endif |