-rw-r--r-- | korganizer/mainwindow.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index f2a6c60..45ed04d 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -1,175 +1,166 @@ | |||
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 <qmainwindow.h> |
5 | #include <qtimer.h> | 5 | #include <qtimer.h> |
6 | #include <qdict.h> | 6 | #include <qdict.h> |
7 | #include <qfile.h> | 7 | #include <qfile.h> |
8 | #include <qmenubar.h> | 8 | #include <qmenubar.h> |
9 | #include <qtextstream.h> | 9 | #include <qtextstream.h> |
10 | #include <qregexp.h> | 10 | #include <qregexp.h> |
11 | 11 | ||
12 | #include <libkcal/incidence.h> | 12 | #include <libkcal/incidence.h> |
13 | #include "simplealarmclient.h" | ||
14 | #include <ksyncmanager.h> | 13 | #include <ksyncmanager.h> |
15 | #ifndef DESKTOP_VERSION | 14 | #ifndef DESKTOP_VERSION |
16 | #include <qcopchannel_qws.h> | 15 | #include <qcopchannel_qws.h> |
17 | #endif | 16 | #endif |
18 | class QAction; | 17 | class QAction; |
19 | class CalendarView; | 18 | class CalendarView; |
20 | class KSyncProfile; | 19 | class KSyncProfile; |
21 | #ifdef DESKTOP_VERSION | 20 | #ifdef DESKTOP_VERSION |
22 | 21 | ||
23 | #define QPEToolBar QToolBar | 22 | #define QPEToolBar QToolBar |
24 | #define QPEMenuBar QMenuBar | 23 | #define QPEMenuBar QMenuBar |
25 | #endif | 24 | #endif |
26 | class QPEToolBar; | 25 | class QPEToolBar; |
27 | class QPEMenuBar; | 26 | class QPEMenuBar; |
28 | 27 | ||
29 | 28 | ||
30 | namespace KCal { | 29 | namespace KCal { |
31 | class CalendarLocal; | 30 | class CalendarLocal; |
32 | } | 31 | } |
33 | 32 | ||
34 | class KOMenuBar : public QMenuBar | ||
35 | { | ||
36 | public: | ||
37 | KOMenuBar( QWidget *parent=0 ): QMenuBar (parent ) {;} | ||
38 | QSize sizeHint () const{ qDebug("sizejint ");return QSize ( 40,25 );} | ||
39 | }; | ||
40 | |||
41 | using namespace KCal; | 33 | using namespace KCal; |
42 | 34 | ||
43 | class MainWindow : public QMainWindow | 35 | class MainWindow : public QMainWindow |
44 | { | 36 | { |
45 | Q_OBJECT | 37 | Q_OBJECT |
46 | public: | 38 | public: |
47 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); | 39 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); |
48 | ~MainWindow(); | 40 | ~MainWindow(); |
49 | bool beamReceiveEnabled(); | 41 | bool beamReceiveEnabled(); |
50 | static QString defaultFileName(); | 42 | static QString defaultFileName(); |
51 | static QString syncFileName(); | 43 | static QString syncFileName(); |
52 | static QString resourcePath(); | 44 | static QString resourcePath(); |
53 | public slots: | 45 | public slots: |
54 | void setCaption ( const QString & ); | 46 | void setCaption ( const QString & ); |
55 | void updateWeekNum(const KCal::DateList &); | 47 | void updateWeekNum(const KCal::DateList &); |
56 | void updateWeek(QDate); | 48 | void updateWeek(QDate); |
57 | void updateFilterToolbar(); | 49 | void updateFilterToolbar(); |
58 | virtual void showMaximized (); | 50 | virtual void showMaximized (); |
59 | void configureAgenda( int ); | 51 | void configureAgenda( int ); |
60 | void recieve( const QCString& msg, const QByteArray& data ); | 52 | void recieve( const QCString& msg, const QByteArray& data ); |
61 | protected slots: | 53 | protected slots: |
62 | void setCaptionToDates(); | 54 | void setCaptionToDates(); |
63 | void weekAction(); | 55 | void weekAction(); |
64 | void about(); | 56 | void about(); |
65 | void licence(); | 57 | void licence(); |
66 | void faq(); | 58 | void faq(); |
67 | void usertrans(); | 59 | void usertrans(); |
68 | void features(); | 60 | void features(); |
69 | void synchowto(); | 61 | void synchowto(); |
70 | void storagehowto(); | 62 | void storagehowto(); |
71 | void timetrackinghowto(); | 63 | void timetrackinghowto(); |
72 | void kdesynchowto(); | 64 | void kdesynchowto(); |
73 | void multisynchowto(); | 65 | void multisynchowto(); |
74 | void whatsNew(); | 66 | void whatsNew(); |
75 | void keyBindings(); | 67 | void keyBindings(); |
76 | void aboutAutoSaving();; | 68 | void aboutAutoSaving();; |
77 | void aboutKnownBugs(); | 69 | void aboutKnownBugs(); |
78 | 70 | ||
79 | void processIncidenceSelection( Incidence * ); | 71 | void processIncidenceSelection( Incidence * ); |
80 | 72 | ||
81 | void importQtopia(); | 73 | void importQtopia(); |
82 | void importBday(); | 74 | void importBday(); |
83 | void importOL(); | 75 | void importOL(); |
84 | void importIcal(); | 76 | void importIcal(); |
85 | void importFile( QString, bool ); | 77 | void importFile( QString, bool ); |
86 | void quickImportIcal(); | 78 | void quickImportIcal(); |
87 | 79 | ||
88 | void slotModifiedChanged( bool ); | 80 | void slotModifiedChanged( bool ); |
89 | 81 | ||
90 | void save(); | 82 | void save(); |
91 | void saveStopTimer(); | 83 | void saveStopTimer(); |
92 | void configureToolBar( int ); | 84 | void configureToolBar( int ); |
93 | void printSel(); | 85 | void printSel(); |
94 | void printCal(); | 86 | void printCal(); |
95 | void saveCalendar(); | 87 | void saveCalendar(); |
96 | void loadCalendar(); | 88 | void loadCalendar(); |
97 | void exportVCalendar(); | 89 | void exportVCalendar(); |
98 | void fillFilterMenu(); | 90 | void fillFilterMenu(); |
99 | void fillFilterMenuTB(); | 91 | void fillFilterMenuTB(); |
100 | void selectFilter( int ); | 92 | void selectFilter( int ); |
101 | void fillFilterMenuPopup(); | 93 | void fillFilterMenuPopup(); |
102 | void selectFilterPopup( int ); | 94 | void selectFilterPopup( int ); |
103 | void exportToPhone( int ); | 95 | void exportToPhone( int ); |
104 | void toggleBeamReceive(); | 96 | void toggleBeamReceive(); |
105 | void disableBR(bool); | 97 | void disableBR(bool); |
106 | signals: | 98 | signals: |
107 | void selectWeek ( int ); | 99 | void selectWeek ( int ); |
108 | private slots: | 100 | private slots: |
109 | void showConfigureAgenda(); | 101 | void showConfigureAgenda(); |
110 | void getFile( bool ); | 102 | void getFile( bool ); |
111 | void syncFileRequest(); | 103 | void syncFileRequest(); |
112 | 104 | ||
113 | protected: | 105 | protected: |
114 | void hideEvent ( QHideEvent * ); | 106 | void hideEvent ( QHideEvent * ); |
115 | QString sentSyncFile(); | 107 | QString sentSyncFile(); |
116 | void displayText( QString, QString); | 108 | void displayText( QString, QString); |
117 | void enableIncidenceActions( bool ); | 109 | void enableIncidenceActions( bool ); |
118 | 110 | ||
119 | private: | 111 | private: |
120 | bool mBRdisabled; | 112 | bool mBRdisabled; |
121 | #ifndef DESKTOP_VERSION | 113 | #ifndef DESKTOP_VERSION |
122 | QCopChannel* infrared; | 114 | QCopChannel* infrared; |
123 | #endif | 115 | #endif |
124 | QAction* brAction; | 116 | QAction* brAction; |
125 | KSyncManager* mSyncManager; | 117 | KSyncManager* mSyncManager; |
126 | bool mClosed; | 118 | bool mClosed; |
127 | void saveOnClose(); | 119 | void saveOnClose(); |
128 | bool mFlagKeyPressed; | 120 | bool mFlagKeyPressed; |
129 | bool mBlockAtStartup; | 121 | bool mBlockAtStartup; |
130 | QPEToolBar *iconToolBar; | 122 | QPEToolBar *iconToolBar; |
131 | QPEToolBar *viewToolBar; | 123 | QPEToolBar *viewToolBar; |
132 | QPEToolBar *navigatorToolBar; | 124 | QPEToolBar *navigatorToolBar; |
133 | QPEToolBar *filterToolBar; | 125 | QPEToolBar *filterToolBar; |
134 | QPEMenuBar *filterMenubar; | 126 | QPEMenuBar *filterMenubar; |
135 | QPopupMenu * filterPopupMenu; | 127 | QPopupMenu * filterPopupMenu; |
136 | void initActions(); | 128 | void initActions(); |
137 | void setDefaultPreferences(); | 129 | void setDefaultPreferences(); |
138 | void resizeEvent( QResizeEvent* e); | 130 | void resizeEvent( QResizeEvent* e); |
139 | void keyPressEvent ( QKeyEvent * ) ; | 131 | void keyPressEvent ( QKeyEvent * ) ; |
140 | void keyReleaseEvent ( QKeyEvent * ) ; | 132 | void keyReleaseEvent ( QKeyEvent * ) ; |
141 | QPopupMenu *configureToolBarMenu; | 133 | QPopupMenu *configureToolBarMenu; |
142 | QPopupMenu *selectFilterMenu; | 134 | QPopupMenu *selectFilterMenu; |
143 | QPopupMenu *selectFilterMenuTB; | 135 | QPopupMenu *selectFilterMenuTB; |
144 | QPopupMenu *configureAgendaMenu, *syncMenu; | 136 | QPopupMenu *configureAgendaMenu, *syncMenu; |
145 | CalendarLocal *mCalendar; | 137 | CalendarLocal *mCalendar; |
146 | CalendarView *mView; | 138 | CalendarView *mView; |
147 | QAction *mNewSubTodoAction; | 139 | QAction *mNewSubTodoAction; |
148 | QAction *mWeekAction; | 140 | QAction *mWeekAction; |
149 | QFont mWeekFont; | 141 | QFont mWeekFont; |
150 | QPixmap mWeekPixmap; | 142 | QPixmap mWeekPixmap; |
151 | QColor mWeekBgColor; | 143 | QColor mWeekBgColor; |
152 | 144 | ||
153 | QAction *mShowAction; | 145 | QAction *mShowAction; |
154 | QAction *mEditAction; | 146 | QAction *mEditAction; |
155 | QAction *mDeleteAction; | 147 | QAction *mDeleteAction; |
156 | QAction *mCloneAction; | 148 | QAction *mCloneAction; |
157 | QAction *mMoveAction; | 149 | QAction *mMoveAction; |
158 | QAction *mBeamAction; | 150 | QAction *mBeamAction; |
159 | QAction *mCancelAction; | 151 | QAction *mCancelAction; |
160 | 152 | ||
161 | QAction *mToggleNav; | 153 | QAction *mToggleNav; |
162 | QAction *mToggleFilter; | 154 | QAction *mToggleFilter; |
163 | QAction *mToggleAllday; | 155 | QAction *mToggleAllday; |
164 | QAction *actionFilterMenuTB; | 156 | QAction *actionFilterMenuTB; |
165 | 157 | ||
166 | void closeEvent( QCloseEvent* ce ); | 158 | void closeEvent( QCloseEvent* ce ); |
167 | SimpleAlarmClient mAlarmClient; | ||
168 | QTimer mSaveTimer; | 159 | QTimer mSaveTimer; |
169 | //bool mBlockSaveFlag; | 160 | //bool mBlockSaveFlag; |
170 | bool mCalendarModifiedFlag; | 161 | bool mCalendarModifiedFlag; |
171 | QPixmap loadPixmap( QString ); | 162 | QPixmap loadPixmap( QString ); |
172 | }; | 163 | }; |
173 | 164 | ||
174 | 165 | ||
175 | #endif | 166 | #endif |