author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /korganizer/mainwindow.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | korganizer/mainwindow.h | 68 |
1 files changed, 38 insertions, 30 deletions
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index a533d8b..6756216 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -1,69 +1,77 @@ | |||
1 | #ifndef KORGE_MAINWINDOW_H | 1 | #ifndef KORGE_MAINWINDOW_H |
2 | #define KORGE_MAINWINDOW_H | 2 | #define KORGE_MAINWINDOW_H |
3 | 3 | ||
4 | #include <qmainwindow.h> | 4 | #include <q3mainwindow.h> |
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | #include <qdict.h> | 6 | #include <q3dict.h> |
7 | #include <qfile.h> | 7 | #include <qfile.h> |
8 | #include <qmenubar.h> | 8 | #include <qmenubar.h> |
9 | #include <qtextstream.h> | 9 | #include <q3textstream.h> |
10 | #include <qregexp.h> | 10 | #include <qregexp.h> |
11 | //Added by qt3to4: | ||
12 | #include <Q3CString> | ||
13 | #include <QCloseEvent> | ||
14 | #include <QResizeEvent> | ||
15 | #include <QPixmap> | ||
16 | #include <Q3PopupMenu> | ||
17 | #include <QHideEvent> | ||
18 | #include <QKeyEvent> | ||
11 | 19 | ||
12 | #include <libkcal/incidence.h> | 20 | #include <libkcal/incidence.h> |
13 | #include <ksyncmanager.h> | 21 | #include <ksyncmanager.h> |
14 | #include <kpopupmenu.h> | 22 | #include <kpopupmenu.h> |
15 | #ifndef DESKTOP_VERSION | 23 | #ifndef DESKTOP_VERSION |
16 | #include <qcopchannel_qws.h> | 24 | #include <qcopchannel_qws.h> |
17 | #endif | 25 | #endif |
18 | class QAction; | 26 | class Q3Action; |
19 | class CalendarView; | 27 | class CalendarView; |
20 | class KSyncProfile; | 28 | class KSyncProfile; |
21 | #ifdef DESKTOP_VERSION | 29 | #ifdef DESKTOP_VERSION |
22 | 30 | ||
23 | #define QPEToolBar QToolBar | 31 | #define QPEToolBar Q3ToolBar |
24 | #endif | 32 | #endif |
25 | class QPEToolBar; | 33 | class QPEToolBar; |
26 | 34 | ||
27 | 35 | ||
28 | namespace KCal { | 36 | namespace KCal { |
29 | class CalendarLocal; | 37 | class CalendarLocal; |
30 | } | 38 | } |
31 | 39 | ||
32 | using namespace KCal; | 40 | using namespace KCal; |
33 | 41 | ||
34 | class MainWindow : public QMainWindow | 42 | class MainWindow : public Q3MainWindow |
35 | { | 43 | { |
36 | Q_OBJECT | 44 | Q_OBJECT |
37 | public: | 45 | public: |
38 | MainWindow( QWidget *parent = 0, const char *name = 0 ); | 46 | MainWindow( QWidget *parent = 0, const char *name = 0 ); |
39 | ~MainWindow(); | 47 | ~MainWindow(); |
40 | bool beamReceiveEnabled(); | 48 | bool beamReceiveEnabled(); |
41 | static QString defaultFileName(); | 49 | static QString defaultFileName(); |
42 | static QString syncFileName(); | 50 | static QString syncFileName(); |
43 | static QString resourcePath(); | 51 | static QString resourcePath(); |
44 | public slots: | 52 | public slots: |
45 | void setUsesBigPixmaps ( bool ); | 53 | void setUsesBigPixmaps ( bool ); |
46 | void setCaption ( const QString & ); | 54 | void setCaption ( const QString & ); |
47 | void updateWeekNum(const KCal::DateList &); | 55 | void updateWeekNum(const KCal::DateList &); |
48 | void updateWeek(QDate); | 56 | void updateWeek(QDate); |
49 | void updateFilterToolbar(); | 57 | void updateFilterToolbar(); |
50 | virtual void showMaximized (); | 58 | virtual void showMaximized (); |
51 | void configureAgenda( int ); | 59 | void configureAgenda( int ); |
52 | void recieve( const QCString& msg, const QByteArray& data ); | 60 | void recieve( const Q3CString& msg, const QByteArray& data ); |
53 | void receiveStart( const QCString& msg, const QByteArray& data ); | 61 | void receiveStart( const Q3CString& msg, const QByteArray& data ); |
54 | protected slots: | 62 | protected slots: |
55 | void autoSaveWarning(); | 63 | void autoSaveWarning(); |
56 | void loadDataAfterStart(); | 64 | void loadDataAfterStart(); |
57 | void calHint(); | 65 | void calHint(); |
58 | void startMultiSync(); | 66 | void startMultiSync(); |
59 | void setCaptionToDates(); | 67 | void setCaptionToDates(); |
60 | void weekAction(); | 68 | void weekAction(); |
61 | void about(); | 69 | void about(); |
62 | void licence(); | 70 | void licence(); |
63 | void faq(); | 71 | void faq(); |
64 | void usertrans(); | 72 | void usertrans(); |
65 | void features(); | 73 | void features(); |
66 | void synchowto(); | 74 | void synchowto(); |
67 | void storagehowto(); | 75 | void storagehowto(); |
68 | void timetrackinghowto(); | 76 | void timetrackinghowto(); |
69 | void kdesynchowto(); | 77 | void kdesynchowto(); |
@@ -111,81 +119,81 @@ class MainWindow : public QMainWindow | |||
111 | void slotResetFocusLoop(); | 119 | void slotResetFocusLoop(); |
112 | void showConfigureAgenda(); | 120 | void showConfigureAgenda(); |
113 | void getFile( bool ,const QString &); | 121 | void getFile( bool ,const QString &); |
114 | void syncFileRequest(const QString &); | 122 | void syncFileRequest(const QString &); |
115 | 123 | ||
116 | protected: | 124 | protected: |
117 | int mFocusLoop; | 125 | int mFocusLoop; |
118 | void hideEvent ( QHideEvent * ); | 126 | void hideEvent ( QHideEvent * ); |
119 | QString sentSyncFile(); | 127 | QString sentSyncFile(); |
120 | void displayText( QString, QString); | 128 | void displayText( QString, QString); |
121 | void enableIncidenceActions( bool ); | 129 | void enableIncidenceActions( bool ); |
122 | bool askForQuitOnSaveError(); | 130 | bool askForQuitOnSaveError(); |
123 | 131 | ||
124 | private: | 132 | private: |
125 | bool mAutoSaveDisabled; | 133 | bool mAutoSaveDisabled; |
126 | bool checkAutosave(); | 134 | bool checkAutosave(); |
127 | QCString mCStringMess; | 135 | Q3CString mCStringMess; |
128 | QByteArray mByteData; | 136 | QByteArray mByteData; |
129 | 137 | ||
130 | //void setMenuBar( QMenuBar * ); | 138 | //void setMenuBar( QMenuBar * ); |
131 | bool mBRdisabled; | 139 | bool mBRdisabled; |
132 | #ifndef DESKTOP_VERSION | 140 | #ifndef DESKTOP_VERSION |
133 | QCopChannel* infrared; | 141 | QCopChannel* infrared; |
134 | #endif | 142 | #endif |
135 | QAction* brAction; | 143 | Q3Action* brAction; |
136 | KSyncManager* mSyncManager; | 144 | KSyncManager* mSyncManager; |
137 | bool mClosed; | 145 | bool mClosed; |
138 | void saveOnClose(); | 146 | void saveOnClose(); |
139 | bool mFlagKeyPressed; | 147 | bool mFlagKeyPressed; |
140 | bool mBlockAtStartup; | 148 | bool mBlockAtStartup; |
141 | KMenuBar *menuBar1; | 149 | KMenuBar *menuBar1; |
142 | QPEToolBar *iconToolBar; | 150 | QPEToolBar *iconToolBar; |
143 | QPEToolBar *viewToolBar; | 151 | QPEToolBar *viewToolBar; |
144 | QPEToolBar *navigatorToolBar; | 152 | QPEToolBar *navigatorToolBar; |
145 | QPEToolBar *filterToolBar; | 153 | QPEToolBar *filterToolBar; |
146 | KMenuBar *filterMenubar; | 154 | KMenuBar *filterMenubar; |
147 | QPopupMenu * filterPopupMenu; | 155 | Q3PopupMenu * filterPopupMenu; |
148 | QPopupMenu * mCurrentItemMenu; | 156 | Q3PopupMenu * mCurrentItemMenu; |
149 | void initActions(); | 157 | void initActions(); |
150 | void setDefaultPreferences(); | 158 | void setDefaultPreferences(); |
151 | void resizeEvent( QResizeEvent* e); | 159 | void resizeEvent( QResizeEvent* e); |
152 | void keyPressEvent ( QKeyEvent * ) ; | 160 | void keyPressEvent ( QKeyEvent * ) ; |
153 | void keyReleaseEvent ( QKeyEvent * ) ; | 161 | void keyReleaseEvent ( QKeyEvent * ) ; |
154 | QPopupMenu *configureToolBarMenu; | 162 | Q3PopupMenu *configureToolBarMenu; |
155 | QPopupMenu *selectFilterMenu; | 163 | Q3PopupMenu *selectFilterMenu; |
156 | QPopupMenu *selectFilterMenuTB; | 164 | Q3PopupMenu *selectFilterMenuTB; |
157 | QPopupMenu *configureAgendaMenu, *syncMenu; | 165 | Q3PopupMenu *configureAgendaMenu, *syncMenu; |
158 | CalendarLocal *mCalendar; | 166 | CalendarLocal *mCalendar; |
159 | CalendarView *mView; | 167 | CalendarView *mView; |
160 | QAction *mNewSubTodoAction; | 168 | Q3Action *mNewSubTodoAction; |
161 | QAction *mWeekAction; | 169 | Q3Action *mWeekAction; |
162 | QFont mWeekFont; | 170 | QFont mWeekFont; |
163 | QPixmap mWeekPixmap; | 171 | QPixmap mWeekPixmap; |
164 | QColor mWeekBgColor; | 172 | QColor mWeekBgColor; |
165 | 173 | ||
166 | QAction *mShowAction; | 174 | Q3Action *mShowAction; |
167 | QAction *mEditAction; | 175 | Q3Action *mEditAction; |
168 | QAction *mDeleteAction; | 176 | Q3Action *mDeleteAction; |
169 | QAction *mCloneAction; | 177 | Q3Action *mCloneAction; |
170 | QAction *mMoveAction; | 178 | Q3Action *mMoveAction; |
171 | QAction *mBeamAction; | 179 | Q3Action *mBeamAction; |
172 | QAction *mCancelAction; | 180 | Q3Action *mCancelAction; |
173 | QAction *mPrintSelAction; | 181 | Q3Action *mPrintSelAction; |
174 | 182 | ||
175 | QAction *mToggleNav; | 183 | Q3Action *mToggleNav; |
176 | QAction *mToggleFilter; | 184 | Q3Action *mToggleFilter; |
177 | QAction *mToggleAllday; | 185 | Q3Action *mToggleAllday; |
178 | QAction *actionFilterMenuTB; | 186 | Q3Action *actionFilterMenuTB; |
179 | 187 | ||
180 | void closeEvent( QCloseEvent* ce ); | 188 | void closeEvent( QCloseEvent* ce ); |
181 | QTimer mSaveTimer; | 189 | QTimer mSaveTimer; |
182 | QDateTime mSaveTimerStart; | 190 | QDateTime mSaveTimerStart; |
183 | int mSaveDelay; | 191 | int mSaveDelay; |
184 | //bool mBlockSaveFlag; | 192 | //bool mBlockSaveFlag; |
185 | bool mCalendarModifiedFlag; | 193 | bool mCalendarModifiedFlag; |
186 | QPixmap loadPixmap( QString ); | 194 | QPixmap loadPixmap( QString ); |
187 | QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix; | 195 | QPixmap listviewPix, listviewPix0, listviewPix20, listviewPix40, listviewPix60, listviewPix80, journalPix; |
188 | }; | 196 | }; |
189 | 197 | ||
190 | 198 | ||
191 | #endif | 199 | #endif |