summaryrefslogtreecommitdiffabout
path: root/korganizer
Side-by-side diff
Diffstat (limited to 'korganizer') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/calendarview.h1
-rw-r--r--korganizer/koprefs.h3
-rw-r--r--korganizer/mainwindow.cpp14
-rw-r--r--korganizer/mainwindow.h1
5 files changed, 23 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index f859b90..689618d 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1164,24 +1164,28 @@ bool CalendarView::syncCalendar(QString filename, int mode)
storage->setSaveFormat( new ICalFormat( KOPrefs::instance()->mUseQuicksave) );
storage->save();
}
}
setModified( true );
}
delete storage;
delete calendar;
if ( syncOK )
updateView();
return syncOK;
}
+void CalendarView::syncPhone()
+{
+ qDebug("CalendarView::syncPhone() ");
+}
void CalendarView::syncSharp()
{
#ifndef DESKTOP_VERSION
mGlobalSyncMode = SYNC_MODE_EXTERNAL;
//mCurrentSyncDevice = "sharp-DTM";
if ( KOPrefs::instance()->mAskForPreferences )
edit_sync_options();
qApp->processEvents();
CalendarLocal* calendar = new CalendarLocal();
calendar->setTimeZoneId(KOPrefs::instance()->mTimeZoneId);
bool syncOK = false;
SharpFormat sharpFormat;
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h
index d564473..b2838db 100644
--- a/korganizer/calendarview.h
+++ b/korganizer/calendarview.h
@@ -416,24 +416,25 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser
void processIncidenceSelection( Incidence * );
void purgeCompleted();
bool removeCompletedSubTodos( Todo* );
void slotCalendarChanged();
bool importBday();
bool addAnniversary( QDate data, QString name, KCal::Attendee* a , bool birthday );
bool importQtopia( const QString &categoriesFile,
const QString &datebookFile,
const QString &tasklistFile );
void syncSharp( );
+ void syncPhone( );
void slotSelectPickerDate( QDate ) ;
void showDatePicker( ) ;
void moveIncidence(Incidence *) ;
void beamIncidence(Incidence *) ;
void beamCalendar() ;
void beamFilteredCalendar() ;
void beamIncidenceList(QPtrList<Incidence>) ;
void manageCategories();
int addCategories();
void removeCategories();
void setSyncDevice( QString );
void setSyncName( QString );
diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h
index 424fa98..446fe2e 100644
--- a/korganizer/koprefs.h
+++ b/korganizer/koprefs.h
@@ -201,24 +201,27 @@ class KOPrefs : public KPimPrefs
bool mWriteBackFile;
bool mAskForPreferences;
bool mShowSyncSummary;
bool mShowSyncEvents;
bool mShowTodoInAgenda;
bool mWriteBackExistingOnly;
QString mRemoteIP;
QString mRemoteUser;
QString mRemotePassWd;
QString mRemoteFile;
QString mLocalTempFile;
+ QString mPhoneDevice;
+ QString mPhoneConnection;
+ QString mPhoneModel;
int mLastSyncTime;
int mSyncAlgoPrefs;
int mRingSyncAlgoPrefs;
QStringList mSyncProfileNames;
QStringList mExternSyncProfiles;
QString mLocalMachineName;
void setCategoryColor(QString cat,const QColor & color);
QColor *categoryColor(QString cat);
QString mArchiveFile;
QString mHtmlExportFile;
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index c3c4c26..062c95f 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -888,24 +888,30 @@ int MainWindow::ringSync()
KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile();
KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting();
KOPrefs::instance()->mShowSyncSummary = false;
mView->setSyncDevice(syncProfileNames[i] );
mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
if ( i == 0 ) {
syncSharp();
} else {
if ( temp->getIsLocalFileSync() ) {
if ( syncWithFile( temp->getRemoteFileName( ), true ) )
KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
} else {
+ if ( temp->getIsPhoneSync() ) {
+ KOPrefs::instance()->mPhoneDevice = temp->getPhoneDevice( ) ;
+ KOPrefs::instance()->mPhoneConnection = temp->getPhoneConnection( );
+ KOPrefs::instance()->mPhoneModel = temp->getPhoneModel( );
+ syncPhone();
+ } else
syncRemote( temp, false );
}
}
timer.start();
setCaption(i18n("Multiple sync in progress ... please wait!") );
while ( timer.elapsed () < 2000 ) {
qApp->processEvents();
#ifndef _WIN32_
sleep (1);
#endif
}
@@ -2028,22 +2034,30 @@ void MainWindow::syncSSH()
}
void MainWindow::syncSharp()
{
if ( mCalendarModifiedFlag )
save();
mView->syncSharp();
slotModifiedChanged( true );
}
+void MainWindow::syncPhone()
+{
+ if ( mCalendarModifiedFlag )
+ save();
+ mView->syncPhone();
+ slotModifiedChanged( true );
+
+}
void MainWindow::printSel( )
{
mView->viewManager()->agendaView()->agenda()->printSelection();
}
void MainWindow::printCal()
{
mView->print();//mCp->showDialog();
}
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index fba8c52..1d87db0 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -66,24 +66,25 @@ class MainWindow : public QMainWindow
void printSel();
void printCal();
void saveCalendar();
void loadCalendar();
void exportVCalendar();
void fillFilterMenu();
void selectFilter( int );
void slotSyncMenu( int );
void syncSSH();
void confSync();
void syncSharp();
+ void syncPhone();
void syncLocalFile();
bool syncWithFile( QString, bool );
void quickSyncLocalFile();
protected:
void displayText( QString, QString);
void displayFile( QString, QString);
void enableIncidenceActions( bool );
private: