author | zautrix <zautrix> | 2004-10-07 12:19:25 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 12:19:25 (UTC) |
commit | 826dc960353e47a60aba13916189c45ef3392c1e (patch) (unidiff) | |
tree | 52ef4058d7a1fa8d77e678391ed9165009634182 /libkdepim | |
parent | 43c82cc5393522d2c34f34a4339cb6a1d1c6c555 (diff) | |
download | kdepimpi-826dc960353e47a60aba13916189c45ef3392c1e.zip kdepimpi-826dc960353e47a60aba13916189c45ef3392c1e.tar.gz kdepimpi-826dc960353e47a60aba13916189c45ef3392c1e.tar.bz2 |
sync fixes
-rw-r--r-- | libkdepim/ksyncmanager.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h index aad48d9..32400af 100644 --- a/libkdepim/ksyncmanager.h +++ b/libkdepim/ksyncmanager.h | |||
@@ -77,132 +77,132 @@ class KCommandSocket : public QObject | |||
77 | public: | 77 | public: |
78 | enum state { successR, errorR, successW, errorW, quiet }; | 78 | enum state { successR, errorR, successW, errorW, quiet }; |
79 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, const char * name=0 ); | 79 | KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, const char * name=0 ); |
80 | void readFile( QString ); | 80 | void readFile( QString ); |
81 | void writeFile( QString ); | 81 | void writeFile( QString ); |
82 | void sendStop(); | 82 | void sendStop(); |
83 | 83 | ||
84 | 84 | ||
85 | signals: | 85 | signals: |
86 | void commandFinished( KCommandSocket*, int ); | 86 | void commandFinished( KCommandSocket*, int ); |
87 | private slots: | 87 | private slots: |
88 | void startReadFileFromSocket(); | 88 | void startReadFileFromSocket(); |
89 | void readFileFromSocket(); | 89 | void readFileFromSocket(); |
90 | void deleteSocket(); | 90 | void deleteSocket(); |
91 | void writeFileToSocket(); | 91 | void writeFileToSocket(); |
92 | private : | 92 | private : |
93 | QSocket* mSocket; | 93 | QSocket* mSocket; |
94 | QString mPassWord; | 94 | QString mPassWord; |
95 | Q_UINT16 mPort; | 95 | Q_UINT16 mPort; |
96 | QString mHost; | 96 | QString mHost; |
97 | QString mFileName; | 97 | QString mFileName; |
98 | QTimer* mTimerSocket; | 98 | QTimer* mTimerSocket; |
99 | int mRetVal; | 99 | int mRetVal; |
100 | QTime mTime; | 100 | QTime mTime; |
101 | QString mFileString; | 101 | QString mFileString; |
102 | bool mFirst; | 102 | bool mFirst; |
103 | }; | 103 | }; |
104 | 104 | ||
105 | 105 | ||
106 | class KSyncManager : public QObject | 106 | class KSyncManager : public QObject |
107 | { | 107 | { |
108 | Q_OBJECT | 108 | Q_OBJECT |
109 | 109 | ||
110 | public: | 110 | public: |
111 | enum TargetApp { | 111 | enum TargetApp { |
112 | KOPI = 0, | 112 | KOPI = 0, |
113 | KAPI = 1, | 113 | KAPI = 1, |
114 | PWMPI = 2 }; | 114 | PWMPI = 2 }; |
115 | 115 | ||
116 | 116 | ||
117 | KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); | 117 | KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu); |
118 | ~KSyncManager() ; | 118 | ~KSyncManager() ; |
119 | 119 | ||
120 | bool blockSave() { return mBlockSaveFlag; } | 120 | bool blockSave() { return mBlockSaveFlag; } |
121 | void setBlockSave(bool sa) { mBlockSaveFlag = sa; } | 121 | void setBlockSave(bool sa) { mBlockSaveFlag = sa; } |
122 | void setDefaultFileName( QString s) { mDefFileName = s ;} | 122 | void setDefaultFileName( QString s) { mDefFileName = s ;} |
123 | QString defaultFileName() { return mDefFileName ;} | 123 | QString defaultFileName() { return mDefFileName ;} |
124 | QString syncFileName(); | 124 | QString syncFileName(); |
125 | void fillSyncMenu(); | ||
126 | 125 | ||
127 | QString getCurrentSyncDevice() { return mCurrentSyncDevice; } | 126 | QString getCurrentSyncDevice() { return mCurrentSyncDevice; } |
128 | QString getCurrentSyncName() { return mCurrentSyncName; } | 127 | QString getCurrentSyncName() { return mCurrentSyncName; } |
129 | 128 | ||
130 | void showProgressBar(int percentage, QString caption = QString::null, int total=100); | 129 | void showProgressBar(int percentage, QString caption = QString::null, int total=100); |
131 | void hideProgressBar(); | 130 | void hideProgressBar(); |
132 | bool isProgressBarCanceled(); | 131 | bool isProgressBarCanceled(); |
133 | 132 | ||
134 | // sync stuff | 133 | // sync stuff |
135 | QString mLocalMachineName; | 134 | QString mLocalMachineName; |
136 | QStringList mExternSyncProfiles; | 135 | QStringList mExternSyncProfiles; |
137 | QStringList mSyncProfileNames; | 136 | QStringList mSyncProfileNames; |
138 | bool mAskForPreferences; | 137 | bool mAskForPreferences; |
139 | bool mShowSyncSummary; | 138 | bool mShowSyncSummary; |
140 | bool mShowSyncEvents; | 139 | bool mShowSyncEvents; |
141 | bool mShowTodoInAgenda; | 140 | bool mShowTodoInAgenda; |
142 | bool mWriteBackExistingOnly; | 141 | bool mWriteBackExistingOnly; |
143 | int mSyncAlgoPrefs; | 142 | int mSyncAlgoPrefs; |
144 | int mRingSyncAlgoPrefs; | 143 | int mRingSyncAlgoPrefs; |
145 | bool mWriteBackFile; | 144 | bool mWriteBackFile; |
146 | int mWriteBackInFuture; | 145 | int mWriteBackInFuture; |
147 | QString mPhoneDevice; | 146 | QString mPhoneDevice; |
148 | QString mPhoneConnection; | 147 | QString mPhoneConnection; |
149 | QString mPhoneModel; | 148 | QString mPhoneModel; |
150 | QString mLastSyncedLocalFile; // save! | 149 | QString mLastSyncedLocalFile; // save! |
151 | QString mPassWordPiSync; | 150 | QString mPassWordPiSync; |
152 | QString mActiveSyncPort; | 151 | QString mActiveSyncPort; |
153 | QString mActiveSyncIP ; | 152 | QString mActiveSyncIP ; |
154 | 153 | ||
155 | signals: | 154 | signals: |
156 | void save(); | 155 | void save(); |
157 | void request_file(); | 156 | void request_file(); |
158 | void getFile( bool ); | 157 | void getFile( bool ); |
159 | 158 | ||
160 | public slots: | 159 | public slots: |
160 | void fillSyncMenu(); | ||
161 | void slotSyncMenu( int ); | 161 | void slotSyncMenu( int ); |
162 | void deleteCommandSocket(KCommandSocket*s, int state); | 162 | void deleteCommandSocket(KCommandSocket*s, int state); |
163 | void readFileFromSocket(); | 163 | void readFileFromSocket(); |
164 | 164 | ||
165 | private: | 165 | private: |
166 | // LR ******************************* | 166 | // LR ******************************* |
167 | // sync stuff! | 167 | // sync stuff! |
168 | void syncPi(); | 168 | void syncPi(); |
169 | KServerSocket * mServerSocket; | 169 | KServerSocket * mServerSocket; |
170 | void enableQuick(); | 170 | void enableQuick(); |
171 | KPimPrefs* mPrefs; | 171 | KPimPrefs* mPrefs; |
172 | QString mDefFileName; | 172 | QString mDefFileName; |
173 | QString mCurrentSyncDevice; | 173 | QString mCurrentSyncDevice; |
174 | QString mCurrentSyncName; | 174 | QString mCurrentSyncName; |
175 | void quickSyncLocalFile(); | 175 | void quickSyncLocalFile(); |
176 | bool syncWithFile( QString fn , bool quick ); | 176 | bool syncWithFile( QString fn , bool quick ); |
177 | void syncLocalFile(); | 177 | void syncLocalFile(); |
178 | void syncPhone(); | 178 | void syncPhone(); |
179 | void syncSharp(); | 179 | void syncSharp(); |
180 | bool syncExternalApplication(QString); | 180 | bool syncExternalApplication(QString); |
181 | void multiSync( bool askforPrefs ); | 181 | void multiSync( bool askforPrefs ); |
182 | int mCurrentSyncProfile ; | 182 | int mCurrentSyncProfile ; |
183 | void syncRemote( KSyncProfile* prof, bool ask = true); | 183 | void syncRemote( KSyncProfile* prof, bool ask = true); |
184 | void edit_sync_options(); | 184 | void edit_sync_options(); |
185 | int ringSync(); | 185 | int ringSync(); |
186 | QString getPassword( ); | 186 | QString getPassword( ); |
187 | 187 | ||
188 | private slots: | 188 | private slots: |
189 | void confSync(); | 189 | void confSync(); |
190 | // ********************* | 190 | // ********************* |
191 | 191 | ||
192 | private: | 192 | private: |
193 | bool mBlockSaveFlag; | 193 | bool mBlockSaveFlag; |
194 | 194 | ||
195 | 195 | ||
196 | QWidget* mParent; | 196 | QWidget* mParent; |
197 | KSyncInterface* mImplementation; | 197 | KSyncInterface* mImplementation; |
198 | TargetApp mTargetApp; | 198 | TargetApp mTargetApp; |
199 | QPopupMenu* mSyncMenu; | 199 | QPopupMenu* mSyncMenu; |
200 | 200 | ||
201 | QProgressBar* bar; | 201 | QProgressBar* bar; |
202 | 202 | ||
203 | 203 | ||
204 | 204 | ||
205 | 205 | ||
206 | 206 | ||
207 | }; | 207 | }; |
208 | 208 | ||