Diffstat (limited to 'korganizer/kowhatsnextview.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kowhatsnextview.h | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 93574ef..49fc448 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h | |||
@@ -6,97 +6,103 @@ | |||
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | #ifndef KOWHATSNEXTVIEW_H | 19 | #ifndef KOWHATSNEXTVIEW_H |
20 | #define KOWHATSNEXTVIEW_H | 20 | #define KOWHATSNEXTVIEW_H |
21 | 21 | ||
22 | #include <qtextbrowser.h> | 22 | #include <q3textbrowser.h> |
23 | #include <qtimer.h> | 23 | #include <qtimer.h> |
24 | //Added by qt3to4: | ||
25 | #include <QShowEvent> | ||
26 | #include <QHideEvent> | ||
27 | #include <QLabel> | ||
28 | #include <Q3ValueList> | ||
29 | #include <Q3PtrList> | ||
24 | 30 | ||
25 | #include <korganizer/baseview.h> | 31 | #include <korganizer/baseview.h> |
26 | 32 | ||
27 | class QListView; | 33 | class Q3ListView; |
28 | class QLabel; | 34 | class QLabel; |
29 | 35 | ||
30 | class KOEventViewerDialog; | 36 | class KOEventViewerDialog; |
31 | 37 | ||
32 | #include <qpainter.h> | 38 | #include <qpainter.h> |
33 | #include <qwidget.h> | 39 | #include <qwidget.h> |
34 | class WhatsNextTextBrowser : public QTextBrowser { | 40 | class WhatsNextTextBrowser : public Q3TextBrowser { |
35 | Q_OBJECT | 41 | Q_OBJECT |
36 | public: | 42 | public: |
37 | WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {}; | 43 | WhatsNextTextBrowser(QWidget *parent) : Q3TextBrowser(parent) {}; |
38 | 44 | ||
39 | void setSource(const QString &); | 45 | void setSource(const QString &); |
40 | void printMe(); | 46 | void printMe(); |
41 | 47 | ||
42 | signals: | 48 | signals: |
43 | void showIncidence(const QString &uid); | 49 | void showIncidence(const QString &uid); |
44 | }; | 50 | }; |
45 | 51 | ||
46 | 52 | ||
47 | /** | 53 | /** |
48 | This class provides a view of the next events and todos | 54 | This class provides a view of the next events and todos |
49 | */ | 55 | */ |
50 | class KOWhatsNextView : public KOrg::BaseView | 56 | class KOWhatsNextView : public KOrg::BaseView |
51 | { | 57 | { |
52 | Q_OBJECT | 58 | Q_OBJECT |
53 | public: | 59 | public: |
54 | KOWhatsNextView(Calendar *calendar, QWidget *parent = 0, | 60 | KOWhatsNextView(Calendar *calendar, QWidget *parent = 0, |
55 | const char *name = 0); | 61 | const char *name = 0); |
56 | ~KOWhatsNextView(); | 62 | ~KOWhatsNextView(); |
57 | 63 | ||
58 | virtual int maxDatesHint(); | 64 | virtual int maxDatesHint(); |
59 | virtual int currentDateCount(); | 65 | virtual int currentDateCount(); |
60 | void setEventViewer(KOEventViewerDialog* v ); | 66 | void setEventViewer(KOEventViewerDialog* v ); |
61 | virtual QPtrList<Incidence> selectedIncidences(); | 67 | virtual Q3PtrList<Incidence> selectedIncidences(); |
62 | void clearList(); | 68 | void clearList(); |
63 | DateList selectedDates() | 69 | DateList selectedDates() |
64 | {DateList q; | 70 | {DateList q; |
65 | return q;} | 71 | return q;} |
66 | virtual void printPreview(CalPrinter *calPrinter, | 72 | virtual void printPreview(CalPrinter *calPrinter, |
67 | const QDate &, const QDate &); | 73 | const QDate &, const QDate &); |
68 | 74 | ||
69 | public slots: | 75 | public slots: |
70 | virtual void updateView(); | 76 | virtual void updateView(); |
71 | void printMe(); | 77 | void printMe(); |
72 | virtual void showDates(const QDate &start, const QDate &end); | 78 | virtual void showDates(const QDate &start, const QDate &end); |
73 | virtual void showEvents(QPtrList<Event> eventList); | 79 | virtual void showEvents(Q3PtrList<Event> eventList); |
74 | void updateConfig(); | 80 | void updateConfig(); |
75 | void changeEventDisplay(Event *, int); | 81 | void changeEventDisplay(Event *, int); |
76 | 82 | ||
77 | protected: | 83 | protected: |
78 | bool appendEvent(Incidence *, bool reply=false, bool notRed = true, bool appendTable = false); | 84 | bool appendEvent(Incidence *, bool reply=false, bool notRed = true, bool appendTable = false); |
79 | bool appendTodo(Incidence *, QString ind = "", bool isSub = false ); | 85 | bool appendTodo(Incidence *, QString ind = "", bool isSub = false ); |
80 | void appendDay( int i, QDate date ); | 86 | void appendDay( int i, QDate date ); |
81 | QDate mEventDate; | 87 | QDate mEventDate; |
82 | virtual void showEvent ( QShowEvent * ); | 88 | virtual void showEvent ( QShowEvent * ); |
83 | virtual void hideEvent ( QHideEvent * ); | 89 | virtual void hideEvent ( QHideEvent * ); |
84 | 90 | ||
85 | private slots: | 91 | private slots: |
86 | void showIncidence(const QString &); | 92 | void showIncidence(const QString &); |
87 | void restartTimer(); | 93 | void restartTimer(); |
88 | 94 | ||
89 | 95 | ||
90 | private: | 96 | private: |
91 | int mCurrentMaxPrio; | 97 | int mCurrentMaxPrio; |
92 | //void createEventViewer(); | 98 | //void createEventViewer(); |
93 | QTimer* mTimer; | 99 | QTimer* mTimer; |
94 | WhatsNextTextBrowser *mView; | 100 | WhatsNextTextBrowser *mView; |
95 | QString mText; | 101 | QString mText; |
96 | // QLabel *mDateLabel; | 102 | // QLabel *mDateLabel; |
97 | KOEventViewerDialog *mEventViewer; | 103 | KOEventViewerDialog *mEventViewer; |
98 | 104 | ||
99 | QValueList<Incidence *> mTodos; | 105 | Q3ValueList<Incidence *> mTodos; |
100 | }; | 106 | }; |
101 | 107 | ||
102 | #endif | 108 | #endif |