author | zautrix <zautrix> | 2004-10-07 07:28:54 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-07 07:28:54 (UTC) |
commit | 77280f6a176a15b60004f312e6cacdfbbd3909c1 (patch) (side-by-side diff) | |
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,139 +1,72 @@ #ifndef KORGE_MAINWINDOW_H #define KORGE_MAINWINDOW_H #include <qmainwindow.h> #include <qtimer.h> #include <qdict.h> #include <qfile.h> -#include <qsocket.h> #include <qtextstream.h> #include <qregexp.h> #include <libkcal/incidence.h> #include "simplealarmclient.h" +#include <ksyncmanager.h> class QAction; class CalendarView; class KSyncProfile; #ifdef DESKTOP_VERSION #define QPEToolBar QToolBar #define QPEMenuBar QMenuBar #endif class QPEToolBar; -#include <qserversocket.h> -#include <qsocket.h> -#include <qnetworkprotocol.h> -class KServerSocket : public QServerSocket -{ - Q_OBJECT - -public: - KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 ); - - void newConnection ( int socket ) ; - void setFileName( QString fn ) {mFileName = fn;}; - -signals: - //void sendFile(QSocket*); - //void getFile(QSocket*); - void file_received( bool ); - //void file_sent(); - void saveFile(); - void endConnect(); -private slots: - void discardClient(); - void readClient(); - void readBackFileFromSocket(); - private : - bool blockRC; - void send_file(); - void get_file(); - void end_connect(); - QDialog* mSyncActionDialog; - QSocket* mSocket; - QString mPassWord; - QString mFileName; - QTime piTime; - QString piFileString; -}; - -class KCommandSocket : public QObject -{ - Q_OBJECT -public: - enum state { successR, errorR, successW, errorW, quiet }; - KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, const char * name=0 ); - void readFile( QString ); - void writeFile( QString ); - void sendStop(); - - -signals: - void commandFinished( KCommandSocket*, int ); -private slots: - void startReadFileFromSocket(); - void readFileFromSocket(); - void deleteSocket(); - void writeFileToSocket(); - private : - QSocket* mSocket; - QString mPassWord; - Q_UINT16 mPort; - QString mHost; - QString mFileName; - QTimer* mTimerSocket; - int mRetVal; - QTime mTime; - QString mFileString; - bool mFirst; -}; namespace KCal { class CalendarLocal; } using namespace KCal; class MainWindow : public QMainWindow { Q_OBJECT public: MainWindow( QWidget *parent = 0, const char *name = 0, QString command = ""); ~MainWindow(); public slots: virtual void showMaximized (); void configureAgenda( int ); void recieve( const QCString& msg, const QByteArray& data ); static QString defaultFileName(); static QString syncFileName(); static QString resourcePath(); protected slots: void setCaptionToDates(); int ringSync(); void multiSync( bool askforPrefs = false ); void about(); void licence(); void faq(); void usertrans(); void features(); void synchowto(); void whatsNew(); void keyBindings(); void aboutAutoSaving();; void aboutKnownBugs(); void processIncidenceSelection( Incidence * ); void importQtopia(); void importBday(); void importOL(); void importIcal(); void importFile( QString, bool ); void quickImportIcal(); void slotModifiedChanged( bool ); void save(); void configureToolBar( int ); @@ -164,53 +97,52 @@ class MainWindow : public QMainWindow private slots: QSocket* piSocket; QString piFileString; QTime piTime; void deleteCommandSocket(KCommandSocket* s, int state ); void fillSyncMenu(); void getFile( bool ); void readFileFromSocket(); private: //QTimer* mTimerCommandSocket; QString mPassWordPiSync; KServerSocket * mServerSocket; bool mClosed; void saveOnClose(); int mCurrentSyncProfile; void enableQuick(); void syncRemote( KSyncProfile* , bool ask = true); bool mFlagKeyPressed; bool mBlockAtStartup; QPEToolBar *iconToolBar; void initActions(); void setDefaultPreferences(); void keyPressEvent ( QKeyEvent * ) ; void keyReleaseEvent ( QKeyEvent * ) ; QPopupMenu *configureToolBarMenu; QPopupMenu *selectFilterMenu; QPopupMenu *configureAgendaMenu, *syncMenu; CalendarLocal *mCalendar; CalendarView *mView; QString getPassword(); QAction *mNewSubTodoAction; QAction *mShowAction; QAction *mEditAction; QAction *mDeleteAction; QAction *mCloneAction; QAction *mMoveAction; QAction *mBeamAction; QAction *mCancelAction; void closeEvent( QCloseEvent* ce ); SimpleAlarmClient mAlarmClient; QTimer mSaveTimer; bool mBlockSaveFlag; bool mCalendarModifiedFlag; QPixmap loadPixmap( QString ); - QDialog * mSyncActionDialog; }; #endif |