-rw-r--r-- | korganizer/koprefs.cpp | 6 | ||||
-rw-r--r-- | korganizer/koprefs.h | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 134 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 |
4 files changed, 144 insertions, 0 deletions
diff --git a/korganizer/koprefs.cpp b/korganizer/koprefs.cpp index c28da9a..716a125 100644 --- a/korganizer/koprefs.cpp +++ b/korganizer/koprefs.cpp @@ -32,96 +32,102 @@ #include <qregexp.h> #include <qfont.h> #include <qcolor.h> #include <qstringlist.h> #include <stdlib.h> #include <kglobal.h> #include <kconfig.h> #include <klocale.h> #include <kdebug.h> #include <kemailsettings.h> #include <kstaticdeleter.h> #include <libkdepim/kpimglobalprefs.h> #include "koprefs.h" #include "mainwindow.h" const char *germanwords[][2] = { #include "wordsgerman.h" "", "" }; KOPrefs *KOPrefs::mInstance = 0; static KStaticDeleter<KOPrefs> insd; KOPrefs::KOPrefs() : KPimPrefs("korganizerrc") { mCategoryColors.setAutoDelete(true); mLocaleDict = 0; fillMailDefaults(); mDefaultCategoryColor = QColor(175,210,255);//196,196,196); QColor defaultHolidayColor = QColor(255,0,0); QColor defaultHighlightColor = QColor(129,112,255);//64,64,255); QColor defaultAgendaBgColor = QColor(239,241,169);//128,128,128); QColor defaultWorkingHoursColor = QColor(170,223,150);//160,160,160); QColor defaultTodoDueTodayColor = QColor(255,220,100); QColor defaultTodoOverdueColor = QColor(255,153,125); mTimeBarFont = QFont("helvetica",10);//,QFont::Bold); mDefaultViewFont = QFont("helvetica",10); mDefaultMonthViewFont = QFont("helvetica",8); mMarcusBainsFont= QFont("helvetica",10); mDateNavigatorFont= QFont("helvetica",10, QFont::Bold); mEditBoxFont = QFont("helvetica",12); mJornalViewFont = QFont("helvetica",12); KPrefs::setCurrentGroup("General"); + + + addItemString("Ex2PhoneDevice",&mEx2PhoneDevice,"/dev/ircomm"); + addItemString("Ex2PhoneConnection",&mEx2PhoneConnection,"irda"); + addItemString("Ex2PhoneModel",&mEx2PhoneModel,"6310i"); + addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); addItemBool("ShowIconNewTodo",&mShowIconNewTodo,true); addItemBool("ShowIconNewEvent",&mShowIconNewEvent,true); addItemBool("ShowIconSearch",&mShowIconSearch,true); addItemBool("ShowIconList",&mShowIconList,true); addItemBool("ShowIconDay1",&mShowIconDay1,true); addItemBool("ShowIconDay5",&mShowIconDay5,true); addItemBool("ShowIconDay7",&mShowIconDay7,true); addItemBool("ShowIconMonth",&mShowIconMonth,true); addItemBool("ShowIconTodoview",&mShowIconTodoview,true); addItemBool("ShowIconBackFast",&mShowIconBackFast,true); addItemBool("ShowIconBack",&mShowIconBack,true); addItemBool("ShowIconToday",&mShowIconToday,true); addItemBool("ShowIconForward",&mShowIconForward,true); addItemBool("ShowIconForwardFast",&mShowIconForwardFast,true); addItemBool("ShowIconWhatsThis",&mShowIconWhatsThis,false); addItemBool("ShowIconNextDays",&mShowIconNextDays,true); addItemBool("ShowIconNext",&mShowIconNext,true); addItemBool("ShowIconJournal",&mShowIconJournal,true); addItemBool("ShowIconStretch",&mShowIconStretch,true); addItemBool("LanguageChanged",&mLanguageChanged,false); addItemBool("AskForQuit",&mAskForQuit,false); #ifndef DESKTOP_VERSION addItemBool("ShowFullMenu",&mShowFullMenu,false); #else addItemBool("ShowFullMenu",&mShowFullMenu,true); #endif addItemBool("ToolBarHor",&mToolBarHor, true ); addItemBool("ToolBarUp",&mToolBarUp, false ); addItemBool("ToolBarMiniIcons",&mToolBarMiniIcons, false ); addItemInt("Whats Next Days",&mWhatsNextDays,3); addItemInt("Whats Next Prios",&mWhatsNextPrios,1); addItemBool("ShowTodoInAgenda",&mShowTodoInAgenda,true); addItemBool("ShowCompletedTodo",&mShowCompletedTodo,true); addItemInt("AllDay Size",&mAllDaySize,28); QString defAlarm = KGlobal::iconLoader()->iconPath()+"koalarm.wav"; addItemString("DefaultAlarmFile",&mDefaultAlarmFile,defAlarm ); addItemStringList("LocationDefaults",&mLocationDefaults ); addItemStringList("EventSummary User",&mEventSummaryUser); addItemStringList("TodoSummary User",&mTodoSummaryUser); addItemBool("Enable Group Scheduling",&mEnableGroupScheduling,false); addItemBool("Enable Project View",&mEnableProjectView,false); diff --git a/korganizer/koprefs.h b/korganizer/koprefs.h index d9ac851..a1ba8b3 100644 --- a/korganizer/koprefs.h +++ b/korganizer/koprefs.h @@ -165,96 +165,99 @@ class KOPrefs : public KPimPrefs bool mLanguageChanged; bool mCompactDialogs; bool mVerticalScreen; bool mShowIconNewTodo; bool mShowIconNewEvent; bool mShowIconSearch; bool mShowIconList; bool mShowIconDay1; bool mShowIconDay5; bool mShowIconDay7; bool mShowIconMonth; bool mShowIconTodoview; bool mShowIconBackFast; bool mShowIconBack; bool mShowIconToday; bool mShowIconForward; bool mShowIconForwardFast; bool mShowIconWhatsThis; bool mShowIconNextDays; bool mShowIconNext; bool mShowIconJournal; bool mShowIconStretch; bool mToolBarHor; bool mToolBarUp; bool mToolBarMiniIcons; bool mAskForQuit; bool mUsePassWd; bool mWriteBackFile; int mWriteBackInFuture; 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; + QString mEx2PhoneDevice; + QString mEx2PhoneConnection; + QString mEx2PhoneModel; 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; bool mHtmlWithSave; QStringList mSelectedPlugins; QString mLastImportFile; QString mLastVcalFile; QString mLastSaveFile; QString mLastLoadFile; QString mLastSyncedLocalFile; QString mDefaultAlarmFile; int mIMIPScheduler; int mIMIPSend; QStringList mAdditionalMails; int mIMIPAutoRefresh; int mIMIPAutoInsertReply; int mIMIPAutoInsertRequest; int mIMIPAutoFreeBusy; int mIMIPAutoFreeBusyReply; QStringList mTodoTemplates; QStringList mEventTemplates; int mDestination; bool mEditOnDoubleClick; bool mViewChangeHoldFullscreen; bool mViewChangeHoldNonFullscreen; bool mCenterOnCurrentTime; bool mSetTimeToDayStartAt; bool mHighlightCurrentDay; bool mUseHighlightLightColor; bool mListViewMonthTimespan; bool mWNViewShowsParents; diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index de94b8c..ef73a78 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -1,116 +1,168 @@ #include <stdlib.h> #include <qaction.h> #include <qpopupmenu.h> #include <qpainter.h> #include <qwhatsthis.h> #include <qpushbutton.h> #include <qmessagebox.h> #include <qlineedit.h> #include <qtextcodec.h> #include <qfile.h> #include <qdir.h> #include <qapp.h> #include <qfileinfo.h> #include <qlabel.h> +#include <qspinbox.h> +#include <qcheckbox.h> #include <qmap.h> #include <qwmatrix.h> #include <qtextbrowser.h> #include <qtextstream.h> #ifndef DESKTOP_VERSION #include <qpe/global.h> #include <qpe/qpemenubar.h> #include <qpe/qpetoolbar.h> #include <qpe/resource.h> #include <qpe/qpeapplication.h> #include <qtopia/alarmserver.h> #include <qtopia/qcopenvelope_qws.h> #include <unistd.h> // for sleep #else #include <qmenubar.h> #include <qtoolbar.h> #include <qapplication.h> //#include <resource.h> #endif #include <libkcal/calendarlocal.h> #include <libkcal/todo.h> +#include <libkcal/phoneformat.h> #include <libkdepim/ksyncprofile.h> #include <libkcal/kincidenceformatter.h> #include <libkdepim/kpimglobalprefs.h> #include "calendarview.h" #include "koviewmanager.h" #include "datenavigator.h" #include "koagendaview.h" #include "koagenda.h" #include "kodialogmanager.h" #include "kdialogbase.h" #include "kapplication.h" #include "kofilterview.h" #include "kstandarddirs.h" #include "koprefs.h" #include "kfiledialog.h" #include "koglobals.h" #include "kglobal.h" #include "klocale.h" #include "kconfig.h" #include "simplealarmclient.h" #include "externalapphandler.h" using namespace KCal; #ifndef _WIN32_ #include <unistd.h> #else #include "koimportoldialog.h" #endif #include "mainwindow.h" +class KOex2phonePrefs : public QDialog +{ + public: + KOex2phonePrefs( QWidget *parent=0, const char *name=0 ) : + QDialog( parent, name, true ) + { + setCaption( i18n("Export to phone options") ); + QVBoxLayout* lay = new QVBoxLayout( this ); + lay->setSpacing( 3 ); + lay->setMargin( 3 ); + + lay->addWidget(new QLabel( i18n("Please read phone sync howto to\nknow more about the connection settings."), this ) ); + QHBox* temphb; + temphb = new QHBox( this ); + new QLabel( i18n("I/O device: "), temphb ); + mPhoneDevice = new QLineEdit( temphb); + lay->addWidget( temphb ); + temphb = new QHBox( this ); + new QLabel( i18n("Connection: "), temphb ); + mPhoneConnection = new QLineEdit( temphb); + lay->addWidget( temphb ); + temphb = new QHBox( this ); + new QLabel( i18n("Model(opt.): "), temphb ); + mPhoneModel = new QLineEdit( temphb); + lay->addWidget( temphb ); + mWriteBackFuture= new QCheckBox( i18n("Write back events in future only"), this ); + mWriteBackFuture->setChecked( true ); + lay->addWidget( mWriteBackFuture ); + temphb = new QHBox( this ); + new QLabel( i18n("Max. weeks in future: ") , temphb ); + mWriteBackFutureWeeks= new QSpinBox(1,104, 1, temphb); + mWriteBackFutureWeeks->setValue( 8 ); + lay->addWidget( temphb ); + QPushButton * ok = new QPushButton( i18n("Export!"), this ); + lay->addWidget( ok ); + QPushButton * cancel = new QPushButton( i18n("Cancel"), this ); + lay->addWidget( cancel ); + connect ( ok,SIGNAL(clicked() ),this , SLOT ( accept() ) ); + connect (cancel, SIGNAL(clicked() ), this, SLOT ( reject()) ); + resize( 220, 220 ); + + } + +public: + QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; + QCheckBox* mWriteBackFuture; + QSpinBox* mWriteBackFutureWeeks; +}; + int globalFlagBlockStartup; MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : QMainWindow( parent, name ) { mPassWordPiSync = "abc"; #ifdef DESKTOP_VERSION setFont( QFont("Arial"), 14 ); #endif mSyncActionDialog = 0; mServerSocket = 0; mClosed = false; //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; QString confFile = locateLocal("config","korganizerrc"); QFileInfo finf ( confFile ); bool showWarning = !finf.exists(); setIcon(SmallIcon( "ko24" ) ); mBlockAtStartup = true; mFlagKeyPressed = false; setCaption("KOrganizer/Pi"); KOPrefs *p = KOPrefs::instance(); KPimGlobalPrefs::instance()->setGlobalConfig(); // if ( QApplication::desktop()->height() > 480 ) { // if ( p->mHourSize == 4 ) // p->mHourSize = 6; // } if ( p->mHourSize > 18 ) p->mHourSize = 18; QMainWindow::ToolBarDock tbd; if ( p->mToolBarHor ) { if ( p->mToolBarUp ) tbd = Bottom; else tbd = Top; } else { if ( p->mToolBarUp ) tbd = Right; else tbd = Left; } if ( KOPrefs::instance()->mUseAppColors ) QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); globalFlagBlockStartup = 1; iconToolBar = new QPEToolBar( this ); addToolBar (iconToolBar , tbd ); mBlockSaveFlag = false; mCalendarModifiedFlag = false; @@ -608,96 +660,105 @@ void MainWindow::initActions() actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu ); } // actionMenu->insertSeparator(); action = new QAction( "import_qtopia", i18n("Import (*.ics/*.vcs) file"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( importIcal() ) ); action = new QAction( "import_quick", i18n("Import last file"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( quickImportIcal() ) ); importMenu->insertSeparator(); action = new QAction( "import_bday", i18n("Import Birthdays (KA/Pi)"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( importBday() ) ); #ifndef DESKTOP_VERSION importMenu->insertSeparator(); action = new QAction( "import_qtopia", i18n("Import Opie/Qtopia Cal."), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( importQtopia() ) ); #else #ifdef _WIN32_ importMenu->insertSeparator(); action = new QAction( "import_ol", i18n("Import from OL"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( importOL() ) ); #endif #endif importMenu->insertSeparator(); action = new QAction( "load_cal", i18n("Load Calendar Backup"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( loadCalendar() ) ); action = new QAction( "save_cal", i18n("Save Calendar Backup"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( saveCalendar() ) ); importMenu->insertSeparator(); action = new QAction( "import_qtopia", i18n("Export VCalendar"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), SLOT( exportVCalendar() ) ); + + + //LR + QPopupMenu *ex2phone = new QPopupMenu( this ); + ex2phone->insertItem(i18n("Complete calendar..."), 1 ); + ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); + connect( ex2phone, SIGNAL( activated(int) ), this, SLOT( exportToPhone( int)) ); + importMenu->insertItem( i18n("Export to phone"), ex2phone ); + importMenu->insertSeparator(); action = new QAction( "manage cat", i18n("Manage new categories..."), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); #ifndef DESKTOP_VERSION importMenu->insertSeparator(); action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); #else importMenu->insertSeparator(); icon = loadPixmap( pathString + "print" ); action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), this, SLOT( printCal() ) ); icon = loadPixmap( pathString + "print" ); action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), this, SLOT( printSel() ) ); #endif importMenu->insertSeparator(); action = new QAction( "beam all", i18n("Save"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); action = new QAction( "beam all", i18n("Exit (+save)"), 0, this ); action->addTo( importMenu ); connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); //menuBar->insertItem( "Configure",configureMenu ); //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); icon = loadPixmap( "korganizer/korganizer" ); action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); action->addTo( helpMenu ); connect( action, SIGNAL( activated() ), SLOT( keyBindings() ) ); action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); @@ -1042,103 +1103,176 @@ void MainWindow::slotSyncMenu( int action ) mBlockSaveFlag = true; mCurrentSyncProfile = action - 1000 ; mView->setSyncDevice(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile] ); mView->setSyncName( KOPrefs::instance()->mLocalMachineName ); KConfig config ( locateLocal( "config","ksyncprofilesrc" ) ); KSyncProfile* temp = new KSyncProfile (); temp->setName(KOPrefs::instance()->mSyncProfileNames[mCurrentSyncProfile]); temp->readConfig(&config); KOPrefs::instance()->mAskForPreferences = temp->getAskForPreferences(); KOPrefs::instance()->mSyncAlgoPrefs = temp->getSyncPrefs(); KOPrefs::instance()->mWriteBackFile = temp->getWriteBackFile(); KOPrefs::instance()->mWriteBackExistingOnly = temp->getWriteBackExisting(); KOPrefs::instance()->mWriteBackInFuture = 0; if ( temp->getWriteBackFuture() ) KOPrefs::instance()->mWriteBackInFuture = temp->getWriteBackFutureWeeks( ); KOPrefs::instance()->mShowSyncSummary = temp->getShowSummaryAfterSync(); if ( action == 1000 ) { syncSharp(); } else if ( action == 1001 ) { syncLocalFile(); } else if ( action == 1002 ) { quickSyncLocalFile(); } else if ( action >= 1003 ) { if ( temp->getIsLocalFileSync() ) { if ( syncWithFile( temp->getRemoteFileName( ), false ) ) 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 if ( temp->getIsPiSync() ) { mPassWordPiSync = temp->getRemotePw(); KOPrefs::instance()->mActiveSyncPort = temp->getRemotePort(); KOPrefs::instance()->mActiveSyncIP = temp->getRemoteIP(); syncPi(); } else syncRemote( temp ); } } delete temp; mBlockSaveFlag = false; } +void MainWindow::exportToPhone( int mode ) +{ + + //ex2phone->insertItem(i18n("Complete calendar..."), 1 ); + //ex2phone->insertItem(i18n("Filtered calendar..."), 2 ); + KOex2phonePrefs ex2phone; + ex2phone.mPhoneConnection->setText( KOPrefs::instance()->mEx2PhoneConnection ); + ex2phone.mPhoneDevice->setText( KOPrefs::instance()->mEx2PhoneDevice ); + ex2phone.mPhoneModel->setText( KOPrefs::instance()->mEx2PhoneModel ); + + if ( !ex2phone.exec() ) { + return; + } + KOPrefs::instance()->mEx2PhoneConnection = ex2phone.mPhoneConnection->text(); + KOPrefs::instance()->mEx2PhoneDevice = ex2phone.mPhoneDevice->text(); + KOPrefs::instance()->mEx2PhoneModel = ex2phone.mPhoneModel->text(); + + int inFuture = 0; + if ( ex2phone.mWriteBackFuture->isChecked() ) + inFuture = ex2phone.mWriteBackFutureWeeks->value(); + QPtrList<Incidence> delSel; + if ( mode == 1 ) + delSel = mCalendar->rawIncidences(); + if ( mode == 2 ) + delSel = mCalendar->incidences(); + CalendarLocal* cal = new CalendarLocal(); + cal->setLocalTime(); + Incidence *incidence = delSel.first(); + QDateTime cur = QDateTime::currentDateTime().addDays( -7 ); + QDateTime end = cur.addDays( ( inFuture +1 ) *7 ); + while ( incidence ) { + if ( incidence->type() != "journal" ) { + bool add = true; + if ( inFuture ) { + QDateTime dt; + if ( incidence->type() == "Todo" ) { + Todo * t = (Todo*)incidence; + if ( t->hasDueDate() ) + dt = t->dtDue(); + else + dt = cur.addSecs( 62 ); + } + else { + bool ok; + dt = incidence->getNextOccurence( cur, &ok ); + if ( !ok ) + dt = cur.addSecs( -62 ); + } + if ( dt < cur || dt > end ) { + add = false; + } + } + if ( add ) { + Incidence *in = incidence->clone(); + cal->addIncidence( in ); + } + } + incidence = delSel.next(); + } + PhoneFormat::writeConfig( KOPrefs::instance()->mEx2PhoneDevice, + KOPrefs::instance()->mEx2PhoneConnection, + KOPrefs::instance()->mEx2PhoneModel ); + + setCaption( i18n("Writing to phone...")); + if ( PhoneFormat::writeToPhone( cal ) ) + setCaption( i18n("Export to phone successful!")); + else + setCaption( i18n("Error exporting to phone!")); + delete cal; +} + + void MainWindow::setDefaultPreferences() { KOPrefs *p = KOPrefs::instance(); p->mCompactDialogs = true; p->mConfirm = true; // p->mEnableQuickTodo = false; + } QString MainWindow::resourcePath() { return KGlobal::iconLoader()->iconPath(); } void MainWindow::displayText( QString text ,QString cap ) { QDialog dia( this, "name", true ); ; dia.setCaption( cap ); QVBoxLayout* lay = new QVBoxLayout( &dia ); lay->setSpacing( 3 ); lay->setMargin( 3 ); QTextBrowser tb ( &dia ); lay->addWidget( &tb ); tb.setText( text ); #ifdef DESKTOP_VERSION dia.resize( 640, 480); #else dia.showMaximized(); #endif dia.exec(); } void MainWindow::displayFile( QString fn, QString cap ) { QString fileName = resourcePath() + fn; QString text; QFile file( fileName ); if (!file.open( IO_ReadOnly ) ) { return ; } QTextStream ts( &file ); text = ts.read(); file.close(); displayText( text, cap); } void MainWindow::features() { displayFile( "featuresKOPI.txt",i18n("KO/Pi Features and hints") ); } void MainWindow::usertrans() { displayFile( "usertranslationHOWTO.txt",i18n("KO/Pi User translation HowTo") ); diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 7b24b88..74c7f45 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -99,96 +99,97 @@ 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 ); void printSel(); void printCal(); void saveCalendar(); void loadCalendar(); void exportVCalendar(); void fillFilterMenu(); void selectFilter( int ); + void exportToPhone( int ); void slotSyncMenu( int ); void confSync(); void syncSharp(); void syncPhone(); void syncPi(); void syncLocalFile(); bool syncWithFile( QString, bool ); void quickSyncLocalFile(); protected: void displayText( QString, QString); void displayFile( QString, QString); void enableIncidenceActions( bool ); 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; |