summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp500
1 files changed, 258 insertions, 242 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 6c0aa9b..4b00062 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -13,5 +13,6 @@
#include <qlabel.h>
-#include <qwmatrix.h>
-#include <qtextbrowser.h>
-#include <qtextstream.h>
+#include <qmap.h>
+#include <qwmatrix.h>
+#include <qtextbrowser.h>
+#include <qtextstream.h>
#ifndef DESKTOP_VERSION
@@ -22,4 +23,4 @@
#include <qpe/qpeapplication.h>
-#include <qtopia/alarmserver.h>
-#include <qtopia/qcopenvelope_qws.h>
+#include <qtopia/alarmserver.h>
+#include <qtopia/qcopenvelope_qws.h>
#else
@@ -53,3 +54,5 @@
#include "simplealarmclient.h"
-using namespace KCal;
+#include "externalapphandler.h"
+
+using namespace KCal;
#ifndef _WIN32_
@@ -68,3 +71,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
setFont( QFont("Arial"), 14 );
-#endif
+#endif
@@ -72,3 +75,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
QString confFile = locateLocal("config","korganizerrc");
- QFileInfo finf ( confFile );
+ QFileInfo finf ( confFile );
bool showWarning = !finf.exists();
@@ -82,3 +85,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
// p->mHourSize = 6;
-// }
+// }
if ( p->mHourSize > 18 )
@@ -104,4 +107,4 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
mBlockSaveFlag = false;
- mCalendarModifiedFlag = false;
-
+ mCalendarModifiedFlag = false;
+
QLabel* splash = new QLabel(i18n("KO/Pi is starting ... "), this );
@@ -118,5 +121,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
//mView->resize(splash->size() );
- initActions();
+ initActions();
#ifndef DESKTOP_VERSION
- iconToolBar->show();
+ iconToolBar->show();
qApp->processEvents();
@@ -135,3 +138,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
//qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
- mView->readSettings();
+ mView->readSettings();
bool oldOpened = false;
@@ -150,3 +153,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
oldFile = QDir::convertSeparators( QDir::homeDirPath()+"/korganizer/mycalendar.ics");
- finfo.setFile( oldFile );
+ finfo.setFile( oldFile );
if (finfo.exists() ) {
@@ -155,3 +158,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
qApp->processEvents();
- }
+ }
}
@@ -177,3 +180,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
SLOT( slotModifiedChanged( bool ) ) );
-
+
@@ -186,3 +189,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
mView->show();
- delete splash;
+ delete splash;
if ( newFile )
@@ -191,6 +194,6 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
//qDebug("MainView x %d y %d w %d h %d", mView->x(),mView-> y(), mView->width(), mView->height ());
- fillSyncMenu();
+ fillSyncMenu();
mView->viewManager()->agendaView()->setStartHour( KOPrefs::instance()->mDayBegins );
if ( showWarning ) {
- KMessageBox::information( this,
+ 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");
@@ -199,2 +202,5 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) :
}
+
+ //US listen for result adressed from Ka/Pi
+ connect(qApp, SIGNAL (appMessage ( const QCString &, const QByteArray & )), ExternalAppHandler::instance(), SLOT (appMessage ( const QCString &, const QByteArray & )));
}
@@ -203,9 +209,9 @@ MainWindow::~MainWindow()
//qDebug("MainWindow::~MainWindow() ");
- //save toolbar location
-
- delete mCalendar;
+ //save toolbar location
+
+ delete mCalendar;
delete KOPrefs::instance();
delete KIncidenceFormatter::instance();
-
-
+
+
}
@@ -213,5 +219,5 @@ void MainWindow::closeEvent( QCloseEvent* ce )
{
-
-
-
+
+
+
if ( ! KOPrefs::instance()->mAskForQuit ) {
@@ -225,3 +231,3 @@ void MainWindow::closeEvent( QCloseEvent* ce )
i18n("Do you really want\nto close KO/Pi?"),
- i18n("Close"), i18n("No"),
+ i18n("Close"), i18n("No"),
0, 0 ) ) {
@@ -232,6 +238,6 @@ void MainWindow::closeEvent( QCloseEvent* ce )
case 1:
- ce->ignore();
+ ce->ignore();
break;
case 2:
-
+
default:
@@ -250,5 +256,15 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
qDebug("KO: QCOP message received: %s ", cmsg.data() );
+
+ if ( cmsg == "-writeFile" ) {
+ // I made from the "-writeFile" an "-writeAlarm"
+ mView->viewManager()->showWhatsNextView();
+ mCalendar->checkAlarmForIncidence( 0, true);
+ showMaximized();
+ raise();
+ return;
+ }
+
if ( cmsg == "-writeFile" ) {
// I made from the "-writeFile" an "-writeAlarm"
- mView->viewManager()->showWhatsNextView();
+ mView->viewManager()->showWhatsNextView();
mCalendar->checkAlarmForIncidence( 0, true);
@@ -257,3 +273,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
return;
-
+
}
@@ -261,3 +277,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
// I made from the "-writeFile" an "-writeAlarm"
- // mView->viewManager()->showWhatsNextView();
+ // mView->viewManager()->showWhatsNextView();
mCalendar->checkAlarmForIncidence( 0, true);
@@ -270,3 +286,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
qDebug("newCountdown ");
-
+
}
@@ -289,4 +305,4 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
mView->newTodo();
-
- }
+
+ }
if ( msg == "-showWN" ) {
@@ -325,3 +341,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
mView->viewManager()->showWhatsNextView();
- }
+ }
else if ( msg == "-showNextXView" ) {
@@ -329,3 +345,3 @@ void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
}
-
+
@@ -353,3 +369,3 @@ void MainWindow::initActions()
selectFilterMenu = new QPopupMenu( this );
- selectFilterMenu->setCheckable( true );
+ selectFilterMenu->setCheckable( true );
syncMenu = new QPopupMenu( this );
@@ -365,7 +381,7 @@ void MainWindow::initActions()
menuBar1->insertItem( i18n("Synchronize"), syncMenu );
- menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
- //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
- menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
- menuBar1->insertItem( i18n("Help"), helpMenu );
- } else {
+ menuBar1->insertItem( i18n("AgendaSize"),configureAgendaMenu );
+ //menuBar1->insertItem( i18n("Toolbar"),configureToolBarMenu );
+ menuBar1->insertItem( i18n("Filter"),selectFilterMenu );
+ menuBar1->insertItem( i18n("Help"), helpMenu );
+ } else {
QPEMenuBar *menuBar1;
@@ -378,7 +394,7 @@ void MainWindow::initActions()
menuBar->insertItem( i18n("Synchronize"), syncMenu );
- menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
- menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
- menuBar->insertItem( i18n("Filter"),selectFilterMenu );
- menuBar->insertItem( i18n("Help"), helpMenu );
- //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
+ menuBar->insertItem( i18n("AgendaSize"),configureAgendaMenu );
+ menuBar->insertItem( i18n("Toolbar"),configureToolBarMenu );
+ menuBar->insertItem( i18n("Filter"),selectFilterMenu );
+ menuBar->insertItem( i18n("Help"), helpMenu );
+ //menuBar1->setMaximumWidth( menuBar1->sizeHint().width() );
menuBar1->setMaximumSize( menuBar1->sizeHint( ));
@@ -395,5 +411,5 @@ void MainWindow::initActions()
- QString pathString = "";
+ QString pathString = "";
if ( !p->mToolBarMiniIcons ) {
- if ( QApplication::desktop()->width() < 480 )
+ if ( QApplication::desktop()->width() < 480 )
pathString += "icons16/";
@@ -402,15 +418,15 @@ void MainWindow::initActions()
configureAgendaMenu->setCheckable( true );
- configureAgendaMenu->insertItem(i18n("Toggle Allday"), 1 );
- configureAgendaMenu->insertSeparator();
- configureAgendaMenu->insertItem(i18n("Tiny"), 4 );
+ configureAgendaMenu->insertItem(i18n("Toggle Allday"), 1 );
+ configureAgendaMenu->insertSeparator();
+ configureAgendaMenu->insertItem(i18n("Tiny"), 4 );
configureAgendaMenu->insertItem(i18n("Small"), 6 );
configureAgendaMenu->insertItem(i18n("Medium"), 8 );
- configureAgendaMenu->insertItem(i18n("Normal"), 10 );
- configureAgendaMenu->insertItem(i18n("Large"), 12 );
- configureAgendaMenu->insertItem(i18n("Big"), 14 );
- configureAgendaMenu->insertItem(i18n("Bigger"), 16 );
- configureAgendaMenu->insertItem(i18n("Biggest"), 18 );
- //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
-
- icon = loadPixmap( pathString + "configure" );
+ configureAgendaMenu->insertItem(i18n("Normal"), 10 );
+ configureAgendaMenu->insertItem(i18n("Large"), 12 );
+ configureAgendaMenu->insertItem(i18n("Big"), 14 );
+ configureAgendaMenu->insertItem(i18n("Bigger"), 16 );
+ configureAgendaMenu->insertItem(i18n("Biggest"), 18 );
+ //configureMenu->insertItem( "AgendaSize",configureAgendaMenu );
+
+ icon = loadPixmap( pathString + "configure" );
action = new QAction( i18n("Configure"),icon, i18n("Configure..."), 0, this );
@@ -420,5 +436,5 @@ void MainWindow::initActions()
actionMenu->insertSeparator();
- icon = loadPixmap( pathString + "newevent" );
- configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
- configureToolBarMenu->insertSeparator();
+ icon = loadPixmap( pathString + "newevent" );
+ configureToolBarMenu->insertItem(i18n("Stretched TB"), 5 );
+ configureToolBarMenu->insertSeparator();
configureToolBarMenu->insertItem(icon, i18n("New Event..."), 10 );
@@ -428,4 +444,4 @@ void MainWindow::initActions()
mView, SLOT( newEvent() ) );
- icon = loadPixmap( pathString + "newtodo" );
- configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
+ icon = loadPixmap( pathString + "newtodo" );
+ configureToolBarMenu->insertItem(icon, i18n("New Todo..."), 20 );
QAction* nt_action = new QAction( i18n("New Todo..."), icon, i18n("New Todo..."), 0, this );
@@ -434,3 +450,3 @@ void MainWindow::initActions()
mView, SLOT( newTodo() ) );
- icon = loadPixmap( pathString + "navi" );
+ icon = loadPixmap( pathString + "navi" );
action = new QAction( i18n("Toggle DateNavigator"), icon, i18n("Toggle DateNavigator"), 0, this );
@@ -439,3 +455,3 @@ void MainWindow::initActions()
mView, SLOT( toggleDateNavigatorWidget() ) );
- icon = loadPixmap( pathString + "filter" );
+ icon = loadPixmap( pathString + "filter" );
action = new QAction( i18n("Toggle FilterView"), icon, i18n("Toggle FilterView"), 0, this );
@@ -444,3 +460,3 @@ void MainWindow::initActions()
mView, SLOT( toggleFilter() ) );
-
+
@@ -454,4 +470,4 @@ void MainWindow::initActions()
viewMenu->insertSeparator();
- icon = loadPixmap( pathString + "list" );
- configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
+ icon = loadPixmap( pathString + "list" );
+ configureToolBarMenu->insertItem(icon, i18n("List View"), 30 );
QAction* showlist_action = new QAction( i18n("List View"), icon, i18n("List View"), 0, this );
@@ -462,4 +478,4 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "day" );
- configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
+ icon = loadPixmap( pathString + "day" );
+ configureToolBarMenu->insertItem(icon, i18n("Day View"), 40 );
QAction* day1_action = new QAction( i18n("Day View"), icon, i18n("Day View"), 0, this );
@@ -470,4 +486,4 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "workweek" );
- configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
+ icon = loadPixmap( pathString + "workweek" );
+ configureToolBarMenu->insertItem(icon, i18n("Work Week"), 50 );
QAction* day5_action = new QAction( i18n("Work Week"), icon, i18n("Work Week"), 0, this );
@@ -478,3 +494,3 @@ void MainWindow::initActions()
icon = loadPixmap( pathString + "week" );
- configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
+ configureToolBarMenu->insertItem(icon, i18n("Week"), 60 );
QAction* day7_action = new QAction( i18n("Week"), icon, i18n("Week"), 0, this );
@@ -484,4 +500,4 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "month" );
- configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
+ icon = loadPixmap( pathString + "month" );
+ configureToolBarMenu->insertItem(icon, i18n("Month"), 70 );
QAction* month_action = new QAction( i18n("Month"), icon, i18n("Month"), 0, this );
@@ -491,4 +507,4 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "todo" );
- configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
+ icon = loadPixmap( pathString + "todo" );
+ configureToolBarMenu->insertItem(icon, i18n("Todo View"), 80 );
QAction* todoview_action = new QAction( i18n("Todo View"), icon, i18n("Todo View"), 0, this );
@@ -498,4 +514,4 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "journal" );
- configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
+ icon = loadPixmap( pathString + "journal" );
+ configureToolBarMenu->insertItem(icon, i18n("Journal"), 90 );
QAction* viewjournal_action = new QAction( i18n("Journal"), icon, i18n("Journal"), 0, this );
@@ -505,4 +521,4 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "xdays" );
- configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 );
+ icon = loadPixmap( pathString + "xdays" );
+ configureToolBarMenu->insertItem(icon, i18n("Next days"), 100,4 );
QAction* xdays_action = new QAction( i18n("Next days"), icon, i18n("Next days"), 0, this );
@@ -512,5 +528,5 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "whatsnext" );
- configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 );
- QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
+ icon = loadPixmap( pathString + "whatsnext" );
+ configureToolBarMenu->insertItem(icon, i18n("What's Next"), 110, 4 );
+ QAction* whatsnext_action = new QAction( i18n("What's Next"), icon, i18n("What's Next"), 0, this );
whatsnext_action->addTo( viewMenu );
@@ -518,3 +534,3 @@ void MainWindow::initActions()
mView->viewManager(), SLOT( showWhatsNextView() ) );
-
+
#if 0
@@ -556,5 +572,5 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "search" );
+ icon = loadPixmap( pathString + "search" );
QAction* search_action = new QAction( i18n("Search"), icon, i18n("Search..."), 0, this );
- configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4);
+ configureToolBarMenu->insertItem(icon, i18n("Search"), 120 , 4);
search_action->addTo( actionMenu );
@@ -563,4 +579,4 @@ void MainWindow::initActions()
- icon = loadPixmap( pathString + "today" );
- configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
+ icon = loadPixmap( pathString + "today" );
+ configureToolBarMenu->insertItem(icon, i18n("Go to Today"), 130);
QAction* today_action = new QAction( i18n("Go to Today"), icon, i18n("Go to Today"), 0, this );
@@ -572,4 +588,4 @@ void MainWindow::initActions()
actionMenu->insertSeparator();
- actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
-
+ actionMenu->insertItem( i18n("Configure Toolbar"),configureToolBarMenu );
+
}
@@ -631,3 +647,3 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) );
-
+
action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0,
@@ -637,4 +653,4 @@ void MainWindow::initActions()
#else
- importMenu->insertSeparator();
- icon = loadPixmap( pathString + "print" );
+ importMenu->insertSeparator();
+ icon = loadPixmap( pathString + "print" );
action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this );
@@ -643,4 +659,4 @@ void MainWindow::initActions()
this, SLOT( printCal() ) );
-
- icon = loadPixmap( pathString + "print" );
+
+ icon = loadPixmap( pathString + "print" );
action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
@@ -659,6 +675,6 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ), this, SLOT( close() ) );
-
+
//menuBar->insertItem( "Configure",configureMenu );
//configureMenu->insertItem( "Toolbar",configureToolBarMenu );
- icon = loadPixmap( "korganizer/korganizer" );
+ icon = loadPixmap( "korganizer/korganizer" );
action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this );
@@ -666,3 +682,3 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ),
- SLOT( keyBindings() ) );
+ SLOT( keyBindings() ) );
action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this );
@@ -670,3 +686,3 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ),
- SLOT( features() ) );
+ SLOT( features() ) );
action = new QAction( "Auto saving", i18n("Auto saving..."), 0, this );
@@ -674,3 +690,3 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ),
- SLOT( aboutAutoSaving() ) );
+ SLOT( aboutAutoSaving() ) );
action = new QAction( "Problemd", i18n("Known Problems..."), 0,this );
@@ -678,3 +694,3 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ),
- SLOT( aboutKnownBugs() ) );
+ SLOT( aboutKnownBugs() ) );
action = new QAction( "Translate Howto", i18n("User translation..."), 0,this );
@@ -682,3 +698,3 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ),
- SLOT( usertrans() ) );
+ SLOT( usertrans() ) );
action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this );
@@ -686,3 +702,3 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ),
- SLOT( synchowto() ) );
+ SLOT( synchowto() ) );
action = new QAction( "Whats New", i18n("What's new?"), 0,this );
@@ -694,4 +710,4 @@ void MainWindow::initActions()
connect( action, SIGNAL( activated() ),
- SLOT( faq() ) );
-
+ SLOT( faq() ) );
+
@@ -708,6 +724,6 @@ void MainWindow::initActions()
// ******************************************************
- // menubar icons
-
-
- iconToolBar->setHorizontalStretchable (true );
+ // menubar icons
+
+
+ iconToolBar->setHorizontalStretchable (true );
//menuBar->insertItem( iconToolBar );
@@ -739,3 +755,3 @@ void MainWindow::initActions()
icon = loadPixmap( pathString + "2leftarrowB" );
- configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14);
+ configureToolBarMenu->insertItem(icon, i18n("Prev. month"), 200, 14);
if (p-> mShowIconBackFast) {
@@ -747,3 +763,3 @@ void MainWindow::initActions()
icon = loadPixmap( pathString + "1leftarrowB" );
- configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15);
+ configureToolBarMenu->insertItem(icon, i18n("Go backward"), 210,15);
if (p-> mShowIconBack) {
@@ -754,6 +770,6 @@ void MainWindow::initActions()
}
- if (p-> mShowIconToday)
+ if (p-> mShowIconToday)
today_action->addTo( iconToolBar );
icon = loadPixmap( pathString + "1rightarrowB" );
- configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
+ configureToolBarMenu->insertItem(icon, i18n("Go forward"), 220);
if (p-> mShowIconForward) {
@@ -765,3 +781,3 @@ void MainWindow::initActions()
icon = loadPixmap( pathString + "2rightarrowB" );
- configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
+ configureToolBarMenu->insertItem(icon, i18n("Next month"), 230);
if (p-> mShowIconForwardFast) {
@@ -772,5 +788,5 @@ void MainWindow::initActions()
}
-
-
- configureToolBarMenu->insertItem(i18n("What's This?"), 300);
+
+
+ configureToolBarMenu->insertItem(i18n("What's This?"), 300);
@@ -796,6 +812,6 @@ void MainWindow::initActions()
configureToolBarMenu->setItemChecked( 200, true );
- if (p-> mShowIconBack)
+ if (p-> mShowIconBack)
configureToolBarMenu->setItemChecked( 210, true );
if (p-> mShowIconToday)
- configureToolBarMenu->setItemChecked( 130, true );
+ configureToolBarMenu->setItemChecked( 130, true );
if (p-> mShowIconForward)
@@ -821,3 +837,3 @@ void MainWindow::initActions()
QWhatsThis::whatsThisButton ( iconToolBar );
- connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
+ connect( configureToolBarMenu, SIGNAL( activated( int ) ),this, SLOT(configureToolBar( int ) ) );
configureAgenda( p->mHourSize );
@@ -852,3 +868,3 @@ void MainWindow::fillSyncMenu()
config.sync();
- delete temp;
+ delete temp;
}
@@ -868,3 +884,3 @@ void MainWindow::fillSyncMenu()
mView->setupExternSyncProfiles();
-}
+}
@@ -873,5 +889,5 @@ int MainWindow::ringSync()
int syncedProfiles = 0;
- int i;
+ int i;
QTime timer;
- KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ KConfig config ( locateLocal( "config","syncprofilesrc" ) );
QStringList syncProfileNames = KOPrefs::instance()->mSyncProfileNames;
@@ -896,3 +912,3 @@ int MainWindow::ringSync()
if ( temp->getIsLocalFileSync() ) {
- if ( syncWithFile( temp->getRemoteFileName( ), true ) )
+ if ( syncWithFile( temp->getRemoteFileName( ), true ) )
KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
@@ -906,3 +922,3 @@ int MainWindow::ringSync()
syncRemote( temp, false );
-
+
}
@@ -917,3 +933,3 @@ int MainWindow::ringSync()
}
-
+
}
@@ -923,3 +939,3 @@ int MainWindow::ringSync()
return syncedProfiles;
-}
+}
@@ -929,3 +945,3 @@ void MainWindow::multiSync( bool askforPrefs )
return;
- mBlockSaveFlag = true;
+ mBlockSaveFlag = true;
QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!");
@@ -933,3 +949,3 @@ void MainWindow::multiSync( bool askforPrefs )
question,
- i18n("Yes"), i18n("No"),
+ i18n("Yes"), i18n("No"),
0, 0 ) != 0 ) {
@@ -952,3 +968,3 @@ void MainWindow::multiSync( bool askforPrefs )
if ( num )
- save();
+ save();
if ( num )
@@ -967,7 +983,7 @@ void MainWindow::slotSyncMenu( int action )
return;
- }
- if ( action == 1 ) {
+ }
+ if ( action == 1 ) {
multiSync( true );
return;
- }
+ }
@@ -979,3 +995,3 @@ void MainWindow::slotSyncMenu( int action )
mView->setSyncName( KOPrefs::instance()->mLocalMachineName );
- KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ KConfig config ( locateLocal( "config","syncprofilesrc" ) );
KSyncProfile* temp = new KSyncProfile ();
@@ -999,3 +1015,3 @@ void MainWindow::slotSyncMenu( int action )
if ( temp->getIsLocalFileSync() ) {
- if ( syncWithFile( temp->getRemoteFileName( ), false ) )
+ if ( syncWithFile( temp->getRemoteFileName( ), false ) )
KOPrefs::instance()->mLastSyncedLocalFile = temp->getRemoteFileName();
@@ -1037,3 +1053,3 @@ void MainWindow::displayText( QString text ,QString cap )
QTextBrowser tb ( &dia );
- lay->addWidget( &tb );
+ lay->addWidget( &tb );
tb.setText( text );
@@ -1049,3 +1065,3 @@ void MainWindow::displayFile( QString fn, QString cap )
QString fileName = resourcePath() + fn;
- QString text;
+ QString text;
QFile file( fileName );
@@ -1053,7 +1069,7 @@ void MainWindow::displayFile( QString fn, QString cap )
return ;
-
- }
+
+ }
QTextStream ts( &file );
text = ts.read();
- file.close();
+ file.close();
displayText( text, cap);
@@ -1080,3 +1096,3 @@ void MainWindow::synchowto()
#if 0
- QPtrList<Incidence> er = mCalendar->rawIncidences();
+ QPtrList<Incidence> er = mCalendar->rawIncidences();
Incidence* inR = er.first();
@@ -1094,3 +1110,3 @@ void MainWindow::synchowto()
displayFile( "howtoSYNC.txt",i18n("KO/Pi Synchronization HowTo") );
-}
+}
void MainWindow::faq()
@@ -1117,3 +1133,3 @@ void MainWindow::about()
"(KO/Pi) " + version + " - " +
-
+
#ifdef DESKTOP_VERSION
@@ -1177,3 +1193,3 @@ void MainWindow::keyBindings()
displayText( text, cap);
-
+
}
@@ -1189,4 +1205,4 @@ void MainWindow::aboutAutoSaving()
delete msg;
-
-
+
+
}
@@ -1207,3 +1223,3 @@ void MainWindow::aboutKnownBugs()
delete msg;
-
+
}
@@ -1219,19 +1235,19 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
enableIncidenceActions( false );
-
- mNewSubTodoAction->setEnabled( false );
+
+ mNewSubTodoAction->setEnabled( false );
setCaptionToDates();
return;
-
+
}
-
+
//KGlobal::locale()->formatDateTime(nextA, true);
QString startString = "";
- if ( incidence->type() != "Todo" ) {
- if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
+ if ( incidence->type() != "Todo" ) {
+ if ( incidence->dtStart().date() < incidence->dtEnd().date() ) {
if ( incidence->doesFloat() ) {
- startString += ": "+incidence->dtStartDateStr( true );
- startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
+ startString += ": "+incidence->dtStartDateStr( true );
+ startString += " --- "+((Event*)incidence)->dtEndDateStr( true );
} else {
- startString = ": "+incidence->dtStartStr(true);
+ startString = ": "+incidence->dtStartStr(true);
startString += " --- "+((Event*)incidence)->dtEndStr(true);
@@ -1239,3 +1255,3 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
}
-
+
} else {
@@ -1244,7 +1260,7 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
"-"+KGlobal::locale()->formatTime(incidence->dtEnd().time());
- startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
+ startString +=" "+KGlobal::locale()->formatDate( incidence->dtStart().date(), true);
}
-
+
}
- else
+ else
startString = i18n(": (Prio ") +QString::number( (( KCal::Todo*)incidence)->priority() ) +") "+QString::number( (( KCal::Todo*)incidence)->percentComplete() ) +i18n("\% completed");
@@ -1253,5 +1269,5 @@ void MainWindow::processIncidenceSelection( Incidence *incidence )
setCaption( incidence->summary()+startString);
-
+
enableIncidenceActions( true );
-
+
if ( incidence->type() == "Event" ) {
@@ -1294,3 +1310,3 @@ void MainWindow::importOL()
void MainWindow::importBday()
-{
+{
int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),
@@ -1301,5 +1317,5 @@ void MainWindow::importBday()
mView->importBday();
-
+
}
-
+
@@ -1325,5 +1341,5 @@ void MainWindow::importQtopia()
-#endif
+#endif
}
-
+
void MainWindow::saveOnClose()
@@ -1343,3 +1359,3 @@ void MainWindow::slotModifiedChanged( bool changed )
int msec;
- // we store the changes after 1 minute,
+ // we store the changes after 1 minute,
// and for safety reasons after 10 minutes again
@@ -1356,3 +1372,3 @@ void MainWindow::save()
{
- if ( mBlockSaveFlag )
+ if ( mBlockSaveFlag )
return;
@@ -1372,5 +1388,5 @@ void MainWindow::save()
savemes.sprintf(i18n("KO/Pi:File Saved. Needed %d sec, %d ms"),(msNeeded/1000)%100,msNeeded%1000 );
- setCaption(savemes);
+ setCaption(savemes);
} else
- setCaption(i18n("Saving cancelled!"));
+ setCaption(i18n("Saving cancelled!"));
mCalendarModifiedFlag = false;
@@ -1379,3 +1395,3 @@ void MainWindow::save()
-void MainWindow::keyReleaseEvent ( QKeyEvent * e)
+void MainWindow::keyReleaseEvent ( QKeyEvent * e)
{
@@ -1385,3 +1401,3 @@ void MainWindow::keyReleaseEvent ( QKeyEvent * e)
}
-void MainWindow::keyPressEvent ( QKeyEvent * e )
+void MainWindow::keyPressEvent ( QKeyEvent * e )
{
@@ -1420,3 +1436,3 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
mView->viewManager()->agendaView()->scrollOneHourUp();
- break;
+ break;
case Qt::Key_I:
@@ -1442,3 +1458,3 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
case Qt::Key_6:
- case Qt::Key_7:
+ case Qt::Key_7:
case Qt::Key_8:
@@ -1461,3 +1477,3 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
mView->newSubTodo();
- else
+ else
mView->dialogManager()->showSearchDialog();
@@ -1478,6 +1494,6 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
mView->viewManager()->showWhatsNextView();
- break;
+ break;
case Qt::Key_L:
mView->viewManager()->showListView();
- break;
+ break;
case Qt::Key_N:
@@ -1485,13 +1501,13 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
showSelectedDates = true;
- break;
+ break;
case Qt::Key_V:
mView->viewManager()->showTodoView();
- break;
+ break;
case Qt::Key_C:
mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() );
- break;
+ break;
case Qt::Key_P:
mView->showDatePicker( );
- break;
- case Qt::Key_F:
+ break;
+ case Qt::Key_F:
if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
@@ -1500,12 +1516,12 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
mView->toggleFilter();
- break;
+ break;
case Qt::Key_X:
mView->toggleDateNavigatorWidget();
- break;
+ break;
case Qt::Key_Space:
mView->toggleExpand();
- break;
+ break;
case Qt::Key_A:
mView->toggleAllDaySize();
- break;
+ break;
case Qt::Key_T:
@@ -1524,4 +1540,4 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
break;
- // case Qt::Key_Return:
- case Qt::Key_E:
+ // case Qt::Key_Return:
+ case Qt::Key_E:
if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
@@ -1541,3 +1557,3 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
break;
-
+
@@ -1566,3 +1582,3 @@ void MainWindow::fillFilterMenu()
}
- selectFilterMenu->insertSeparator();
+ selectFilterMenu->insertSeparator();
QPtrList<CalFilter> fili = mView->filters();
@@ -1606,3 +1622,3 @@ void MainWindow::configureToolBar( int item )
p-> mShowIconBack = configureToolBarMenu->isItemChecked( 210 );
- p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
+ p-> mShowIconToday= configureToolBarMenu->isItemChecked( 130 );
p-> mShowIconForward= configureToolBarMenu->isItemChecked( 220 );
@@ -1612,3 +1628,3 @@ void MainWindow::configureToolBar( int item )
p-> mShowIconJournal= configureToolBarMenu->isItemChecked( 90 );
- p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
+ p-> mShowIconWhatsThis= configureToolBarMenu->isItemChecked( 300 );
// initActions();
@@ -1623,3 +1639,3 @@ void MainWindow::setCaptionToDates()
setCaption( i18n("Dates: ") + selDates );
-
+
}
@@ -1627,3 +1643,3 @@ void MainWindow::setCaptionToDates()
void MainWindow::configureAgenda( int item )
-{
+{
@@ -1651,3 +1667,3 @@ void MainWindow::configureAgenda( int item )
void MainWindow::saveCalendar()
-{
+{
QString fn = KOPrefs::instance()->mLastSaveFile;
@@ -1661,3 +1677,3 @@ void MainWindow::saveCalendar()
bool createbup = true;
- if ( info. exists() ) {
+ if ( info. exists() ) {
mes = i18n("Backup file\nalready exists!\nOld backup file from:\n%1\nOverwrite?\n").arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false )) ;
@@ -1671,3 +1687,3 @@ void MainWindow::saveCalendar()
if ( createbup ) {
- mView->saveCalendar( fn );
+ mView->saveCalendar( fn );
mes = i18n("KO/Pi:Saved %1").arg(fn);
@@ -1679,6 +1695,6 @@ void MainWindow::loadCalendar()
{
-
+
QString fn = KOPrefs::instance()->mLastLoadFile;
fn = KFileDialog::getOpenFileName( fn, i18n("Load backup filename"), this );
-
+
if ( fn == "" )
@@ -1728,5 +1744,5 @@ void MainWindow::importFile( QString fn, bool quick )
return;
- }
+ }
int result = 0;
- if ( !quick ) {
+ if ( !quick ) {
mess = i18n( "Import file \n...%1\nfrom:\n%2\nDuplicated entries\nwill not be imported!\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
@@ -1749,3 +1765,3 @@ void MainWindow::importIcal()
{
-
+
QString fn =KOPrefs::instance()->mLastImportFile;
@@ -1756,3 +1772,3 @@ void MainWindow::importIcal()
importFile( fn, true );
-
+
}
@@ -1769,3 +1785,3 @@ void MainWindow::exportVCalendar()
bool createbup = true;
- if ( info. exists() ) {
+ 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 ) );
@@ -1779,4 +1795,4 @@ void MainWindow::exportVCalendar()
if ( createbup ) {
- if ( mView->exportVCalendar( fn ) ) {
- KOPrefs::instance()->mLastVcalFile = fn;
+ if ( mView->exportVCalendar( fn ) ) {
+ KOPrefs::instance()->mLastVcalFile = fn;
if ( fn.length() > 20 )
@@ -1790,12 +1806,12 @@ void MainWindow::exportVCalendar()
}
-#include <qpushbutton.h>
+#include <qpushbutton.h>
QString MainWindow::getPassword( )
-{
+{
QString retfile = "";
- QDialog dia ( this, "input-dialog", true );
- QLineEdit lab ( &dia );
+ QDialog dia ( this, "input-dialog", true );
+ QLineEdit lab ( &dia );
lab.setEchoMode( QLineEdit::Password );
QVBoxLayout lay( &dia );
- lay.setMargin(7);
- lay.setSpacing(7);
+ lay.setMargin(7);
+ lay.setSpacing(7);
lay.addWidget( &lab);
@@ -1803,3 +1819,3 @@ QString MainWindow::getPassword( )
dia.setCaption( i18n("Enter password") );
- QPushButton pb ( "OK", &dia);
+ QPushButton pb ( "OK", &dia);
lay.addWidget( &pb );
@@ -1846,5 +1862,5 @@ bool MainWindow::syncWithFile( QString fn , bool quick )
return ret;
- }
+ }
int result = 0;
- if ( !quick ) {
+ if ( !quick ) {
mess = i18n("Sync with file \n...%1\nfrom:\n%2\n").arg(fn.right( 25)).arg(KGlobal::locale()->formatDateTime(info.lastModified (), true, false ));
@@ -1854,3 +1870,3 @@ bool MainWindow::syncWithFile( QString fn , bool quick )
0, 1 );
- if ( result )
+ if ( result )
return false;
@@ -1858,3 +1874,3 @@ bool MainWindow::syncWithFile( QString fn , bool quick )
if ( KOPrefs::instance()->mAskForPreferences )
- mView->edit_sync_options();
+ mView->edit_sync_options();
if ( result == 0 ) {
@@ -1889,3 +1905,3 @@ void MainWindow::confSync()
//mView->writeSettings();
-
+
@@ -1899,3 +1915,3 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
question,
- i18n("Yes"), i18n("No"),
+ i18n("Yes"), i18n("No"),
0, 0 ) != 0 )
@@ -1909,5 +1925,5 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
- }
+ }
int maxlen = 30;
- if ( QApplication::desktop()->width() > 320 )
+ if ( QApplication::desktop()->width() > 320 )
maxlen += 25;
@@ -1930,3 +1946,3 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
i18n("Okay!")) ;
- setCaption ("KO/Pi");
+ setCaption ("KO/Pi");
return;
@@ -1941,3 +1957,3 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
if ( KOPrefs::instance()->mWriteBackFile ) {
- command = prof->getPostSyncCommand();
+ command = prof->getPostSyncCommand();
setCaption ( i18n( "Writing back file ..." ) );
@@ -1956,5 +1972,5 @@ void MainWindow::syncRemote( KSyncProfile* prof, bool ask)
void MainWindow::syncSSH()
-{
+{
// not used anymore
- QTime timer;
+ QTime timer;
timer.start();
@@ -1973,3 +1989,3 @@ void MainWindow::syncSSH()
int maxlen = 30;
- if ( QApplication::desktop()->width() > 320 )
+ if ( QApplication::desktop()->width() > 320 )
maxlen += 25;
@@ -1983,6 +1999,6 @@ void MainWindow::syncSSH()
question += i18n("Local temp file:\n " ) + localFile +"\n";
-
+
if ( QMessageBox::information( this, i18n("KO/Pi Sync"),
question,
- i18n("Yes"), i18n("No"),
+ i18n("Yes"), i18n("No"),
0, 0 ) != 0 )
@@ -2012,3 +2028,3 @@ void MainWindow::syncSSH()
i18n("Okay!")) ;
- setCaption ("KO/Pi");
+ setCaption ("KO/Pi");
return;
@@ -2025,3 +2041,3 @@ void MainWindow::syncSSH()
if ( KOPrefs::instance()->mWriteBackFile ) {
- command = "scp " + localFile +" " +remoteUser + "@" + remoteIP +":" + remoteFile ;
+ command = "scp " + localFile +" " +remoteUser + "@" + remoteIP +":" + remoteFile ;
setCaption ( i18n( "Writing back file ..." ) );
@@ -2038,3 +2054,3 @@ void MainWindow::syncSSH()
i18n("Okay!")) ;
- setCaption ("KO/Pi");
+ setCaption ("KO/Pi");
return;
@@ -2053,3 +2069,3 @@ void MainWindow::syncSSH()
mView->syncCalendar( "/home/polo/Applications/korganizer/z_sync.ics", 0 );
- while ( mBlockSaveFlag )
+ while ( mBlockSaveFlag )
qApp->processEvents();
@@ -2068,3 +2084,3 @@ void MainWindow::syncSharp()
slotModifiedChanged( true );
-
+
}
@@ -2076,3 +2092,3 @@ void MainWindow::syncPhone()
slotModifiedChanged( true );
-
+
}