author | zautrix <zautrix> | 2004-10-07 17:51:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 17:51:17 (UTC) |
commit | 1f1538e5707b59bfcff2014901f29a65589229e3 (patch) (unidiff) | |
tree | 0d91a303524e6ac9f7c954f01a0e1d09d0e305e7 /korganizer/mainwindow.h | |
parent | bb8293c794d82a57bc93af85ccd89b601356d577 (diff) | |
download | kdepimpi-1f1538e5707b59bfcff2014901f29a65589229e3.zip kdepimpi-1f1538e5707b59bfcff2014901f29a65589229e3.tar.gz kdepimpi-1f1538e5707b59bfcff2014901f29a65589229e3.tar.bz2 |
many cleanups
-rw-r--r-- | korganizer/mainwindow.h | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 0da0be0..ee7bd87 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -1,148 +1,130 @@ | |||
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 <qtextstream.h> | 8 | #include <qtextstream.h> |
9 | #include <qregexp.h> | 9 | #include <qregexp.h> |
10 | 10 | ||
11 | #include <libkcal/incidence.h> | 11 | #include <libkcal/incidence.h> |
12 | #include "simplealarmclient.h" | 12 | #include "simplealarmclient.h" |
13 | #include <ksyncmanager.h> | 13 | #include <ksyncmanager.h> |
14 | 14 | ||
15 | class QAction; | 15 | class QAction; |
16 | class CalendarView; | 16 | class CalendarView; |
17 | class KSyncProfile; | 17 | class KSyncProfile; |
18 | #ifdef DESKTOP_VERSION | 18 | #ifdef DESKTOP_VERSION |
19 | 19 | ||
20 | #define QPEToolBar QToolBar | 20 | #define QPEToolBar QToolBar |
21 | #define QPEMenuBar QMenuBar | 21 | #define QPEMenuBar QMenuBar |
22 | #endif | 22 | #endif |
23 | class QPEToolBar; | 23 | class QPEToolBar; |
24 | 24 | ||
25 | 25 | ||
26 | namespace KCal { | 26 | namespace KCal { |
27 | class CalendarLocal; | 27 | class CalendarLocal; |
28 | } | 28 | } |
29 | 29 | ||
30 | using namespace KCal; | 30 | using namespace KCal; |
31 | 31 | ||
32 | class MainWindow : public QMainWindow | 32 | class MainWindow : public QMainWindow |
33 | { | 33 | { |
34 | Q_OBJECT | 34 | Q_OBJECT |
35 | public: | 35 | public: |
36 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); | 36 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); |
37 | ~MainWindow(); | 37 | ~MainWindow(); |
38 | public slots: | 38 | public slots: |
39 | virtual void showMaximized (); | 39 | virtual void showMaximized (); |
40 | void configureAgenda( int ); | 40 | void configureAgenda( int ); |
41 | void recieve( const QCString& msg, const QByteArray& data ); | 41 | void recieve( const QCString& msg, const QByteArray& data ); |
42 | static QString defaultFileName(); | 42 | static QString defaultFileName(); |
43 | static QString syncFileName(); | 43 | static QString syncFileName(); |
44 | static QString resourcePath(); | 44 | static QString resourcePath(); |
45 | protected slots: | 45 | protected slots: |
46 | void setCaptionToDates(); | 46 | void setCaptionToDates(); |
47 | int ringSync(); | ||
48 | void multiSync( bool askforPrefs = false ); | ||
49 | void about(); | 47 | void about(); |
50 | void licence(); | 48 | void licence(); |
51 | void faq(); | 49 | void faq(); |
52 | void usertrans(); | 50 | void usertrans(); |
53 | void features(); | 51 | void features(); |
54 | void synchowto(); | 52 | void synchowto(); |
55 | void whatsNew(); | 53 | void whatsNew(); |
56 | void keyBindings(); | 54 | void keyBindings(); |
57 | void aboutAutoSaving();; | 55 | void aboutAutoSaving();; |
58 | void aboutKnownBugs(); | 56 | void aboutKnownBugs(); |
59 | 57 | ||
60 | void processIncidenceSelection( Incidence * ); | 58 | void processIncidenceSelection( Incidence * ); |
61 | 59 | ||
62 | void importQtopia(); | 60 | void importQtopia(); |
63 | void importBday(); | 61 | void importBday(); |
64 | void importOL(); | 62 | void importOL(); |
65 | void importIcal(); | 63 | void importIcal(); |
66 | void importFile( QString, bool ); | 64 | void importFile( QString, bool ); |
67 | void quickImportIcal(); | 65 | void quickImportIcal(); |
68 | 66 | ||
69 | void slotModifiedChanged( bool ); | 67 | void slotModifiedChanged( bool ); |
70 | 68 | ||
71 | void save(); | 69 | void save(); |
72 | void configureToolBar( int ); | 70 | void configureToolBar( int ); |
73 | void printSel(); | 71 | void printSel(); |
74 | void printCal(); | 72 | void printCal(); |
75 | void saveCalendar(); | 73 | void saveCalendar(); |
76 | void loadCalendar(); | 74 | void loadCalendar(); |
77 | void exportVCalendar(); | 75 | void exportVCalendar(); |
78 | void fillFilterMenu(); | 76 | void fillFilterMenu(); |
79 | void selectFilter( int ); | 77 | void selectFilter( int ); |
80 | void exportToPhone( int ); | 78 | void exportToPhone( int ); |
81 | 79 | ||
82 | void slotSyncMenu( int ); | ||
83 | void confSync(); | ||
84 | void syncSharp(); | ||
85 | void syncPhone(); | ||
86 | void syncPi(); | ||
87 | void syncLocalFile(); | ||
88 | bool syncWithFile( QString, bool ); | ||
89 | void quickSyncLocalFile(); | ||
90 | |||
91 | 80 | ||
92 | protected: | 81 | protected: |
93 | void displayText( QString, QString); | 82 | void displayText( QString, QString); |
94 | void displayFile( QString, QString); | 83 | void displayFile( QString, QString); |
95 | 84 | ||
96 | void enableIncidenceActions( bool ); | 85 | void enableIncidenceActions( bool ); |
97 | 86 | ||
98 | private slots: | 87 | private slots: |
99 | QSocket* piSocket; | 88 | QSocket* piSocket; |
100 | QString piFileString; | 89 | QString piFileString; |
101 | QTime piTime; | 90 | QTime piTime; |
102 | void deleteCommandSocket(KCommandSocket* s, int state ); | ||
103 | void fillSyncMenu(); | ||
104 | void getFile( bool ); | 91 | void getFile( bool ); |
105 | void readFileFromSocket(); | 92 | void syncFileRequest(); |
106 | private: | 93 | private: |
94 | KSyncManager* mSyncManager; | ||
107 | //QTimer* mTimerCommandSocket; | 95 | //QTimer* mTimerCommandSocket; |
108 | QString mPassWordPiSync; | ||
109 | KServerSocket * mServerSocket; | 96 | KServerSocket * mServerSocket; |
110 | bool mClosed; | 97 | bool mClosed; |
111 | void saveOnClose(); | 98 | void saveOnClose(); |
112 | int mCurrentSyncProfile; | ||
113 | void enableQuick(); | ||
114 | void syncRemote( KSyncProfile* , bool ask = true); | ||
115 | bool mFlagKeyPressed; | 99 | bool mFlagKeyPressed; |
116 | bool mBlockAtStartup; | 100 | bool mBlockAtStartup; |
117 | QPEToolBar *iconToolBar; | 101 | QPEToolBar *iconToolBar; |
118 | void initActions(); | 102 | void initActions(); |
119 | void setDefaultPreferences(); | 103 | void setDefaultPreferences(); |
120 | void keyPressEvent ( QKeyEvent * ) ; | 104 | void keyPressEvent ( QKeyEvent * ) ; |
121 | void keyReleaseEvent ( QKeyEvent * ) ; | 105 | void keyReleaseEvent ( QKeyEvent * ) ; |
122 | QPopupMenu *configureToolBarMenu; | 106 | QPopupMenu *configureToolBarMenu; |
123 | QPopupMenu *selectFilterMenu; | 107 | QPopupMenu *selectFilterMenu; |
124 | QPopupMenu *configureAgendaMenu, *syncMenu; | 108 | QPopupMenu *configureAgendaMenu, *syncMenu; |
125 | CalendarLocal *mCalendar; | 109 | CalendarLocal *mCalendar; |
126 | CalendarView *mView; | 110 | CalendarView *mView; |
127 | QString getPassword(); | ||
128 | QAction *mNewSubTodoAction; | 111 | QAction *mNewSubTodoAction; |
129 | 112 | ||
130 | QAction *mShowAction; | 113 | QAction *mShowAction; |
131 | QAction *mEditAction; | 114 | QAction *mEditAction; |
132 | QAction *mDeleteAction; | 115 | QAction *mDeleteAction; |
133 | QAction *mCloneAction; | 116 | QAction *mCloneAction; |
134 | QAction *mMoveAction; | 117 | QAction *mMoveAction; |
135 | QAction *mBeamAction; | 118 | QAction *mBeamAction; |
136 | QAction *mCancelAction; | 119 | QAction *mCancelAction; |
137 | 120 | ||
138 | |||
139 | void closeEvent( QCloseEvent* ce ); | 121 | void closeEvent( QCloseEvent* ce ); |
140 | SimpleAlarmClient mAlarmClient; | 122 | SimpleAlarmClient mAlarmClient; |
141 | QTimer mSaveTimer; | 123 | QTimer mSaveTimer; |
142 | bool mBlockSaveFlag; | 124 | //bool mBlockSaveFlag; |
143 | bool mCalendarModifiedFlag; | 125 | bool mCalendarModifiedFlag; |
144 | QPixmap loadPixmap( QString ); | 126 | QPixmap loadPixmap( QString ); |
145 | }; | 127 | }; |
146 | 128 | ||
147 | 129 | ||
148 | #endif | 130 | #endif |