summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt9
-rw-r--r--korganizer/mainwindow.cpp18
-rw-r--r--korganizer/mainwindow.h1
-rw-r--r--libkdepim/ksyncmanager.cpp11
-rw-r--r--libkdepim/ksyncmanager.h2
5 files changed, 33 insertions, 8 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 65bb075..6ccf763 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,50 +1,59 @@
Info about the changes in new versions of KDE-Pim/Pi
+********** VERSION 2.0.6 ************
+
+Two bugfixes in the pi-sync mode.
+KO/Pi:
+Made the todolist using alternate background.
+
+Other minor fixes in KO/Pi.
+
+
********** VERSION 2.0.5 ************
Bugfixes in KO/Pi.
********** VERSION 2.0.4 ************
KO/Pi:
Fixed problem loading translations for summary/location edit boxes in event/todo editor.
Added a general "select week number" to the toolbar.
Fixed some small problem of the new features introduced in version 2.0.3.
Made it possible to specify one specific category as category color,
if more than one categories are selected.
Fixed a bug in saving colors for categories with non-ascii characters.
(Like, e.g. German Umlauts).
Propably you have to set your colors again for those categories.
********** VERSION 2.0.3 ************
KO/Pi:
Added feature for changing alarm settings for many items at once:
Open list view (or search dialog), select the desired items and choose in
the popup menu: Set alarm for selected...
Added to the event/todo viewer the option to send an email to
all attendees or all selected (with RSVP) attendees.
Made the week-month mode changing in month view faster.
Made month view better useable with keyboard.
Now TAB key jumps to next cell with an event/todo.
Scroll in cell with coursor keys, scroll in time (next week) with
Shift/Control + coursorkeys.
Fixed bug that the todo view flat mode was reset after first view update.
If a todo is displayed closed in the todo view,
it is now displayed in overdue/due today color depending on the subtodos overdue/due today properties.
Added info about the numbers of years to the caption (title) information about a birthday event.
Made completion date in todo editor editable.
Added possibility to save/load templates for journals.
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 468fd5b..18a4b12 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -220,97 +220,97 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
if (finfo.exists() ) {
KMessageBox::information( this, message);
mView->openCalendar( oldFile );
qApp->processEvents();
}
}
mView->saveCalendar( defaultFileName() );
newFile = true;
}
QTime neededSaveTime = QDateTime::currentDateTime().time();
mView->openCalendar( defaultFileName() );
int msNeeded = neededSaveTime.msecsTo( QDateTime::currentDateTime().time() );
qDebug("KO: Calendar loading time: %d ms",msNeeded );
if ( KPimGlobalPrefs::instance()->mPreferredLanguage != KOPrefs::instance()->mOldLoadedLanguage ) {
KOPrefs::instance()->setAllDefaults();
int count = mView->addCategories();
}
processIncidenceSelection( 0 );
connect( mView, SIGNAL( incidenceSelected( Incidence * ) ),
SLOT( processIncidenceSelection( Incidence * ) ) );
connect( mView, SIGNAL( modifiedChanged( bool ) ),
SLOT( slotModifiedChanged( bool ) ) );
connect( mView, SIGNAL( tempDisableBR(bool) ),
SLOT( disableBR(bool) ) );
connect( &mSaveTimer, SIGNAL( timeout() ), SLOT( save() ) );
mView->setModified( false );
mBlockAtStartup = false;
mView->setModified( false );
setCentralWidget( mView );
globalFlagBlockStartup = 0;
mView->show();
delete splash;
if ( newFile )
mView->updateConfig();
// qApp->processEvents();
//qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
//fillSyncMenu();
connect(mSyncManager , SIGNAL( save() ), this, SLOT( save() ) );
connect(mView , SIGNAL( save() ), this, SLOT( save() ) );
connect(mView , SIGNAL( saveStopTimer() ), this, SLOT( saveStopTimer() ) );
connect(mSyncManager , SIGNAL( request_file() ), this, SLOT( syncFileRequest() ) );
connect(mSyncManager , SIGNAL( getFile( bool )), this, SLOT(getFile( bool ) ) );
- mSyncManager->setDefaultFileName( defaultFileName());
+ mSyncManager->setDefaultFileName( sentSyncFile());
connect ( syncMenu, SIGNAL( activated ( int ) ), mSyncManager, SLOT (slotSyncMenu( int ) ) );
mSyncManager->fillSyncMenu();
mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
if ( showWarning ) {
KMessageBox::information( this,
"You are starting KO/Pi for the first time.\nPlease read menu: Help-What's New,\nif you did an update!\nPlease choose your timezone in the \nConfigure Dialog TAB Time Zone!\nPlease choose your language\nin the TAB Locale!\nYou get the Configure Dialog\nvia Menu: Actions - Configure....\nClick OK to show the Configure Dialog!\n", "KO/Pi information");
qApp->processEvents();
mView->dialogManager()->showSyncOptions();
}
//US listen for result adressed from Ka/Pi
#ifndef DESKTOP_VERSION
connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
#endif
#ifndef DESKTOP_VERSION
infrared = 0;
#endif
updateWeek( mView->startDate() );
connect( mView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ),
SLOT( updateWeekNum( const KCal::DateList & ) ) );
mBRdisabled = false;
//toggleBeamReceive();
}
MainWindow::~MainWindow()
{
//qDebug("MainWindow::~MainWindow() ");
//save toolbar location
delete mCalendar;
delete mSyncManager;
#ifndef DESKTOP_VERSION
if ( infrared )
delete infrared;
#endif
}
void MainWindow::disableBR(bool b)
{
#ifndef DESKTOP_VERSION
if ( b ) {
if ( infrared ) {
toggleBeamReceive();
mBRdisabled = true;
}
@@ -1947,111 +1947,123 @@ void MainWindow::importFile( QString fn, bool quick )
setCaption(i18n("Error importing file"));
}
}
}
void MainWindow::importIcal()
{
QString fn =KOPrefs::instance()->mLastImportFile;
fn =KFileDialog:: getOpenFileName( fn, i18n("Import filename(*.ics/*.vcs)"), this );
if ( fn == "" )
return;
importFile( fn, true );
}
void MainWindow::exportVCalendar()
{
QString fn = KOPrefs::instance()->mLastVcalFile;
fn = KFileDialog::getSaveFileName( fn, i18n("Export vcal filename(*.vcs)"), this );
if ( fn == "" )
return;
QFileInfo info;
info.setFile( fn );
QString mes;
bool createbup = true;
if ( info. exists() ) {
mes = i18n("Save file\nalready exists!\nOld save file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
i18n("Overwrite!"), i18n("Cancel"), 0,
0, 1 );
if ( result != 0 ) {
createbup = false;
}
}
if ( createbup ) {
if ( mView->exportVCalendar( fn ) ) {
KOPrefs::instance()->mLastVcalFile = fn;
if ( fn.length() > 20 )
mes = i18n("KO/Pi:Exported to ...%1").arg(fn.right(20)) ;
else
mes = i18n("KO/Pi:Exported to %1").arg(fn );
setCaption(mes);
}
}
}
+QString MainWindow::sentSyncFile()
+{
+#ifdef DESKTOP_VERSION
+ return locateLocal( "tmp", "copysynccal.ics" );
+#else
+ return QString( "/tmp/copysynccal.ics" );
+#endif
+}
void MainWindow::syncFileRequest()
{
if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
mSyncManager->slotSyncMenu( 999 );
}
- save();
+
+ setCaption(i18n("Saving Data to temp file ..." ));
+ mView->saveCalendar( sentSyncFile() );
+ setCaption(i18n("Data saved to temp file!" ));
+
}
void MainWindow::getFile( bool success )
{
if ( ! success ) {
setCaption( i18n("Error receiving file. Nothing changed!") );
return;
}
- mView->openCalendar( defaultFileName() );
+ mView->openCalendar( sentSyncFile() );
if ( KOPrefs::instance()->mPassiveSyncWithDesktop ) {
mSyncManager->slotSyncMenu( 999 );
}
setCaption( i18n("Pi-Sync successful!") );
}
void MainWindow::printSel( )
{
mView->viewManager()->agendaView()->agenda()->printSelection();
}
void MainWindow::printCal()
{
mView->print();//mCp->showDialog();
}
#include "libkdepim/kdatepicker.h"
#include <kdatetbl.h>
void MainWindow::weekAction()
{
int month;
KPopupFrame* popup = new KPopupFrame(this);
KDateInternalWeekPicker* picker = new KDateInternalWeekPicker(popup);
// -----
picker->resize(picker->sizeHint());
popup->setMainWidget(picker);
picker->setFocus();
connect(picker, SIGNAL(closeMe(int)), popup, SLOT(close(int)));
int x = 0;
int y = iconToolBar->height();
int dX = 0;
int dY = 0;
if ( iconToolBar->orientation () == Qt:: Horizontal ) {
if ( iconToolBar->y() > height()/2 ) {
dY = picker->sizeHint().height()+8;
y = 0;
}
} else {
if ( iconToolBar->x() > width()/2 ) { // right side
x=0;
dX= picker->sizeHint().width()+8;
y = 0;
} else {
x= iconToolBar->width();
y = 0;
}
}
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 5b9f903..5808700 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -58,96 +58,97 @@ class MainWindow : public QMainWindow
protected slots:
void setCaptionToDates();
void weekAction();
void about();
void licence();
void faq();
void usertrans();
void features();
void synchowto();
void kdesynchowto();
void multisynchowto();
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 saveStopTimer();
void configureToolBar( int );
void printSel();
void printCal();
void saveCalendar();
void loadCalendar();
void exportVCalendar();
void fillFilterMenu();
void selectFilter( int );
void exportToPhone( int );
void toggleBeamReceive();
void disableBR(bool);
signals:
void selectWeek ( int );
private slots:
void showConfigureAgenda();
void getFile( bool );
void syncFileRequest();
protected:
+ QString sentSyncFile();
void displayText( QString, QString);
void enableIncidenceActions( bool );
private:
bool mBRdisabled;
#ifndef DESKTOP_VERSION
QCopChannel* infrared;
#endif
QAction* brAction;
KSyncManager* mSyncManager;
bool mClosed;
void saveOnClose();
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;
QAction *mNewSubTodoAction;
QAction *mWeekAction;
QFont mWeekFont;
QPixmap mWeekPixmap;
QColor mWeekBgColor;
QAction *mShowAction;
QAction *mEditAction;
QAction *mDeleteAction;
QAction *mCloneAction;
QAction *mMoveAction;
QAction *mBeamAction;
QAction *mCancelAction;
QAction *mToggleNav;
QAction *mToggleFilter;
QAction *mToggleAllday;
void closeEvent( QCloseEvent* ce );
SimpleAlarmClient mAlarmClient;
QTimer mSaveTimer;
//bool mBlockSaveFlag;
bool mCalendarModifiedFlag;
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 9177f63..c8d0e0d 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -27,106 +27,110 @@
#ifndef _WIN32_
#include <unistd.h>
#endif
#include "ksyncprofile.h"
#include "ksyncprefsdialog.h"
#include "kpimprefs.h"
#include <kmessagebox.h>
#include <qdir.h>
#include <qprogressbar.h>
#include <qpopupmenu.h>
#include <qpushbutton.h>
#include <qradiobutton.h>
#include <qbuttongroup.h>
#include <qtimer.h>
#include <qmessagebox.h>
#include <qapplication.h>
#include <qlineedit.h>
#include <qdialog.h>
#include <qlayout.h>
#include <qtextcodec.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <klocale.h>
#include <kglobal.h>
#include <kconfig.h>
#include <kfiledialog.h>
QDateTime KSyncManager::mRequestedSyncEvent;
KSyncManager::KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu)
: QObject(), mPrefs(prefs ), mParent(parent),mImplementation(implementation), mTargetApp(ta), mSyncMenu(syncmenu)
{
mServerSocket = 0;
bar = new QProgressBar ( 1, 0 );
bar->setCaption ("");
mWriteBackInPast = 2;
int w = 300;
if ( QApplication::desktop()->width() < 320 )
w = 220;
int h = bar->sizeHint().height() ;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
bar->setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
- if ( mPrefs->mPassiveSyncAutoStart )
- enableQuick( false );
}
KSyncManager::~KSyncManager()
{
delete bar;
}
+void KSyncManager::setDefaultFileName( QString s)
+{
+ mDefFileName = s ;
+ if ( mPrefs->mPassiveSyncAutoStart )
+ enableQuick( false );
+}
void KSyncManager::fillSyncMenu()
{
if ( mSyncMenu->count() )
mSyncMenu->clear();
mSyncMenu->insertItem( i18n("Configure..."), 0 );
mSyncMenu->insertSeparator();
QPopupMenu *clearMenu = new QPopupMenu ( mSyncMenu );
mSyncMenu->insertItem( i18n("Remove sync info"),clearMenu, 5000 );
clearMenu->insertItem( i18n("For all profiles"), 1 );
clearMenu->insertSeparator();
connect ( clearMenu, SIGNAL( activated ( int ) ), this, SLOT (slotClearMenu( int ) ) );
mSyncMenu->insertSeparator();
if ( mServerSocket == 0 ) {
mSyncMenu->insertItem( i18n("Enable Pi-Sync"), 2 );
} else {
mSyncMenu->insertItem( i18n("Disable Pi-Sync"), 3 );
}
mSyncMenu->insertSeparator();
mSyncMenu->insertItem( i18n("Multiple sync"), 1 );
mSyncMenu->insertSeparator();
KConfig config ( locateLocal( "config","ksyncprofilesrc" ) );
config.setGroup("General");
QStringList prof = config.readListEntry("SyncProfileNames");
mLocalMachineName = config.readEntry("LocalMachineName","undefined");
if ( prof.count() < 2 ) {
prof.clear();
QString externalName;
#ifdef DESKTOP_VERSION
#ifdef _WIN32_
externalName = "OutLook(not_implemented)";
#else
externalName = "KDE_Desktop";
#endif
#else
externalName = "Sharp_DTM";
#endif
prof << externalName;
prof << i18n("Local_file");
prof << i18n("Last_file");
KSyncProfile* temp = new KSyncProfile ();
temp->setName( prof[0] );
temp->writeConfig(&config);
temp->setName( prof[1] );
temp->writeConfig(&config);
temp->setName( prof[2] );
temp->writeConfig(&config);
@@ -367,97 +371,96 @@ void KSyncManager::enableQuick( bool ask )
QCheckBox syncdesktop( i18n("Automatically sync\nwith KDE-Desktop"),&dia );
syncdesktop.hide();
#endif
syncdesktop.setChecked( mPrefs->mPassiveSyncWithDesktop );
QPushButton pb ( "OK", &dia);
lay.addWidget( &pb );
connect(&pb, SIGNAL( clicked() ), &dia, SLOT ( accept() ) );
dia.resize( 230,120 );
dia.setCaption( i18n("Enter port for Pi-Sync") );
dia.show();
#ifndef DESKTOP_VERSION
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
dia.move( (dw-dia.width())/2, (dh - dia.height() )/2 );
#endif
if ( ! dia.exec() )
return;
dia.hide();
qApp->processEvents();
if ( mPrefs->mPassiveSyncPw != lepw.text() ) {
changed = true;
mPrefs->mPassiveSyncPw = lepw.text();
}
if ( mPrefs->mPassiveSyncPort != lab.text() ) {
mPrefs->mPassiveSyncPort = lab.text();
changed = true;
}
autoStart = autostart.isChecked();
if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) {
changed = true;
mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked();
}
}
else
autoStart = mPrefs->mPassiveSyncAutoStart;
if ( autoStart != mPrefs->mPassiveSyncAutoStart )
changed = true;
bool ok;
mPrefs->mPassiveSyncAutoStart = false;
Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok);
if ( ! ok ) {
KMessageBox::information( 0, i18n("No valid port"));
return;
}
//qDebug("port %d ", port);
mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 );
mServerSocket->setFileName( defaultFileName() );//bbb
- //qDebug("connected ");
if ( !mServerSocket->ok() ) {
KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!"));
delete mServerSocket;
mServerSocket = 0;
return;
}
mPrefs->mPassiveSyncAutoStart = autoStart;
if ( changed ) {
mPrefs->writeConfig();
}
connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) );
connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) );
}
void KSyncManager::syncLocalFile()
{
QString fn =mPrefs->mLastSyncedLocalFile;
QString ext;
switch(mTargetApp)
{
case (KAPI):
ext = "(*.vcf)";
break;
case (KOPI):
ext = "(*.ics/*.vcs)";
break;
case (PWMPI):
ext = "(*.pwm)";
break;
default:
qDebug("KSM::syncLocalFile: invalid apptype selected");
break;
}
fn =KFileDialog:: getOpenFileName( fn, i18n("Sync filename"+ext), mParent );
if ( fn == "" )
return;
if ( syncWithFile( fn, false ) ) {
qDebug("KSM::syncLocalFile() successful ");
}
}
bool KSyncManager::syncWithFile( QString fn , bool quick )
{
@@ -1072,97 +1075,97 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state)
KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget());
connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) );
commandSocket->sendStop();
}
mPisyncFinished = true;
return;
} else if ( state == KCommandSocket::errorW ) {
mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") );
mPisyncFinished = true;
} else if ( state == KCommandSocket::successR ) {
QTimer::singleShot( 1, this , SLOT ( readFileFromSocket()));
} else if ( state == KCommandSocket::successW ) {
mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") );
mPisyncFinished = true;
}
delete s;
}
void KSyncManager::readFileFromSocket()
{
QString fileName = syncFileName();
mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") );
if ( ! syncWithFile( fileName , true ) ) {
mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") );
mPisyncFinished = true;
return;
}
KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() );
connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) );
if ( mWriteBackFile )
commandSocket->writeFile( fileName );
else {
commandSocket->sendStop();
mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") );
mPisyncFinished = true;
}
}
KServerSocket:: KServerSocket ( QString pw, Q_UINT16 port, int backlog, QObject * parent, const char * name ) : QServerSocket( port, backlog, parent, name )
{
mPassWord = pw;
mSocket = 0;
mSyncActionDialog = 0;
blockRC = false;
-};
+}
void KServerSocket::newConnection ( int socket )
{
// qDebug("KServerSocket:New connection %d ", socket);
if ( mSocket ) {
qDebug("KSS::newConnection Socket deleted! ");
delete mSocket;
mSocket = 0;
}
mSocket = new QSocket( this );
connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
mSocket->setSocket( socket );
}
void KServerSocket::discardClient()
{
//qDebug(" KServerSocket::discardClient()");
if ( mSocket ) {
delete mSocket;
mSocket = 0;
}
//emit endConnect();
}
void KServerSocket::readClient()
{
if ( blockRC )
return;
if ( mSocket == 0 ) {
qDebug("ERROR::KSS::readClient(): mSocket == 0 ");
return;
}
//qDebug("KServerSocket::readClient()");
if ( mSocket->canReadLine() ) {
QString line = mSocket->readLine();
//qDebug("KServerSocket readline: %s ", line.latin1());
QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), line );
if ( tokens[0] == "GET" ) {
if ( tokens[1] == mPassWord ) {
//emit sendFile( mSocket );
bool ok = false;
QDateTime dt = KGlobal::locale()->readDateTime( tokens[2], KLocale::ISODate, &ok);
if ( ok ) {
KSyncManager::mRequestedSyncEvent = dt;
}
else
KSyncManager::mRequestedSyncEvent = QDateTime();
send_file();
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 9a3066e..09bd1c1 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -76,97 +76,97 @@ class KCommandSocket : public QObject
public:
enum state { successR, errorR, successW, errorW, errorTO, quiet };
KCommandSocket ( QString password, Q_UINT16 port, QString host, QObject * parent=0, QWidget* cap = 0, const char * name=0 );
void readFile( QString );
void writeFile( QString );
void sendStop();
private slots :
void sendFileRequest();
signals:
void commandFinished( KCommandSocket*, int );
private slots:
void startReadFileFromSocket();
void readFileFromSocket();
void deleteSocket();
void writeFileToSocket();
private :
QWidget* tlw;
QSocket* mSocket;
QString mPassWord;
Q_UINT16 mPort;
QString mHost;
QString mFileName;
QTimer* mTimerSocket;
int mRetVal;
QTime mTime;
QString mFileString;
bool mFirst;
};
class KSyncManager : public QObject
{
Q_OBJECT
public:
enum TargetApp {
KOPI = 0,
KAPI = 1,
PWMPI = 2 };
KSyncManager(QWidget* parent, KSyncInterface* implementation, TargetApp ta, KPimPrefs* prefs, QPopupMenu* syncmenu);
~KSyncManager() ;
void multiSync( bool askforPrefs );
bool blockSave() { return mBlockSaveFlag; }
void setBlockSave(bool sa) { mBlockSaveFlag = sa; }
- void setDefaultFileName( QString s) { mDefFileName = s ;}
+ void setDefaultFileName( QString s) ;
QString defaultFileName() { return mDefFileName ;}
QString syncFileName();
void enableQuick( bool ask = true);
bool syncWithDesktop () { return mSyncWithDesktop;}
QString getCurrentSyncDevice() { return mCurrentSyncDevice; }
QString getCurrentSyncName() { return mCurrentSyncName; }
void showProgressBar(int percentage, QString caption = QString::null, int total=100);
void hideProgressBar();
bool isProgressBarCanceled();
// sync stuff
QString mLocalMachineName;
QStringList mExternSyncProfiles;
QStringList mSyncProfileNames;
bool mAskForPreferences;
bool mShowSyncSummary;
bool mIsKapiFile;
bool mWriteBackExistingOnly;
int mSyncAlgoPrefs;
bool mWriteBackFile;
int mWriteBackInFuture;
int mWriteBackInPast;
QString mPhoneDevice;
QString mPhoneConnection;
QString mPhoneModel;
QString mPassWordPiSync;
QString mActiveSyncPort;
QString mActiveSyncIP ;
QString mFilterInCal;
QString mFilterOutCal;
QString mFilterInAB;
QString mFilterOutAB;
static QDateTime mRequestedSyncEvent;
signals:
void save();
void request_file();
void getFile( bool );
public slots:
void slotSyncMenu( int );
void slotClearMenu( int action );
void deleteCommandSocket(KCommandSocket*s, int state);
void readFileFromSocket();
void fillSyncMenu();