author | zautrix <zautrix> | 2004-10-07 07:28:54 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 07:28:54 (UTC) |
commit | 77280f6a176a15b60004f312e6cacdfbbd3909c1 (patch) (unidiff) | |
tree | e074d4abedc2f4cc575e5655575e038b9d460106 /korganizer/mainwindow.h | |
parent | f1eb5b74c962909851607c4b4cb05ee18a347d37 (diff) | |
download | kdepimpi-77280f6a176a15b60004f312e6cacdfbbd3909c1.zip kdepimpi-77280f6a176a15b60004f312e6cacdfbbd3909c1.tar.gz kdepimpi-77280f6a176a15b60004f312e6cacdfbbd3909c1.tar.bz2 |
sync changes
-rw-r--r-- | korganizer/mainwindow.h | 70 |
1 files changed, 1 insertions, 69 deletions
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 4f89e03..0da0be0 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h | |||
@@ -1,103 +1,36 @@ | |||
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 <qsocket.h> | ||
9 | #include <qtextstream.h> | 8 | #include <qtextstream.h> |
10 | #include <qregexp.h> | 9 | #include <qregexp.h> |
11 | 10 | ||
12 | #include <libkcal/incidence.h> | 11 | #include <libkcal/incidence.h> |
13 | #include "simplealarmclient.h" | 12 | #include "simplealarmclient.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 | #include <qserversocket.h> | ||
25 | #include <qsocket.h> | ||
26 | #include <qnetworkprotocol.h> | ||
27 | 24 | ||
28 | class KServerSocket : public QServerSocket | ||
29 | { | ||
30 | Q_OBJECT | ||
31 | |||
32 | public: | ||
33 | KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 ); | ||
34 | |||
35 | void newConnection ( int socket ) ; | ||
36 | void setFileName( QString fn ) {mFileName = fn;}; | ||
37 | |||
38 | signals: | ||
39 | //void sendFile(QSocket*); | ||
40 | //void getFile(QSocket*); | ||
41 | void file_received( bool ); | ||
42 | //void file_sent(); | ||
43 | void saveFile(); | ||
44 | void endConnect(); | ||
45 | private slots: | ||
46 | void discardClient(); | ||
47 | void readClient(); | ||
48 | void readBackFileFromSocket(); | ||
49 | private : | ||
50 | bool blockRC; | ||
51 | void send_file(); | ||
52 | void get_file(); | ||
53 | void end_connect(); | ||
54 | QDialog* mSyncActionDialog; | ||
55 | QSocket* mSocket; | ||
56 | QString mPassWord; | ||
57 | QString mFileName; | ||
58 | QTime piTime; | ||
59 | QString piFileString; | ||
60 | }; | ||
61 | |||
62 | class KCommandSocket : public QObject | ||
63 | { | ||
64 | Q_OBJECT | ||
65 | public: | ||
66 | enum state { successR, errorR, successW, errorW, quiet }; | ||
67 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, const char * name=0 ); | ||
68 | void readFile( QString ); | ||
69 | void writeFile( QString ); | ||
70 | void sendStop(); | ||
71 | |||
72 | |||
73 | signals: | ||
74 | void commandFinished( KCommandSocket*, int ); | ||
75 | private slots: | ||
76 | void startReadFileFromSocket(); | ||
77 | void readFileFromSocket(); | ||
78 | void deleteSocket(); | ||
79 | void writeFileToSocket(); | ||
80 | private : | ||
81 | QSocket* mSocket; | ||
82 | QString mPassWord; | ||
83 | Q_UINT16 mPort; | ||
84 | QString mHost; | ||
85 | QString mFileName; | ||
86 | QTimer* mTimerSocket; | ||
87 | int mRetVal; | ||
88 | QTime mTime; | ||
89 | QString mFileString; | ||
90 | bool mFirst; | ||
91 | }; | ||
92 | 25 | ||
93 | namespace KCal { | 26 | namespace KCal { |
94 | class CalendarLocal; | 27 | class CalendarLocal; |
95 | } | 28 | } |
96 | 29 | ||
97 | using namespace KCal; | 30 | using namespace KCal; |
98 | 31 | ||
99 | class MainWindow : public QMainWindow | 32 | class MainWindow : public QMainWindow |
100 | { | 33 | { |
101 | Q_OBJECT | 34 | Q_OBJECT |
102 | public: | 35 | public: |
103 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); | 36 | MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); |
@@ -200,17 +133,16 @@ class MainWindow : public QMainWindow | |||
200 | QAction *mCloneAction; | 133 | QAction *mCloneAction; |
201 | QAction *mMoveAction; | 134 | QAction *mMoveAction; |
202 | QAction *mBeamAction; | 135 | QAction *mBeamAction; |
203 | QAction *mCancelAction; | 136 | QAction *mCancelAction; |
204 | 137 | ||
205 | 138 | ||
206 | void closeEvent( QCloseEvent* ce ); | 139 | void closeEvent( QCloseEvent* ce ); |
207 | SimpleAlarmClient mAlarmClient; | 140 | SimpleAlarmClient mAlarmClient; |
208 | QTimer mSaveTimer; | 141 | QTimer mSaveTimer; |
209 | bool mBlockSaveFlag; | 142 | bool mBlockSaveFlag; |
210 | bool mCalendarModifiedFlag; | 143 | bool mCalendarModifiedFlag; |
211 | QPixmap loadPixmap( QString ); | 144 | QPixmap loadPixmap( QString ); |
212 | QDialog * mSyncActionDialog; | ||
213 | }; | 145 | }; |
214 | 146 | ||
215 | 147 | ||
216 | #endif | 148 | #endif |