summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt8
-rw-r--r--korganizer/mainwindow.cpp75
-rw-r--r--korganizer/mainwindow.h4
3 files changed, 70 insertions, 17 deletions
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index ea653b2..e8b54fd 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1519,55 +1519,63 @@
1519{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" }, 1519{ "Pi-Sync: Connected!","Pi-Sync: Verbunden!" },
1520{ "Receiving file from remote...","Empfange entfernte Datei..." }, 1520{ "Receiving file from remote...","Empfange entfernte Datei..." },
1521{ "Sending back synced file...","Sende synchronisierte Datei zurück..." }, 1521{ "Sending back synced file...","Sende synchronisierte Datei zurück..." },
1522{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" }, 1522{ "Do you want to\nclear all sync info\nof all profiles?","Möchten Sie wirklich\ndie Sync-Info\nfür alle Profile\nlöschen?" },
1523{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" }, 1523{ "Do you want to\nclear the sync\ninfo of profile\n%1?\n","Möchten Sie wirklich\ndie Sync-Info für Profil\n%1?\nlöschen" },
1524{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." }, 1524{ "Sorry, no valid port.Syncing cancelled.","Sorry, kein gültiger Port. Syncing abgebrochen." },
1525{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" }, 1525{ "Remote port number:\n(May be: 1 - 65535)","Ferne Port Nummer:\n(Darf sein: 1 - 65535)" },
1526{ "Writing back file ...","Schreibe Datei zurück..." }, 1526{ "Writing back file ...","Schreibe Datei zurück..." },
1527{ "Sending back file ...","Sende Datei zurück..." }, 1527{ "Sending back file ...","Sende Datei zurück..." },
1528{ "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" }, 1528{ "Eeek, there I am ticklish!","Hihi, da bin ich kitzlig!" },
1529{ "Created","Angelegt" }, 1529{ "Created","Angelegt" },
1530{ "Last Modified Sub","Zuletzt geändertes Sub" }, 1530{ "Last Modified Sub","Zuletzt geändertes Sub" },
1531{ "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" }, 1531{ "Checking conflicts ... please wait","Überprüfe Konflikte ... bitte warten" },
1532{ "Show times on two lines","Zeige Zeiten auf zwei Zeilen" }, 1532{ "Show times on two lines","Zeige Zeiten auf zwei Zeilen" },
1533{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" }, 1533{ "Save using LOCAL storage","Speichere nutze LOCAL Pfad" },
1534{ "Duration","Dauer" }, 1534{ "Duration","Dauer" },
1535{ " day"," Tag" }, 1535{ " day"," Tag" },
1536{ "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" }, 1536{ "Click this button to display all todos in a <b>flat</b> hierarchy","Klicke diesen Knopf um alle Todos in einer <b>flachen</b> Hierarchie darzustellen" },
1537{ "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" }, 1537{ "Click this button to display all todos <b>openend</b>","Klicke diesen Knopf um alle Todos <b>geöffnet</b> darzustellen" },
1538{ "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" }, 1538{ "Click this button to display all todos <b>closed</b>","Klicke diesen Knopf um alle Todos <b>geschlossen</b> darzustellen" },
1539{ "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" }, 1539{ "Click this button to toggle show/hide <b>running</b> todos","Klicke diesen Knopf um <b>zeige Laufende</b> umzuschalten" },
1540{ "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" }, 1540{ "Click this button to toggle show/hide <b>completed</b> todos","Klicke diesen Knopf um <b>zeige Erledigte</b> umzuschalten" },
1541{ "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" }, 1541{ "Click this button to add a new subtodo to the currently selected todo","Klicke diesen Knopf um ein Untertodo zu dem gerade selektierten Todo hinzuzufügen" },
1542{ "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." }, 1542{ "In this column you can <b>set a calendar to be visible</b>. If a calendar is not visible its entries are not displayed in the views. You can add items to it and it is loaded/saved as usual.","In dieser Spalte kann man einen <b>Kalender auf sichtbar schalten</b>. Wenn ein Kalender nicht sichtbar ist werden seine Einträge nicht in den Ansichten angezeigt. Man kann Einträge hinzufügen und laden/speichern wie gewöhnlich." },
1543{ "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." }, 1543{ "In this column you can see the <b>name of the calendar</b>. If you click on the name button you will get an information box about the loaded calendar file. If the file was not loaded at startup you can try to load it here again.","In dieser Spalte wird der <b>Name des Kalenders</b> angezeigt. Wenn Sie auf den Namen klicken wird Information über die Kalenderdatei angezeigt. Wenn die Datei beim Start nicht geladen wurde können Sie hier erneut versuchen sie zu laden." },
1544{ "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." }, 1544{ "In this column you can <b>disable the alarms of a calendar all together</b>. The alarm data in the calendar itself is not changed, the alarms are marked internally as "do not use". Useful if you load a calendar of another person but do not want to get notified about alarms of that person.","In dieser Spalte können die <b>Alarme eines Kalenders alle zusammen abgeschaltet werden</b>. Die Alarmdaten im Kalender selbst werden nicht verändert, es werde die Alarme intern als "nicht beachten" markiert. Nützlich wenn Sie den Kalender einer anderen Person laden aber nicht über dessen Alarme unterrichtet werden wollen." },
1545{ "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." }, 1545{ "In this column you can <b>set a calendar and all entries of the calendar to read only</b>. If a calendar is readonly the entries cannot be edited and no items can be added to the calendar. If you change a setting of a calendar to readonly in this column all data will be saved because the data of a readonly calendar is not saved later.","In dieser Spalte können Sie einen <b>Kalender und alle Einträge auf schreibgeschützt setzen</b>. Einträge eines schreibgeschützten Kalenders können nicht verändert werden und es können keine Einträge zum Kalender hinzugefügt werden. Wenn Sie die Einstellung eines Kalenders in dieser Spalte auf schreibgeschützt setzen werden alle Daten automatisch abgespeichert, da die Daten eines schreibgeschützten Kalenders später nicht mehr gespeichert werden." },
1546{ "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." }, 1546{ "Click this button to <b>add a calendar</b>. You can add an existing calendar file or you can add a new calendar and KO/Pi creates a new empty calendar file for you.","Klicken Sie diesen Knopf <b>um einen Kalender hinzuzufügen</b>. Sie können eine existierende Kalenderdatei hinzufügen oder einen neuen Kalender und KO/Pi legt dann eine neue leere Kalenderdatei für Sie an." },
1547{ "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" }, 1547{ "<b>iCal (*.ics) file on disk:</b><br>(will be created, if not existing)","<b>iCal (*.ics) Datei:</b><br>(Datei wird angelegt, wenn sie nicht existiert)" },
1548{ "Error saving data","Fehler beim Abspeichern" }, 1548{ "Error saving data","Fehler beim Abspeichern" },
1549{ "Calendar(s) not saved:","Nicht gespeicherte Kalender:" }, 1549{ "Calendar(s) not saved:","Nicht gespeicherte Kalender:" },
1550{ "Enable conflict detection","Schalte Konflikterkennung an" }, 1550{ "Enable conflict detection","Schalte Konflikterkennung an" },
1551{ "Filter for the edited event","Filter für den bearbeiteten Termin" }, 1551{ "Filter for the edited event","Filter für den bearbeiteten Termin" },
1552{ "Filter for other events","Filter für die anderen Termine" }, 1552{ "Filter for other events","Filter für die anderen Termine" },
1553{ "Check Allday with Allday","Prüfe GanzTag mit GanzTag" }, 1553{ "Check Allday with Allday","Prüfe GanzTag mit GanzTag" },
1554{ "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" }, 1554{ "Check Allday with NonAllday","Prüfe GanzTag mit NichtGanzTag" },
1555{ "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" }, 1555{ "Check NonAllday with Allday","Prüfe NichtGanzTag mit GanzTag" },
1556{ "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" }, 1556{ "Check NonAllday with NonAllday","Prüfe NichtGanzTag mit NichtGanzTag" },
1557{ "Conflict detection","Konflikterkennung" }, 1557{ "Conflict detection","Konflikterkennung" },
1558{ "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" }, 1558{ "Loading calendar files ... please wait","Lade Kalenderdateien ... bitte warten" },
1559{ "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." }, 1559{ "Show multiday allday ev. in date nav.","Zeige Multi-Ganzt.Term.in Datums Nav." },
1560{ "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" }, 1560{ "Include events which "show as free"","Inklusive Termine mit "Zeige Zeit als frei"" },
1561{ "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." }, 1561{ "Conflict detection checks an <b>edited event</b> with <b>other events</b> for overlapping.","Konflikterkennung prüft einen <b>bearbeiteten Termin</b> auf Überschneidungen mit <b>anderen Terminen</b>." },
1562{ " Yes, close "," Ja, beenden " }, 1562{ " Yes, close "," Ja, beenden " },
1563{ "Export All Data","Exportiere alle Daten" }, 1563{ "Export All Data","Exportiere alle Daten" },
1564{ "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" }, 1564{ "You can save all data\nto another file via\nFile->Export->Export All Data","Sie können alle Daten in\neine andere Datei speichern unter\nDatei->Exportiere->Exportiere alle Daten" },
1565{ "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" }, 1565{ "<p><b>Duration:</b> %1 days</p>","<p><b>Dauer:</b> %1 Tage</p>" },
1566{ " (Duration: %1 days)"," (Dauer: %1 Tage)" }, 1566{ " (Duration: %1 days)"," (Dauer: %1 Tage)" },
1567{ "Autosave enabled!","Auto-Speichern angeschaltet!" },
1568{ "Autosave disabled! Save timer stopped!","Auto-Speichern ausgeschaltet! Speicher Timer gestoppt!" },
1569{ "Autosave disabled!","Auto-Speichern ist ausgeschaltet!" },
1570{ "Yes, Save!","Ja, Speichern!" },
1571{ "Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?","Der Kalender wurde verändert,\naber Auto-Speichern ist\nabgeschaltet. Möchten Sie\ndie Daten speichern?" },
1572{ "<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n","<p><b>C+ctrl</b>: Auto-Speichern ab/anschalten</p>\n" },
1573{ "","" },
1574{ "","" },
1567{ "","" }, 1575{ "","" },
1568{ "","" }, 1576{ "","" },
1569{ "","" }, 1577{ "","" },
1570{ "","" }, 1578{ "","" },
1571{ "","" }, 1579{ "","" },
1572{ "","" }, 1580{ "","" },
1573{ "","" }, 1581{ "","" },
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index c597138..66bb19b 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -125,96 +125,97 @@ class KOex2phonePrefs : public QDialog
125public: 125public:
126 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel; 126 QLineEdit* mPhoneConnection, *mPhoneDevice, *mPhoneModel;
127 QCheckBox* mWriteBackFuture; 127 QCheckBox* mWriteBackFuture;
128 QSpinBox* mWriteBackFutureWeeks; 128 QSpinBox* mWriteBackFutureWeeks;
129}; 129};
130 130
131QPixmap* sgListViewCompletedPix[6]; 131QPixmap* sgListViewCompletedPix[6];
132QPixmap* sgListViewJournalPix; 132QPixmap* sgListViewJournalPix;
133 133
134 134
135int globalFlagBlockStartup; 135int globalFlagBlockStartup;
136MainWindow::MainWindow( QWidget *parent, const char *name ) : 136MainWindow::MainWindow( QWidget *parent, const char *name ) :
137 QMainWindow( parent, name ) 137 QMainWindow( parent, name )
138{ 138{
139 sgListViewCompletedPix[5] = &listviewPix; 139 sgListViewCompletedPix[5] = &listviewPix;
140 sgListViewCompletedPix[0] = &listviewPix0; 140 sgListViewCompletedPix[0] = &listviewPix0;
141 sgListViewCompletedPix[1] = &listviewPix20; 141 sgListViewCompletedPix[1] = &listviewPix20;
142 sgListViewCompletedPix[2] = &listviewPix40; 142 sgListViewCompletedPix[2] = &listviewPix40;
143 sgListViewCompletedPix[3] = &listviewPix60; 143 sgListViewCompletedPix[3] = &listviewPix60;
144 sgListViewCompletedPix[4] = &listviewPix80; 144 sgListViewCompletedPix[4] = &listviewPix80;
145 //int size = 12; 145 //int size = 12;
146 { 146 {
147 sgListViewCompletedPix[5]->resize( 11, 11 ); 147 sgListViewCompletedPix[5]->resize( 11, 11 );
148 sgListViewCompletedPix[5]->fill( Qt::white ); 148 sgListViewCompletedPix[5]->fill( Qt::white );
149 QPainter p ( sgListViewCompletedPix[5] ); 149 QPainter p ( sgListViewCompletedPix[5] );
150 p.drawRect( 0,0,11,11); 150 p.drawRect( 0,0,11,11);
151 p.drawLine ( 2, 5, 4 , 7 ) ; 151 p.drawLine ( 2, 5, 4 , 7 ) ;
152 p.drawLine ( 4 , 7 , 8, 3) ; 152 p.drawLine ( 4 , 7 , 8, 3) ;
153 int iii = 0; 153 int iii = 0;
154 for ( iii = 0; iii < 5; ++iii ) { 154 for ( iii = 0; iii < 5; ++iii ) {
155 sgListViewCompletedPix[iii]->resize( 11, 11 ); 155 sgListViewCompletedPix[iii]->resize( 11, 11 );
156 sgListViewCompletedPix[iii]->fill( Qt::white ); 156 sgListViewCompletedPix[iii]->fill( Qt::white );
157 QPainter p ( sgListViewCompletedPix[iii] ); 157 QPainter p ( sgListViewCompletedPix[iii] );
158 p.drawRect( 0,0,11,11); 158 p.drawRect( 0,0,11,11);
159 if ( iii ) 159 if ( iii )
160 p.fillRect( 1,1,iii*2,9,Qt::gray ); 160 p.fillRect( 1,1,iii*2,9,Qt::gray );
161 } 161 }
162 sgListViewJournalPix = &journalPix; 162 sgListViewJournalPix = &journalPix;
163 sgListViewJournalPix->resize( 11, 11 ); 163 sgListViewJournalPix->resize( 11, 11 );
164 sgListViewJournalPix->fill( Qt::white ); 164 sgListViewJournalPix->fill( Qt::white );
165 { 165 {
166 QPainter p ( sgListViewJournalPix ); 166 QPainter p ( sgListViewJournalPix );
167 p.drawRect( 0,0,11,11); 167 p.drawRect( 0,0,11,11);
168 p.drawLine( 2,3,5,3); 168 p.drawLine( 2,3,5,3);
169 p.drawLine( 2,5,8,5); 169 p.drawLine( 2,5,8,5);
170 p.drawLine( 2,7,6,7); 170 p.drawLine( 2,7,6,7);
171 } 171 }
172 } 172 }
173 mAutoSaveDisabled = false;
173 mClosed = false; 174 mClosed = false;
174 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc"; 175 //QString confFile = KStandardDirs::appDir() + "config/korganizerrc";
175 QString confFile = locateLocal("config","korganizerrc"); 176 QString confFile = locateLocal("config","korganizerrc");
176 QFileInfo finf ( confFile ); 177 QFileInfo finf ( confFile );
177 bool showWarning = !finf.exists(); 178 bool showWarning = !finf.exists();
178 setIcon(SmallIcon( "ko24" ) ); 179 setIcon(SmallIcon( "ko24" ) );
179 mBlockAtStartup = true; 180 mBlockAtStartup = true;
180 mFlagKeyPressed = false; 181 mFlagKeyPressed = false;
181 setCaption("KO/Pi"); 182 setCaption("KO/Pi");
182 KOPrefs *p = KOPrefs::instance(); 183 KOPrefs *p = KOPrefs::instance();
183 //KPimGlobalPrefs::instance()->setGlobalConfig(); 184 //KPimGlobalPrefs::instance()->setGlobalConfig();
184 p->mCurrentDisplayedView = 0; 185 p->mCurrentDisplayedView = 0;
185 if ( p->mHourSize > 22 ) 186 if ( p->mHourSize > 22 )
186 p->mHourSize = 22; 187 p->mHourSize = 22;
187 QMainWindow::ToolBarDock tbd; 188 QMainWindow::ToolBarDock tbd;
188 if ( p->mToolBarHor ) { 189 if ( p->mToolBarHor ) {
189 if ( p->mToolBarUp ) 190 if ( p->mToolBarUp )
190 tbd = Bottom; 191 tbd = Bottom;
191 else 192 else
192 tbd = Top; 193 tbd = Top;
193 } 194 }
194 else { 195 else {
195 if ( p->mToolBarUp ) 196 if ( p->mToolBarUp )
196 tbd = Right; 197 tbd = Right;
197 else 198 else
198 tbd = Left; 199 tbd = Left;
199 } 200 }
200 if ( KOPrefs::instance()->mUseAppColors ) 201 if ( KOPrefs::instance()->mUseAppColors )
201 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true ); 202 QApplication::setPalette( QPalette (KOPrefs::instance()->mAppColor1, KOPrefs::instance()->mAppColor2), true );
202 globalFlagBlockStartup = 1; 203 globalFlagBlockStartup = 1;
203 iconToolBar = new QPEToolBar( this ); 204 iconToolBar = new QPEToolBar( this );
204 addToolBar (iconToolBar , tbd ); 205 addToolBar (iconToolBar , tbd );
205 206
206#ifdef DESKTOP_VERSION 207#ifdef DESKTOP_VERSION
207 if ( KOPrefs::instance()->mShowIconFilter ) 208 if ( KOPrefs::instance()->mShowIconFilter )
208#else 209#else
209 if ( KOPrefs::instance()->mShowIconFilter || ( !p->mShowIconOnetoolbar &&!p->mShowIconFilterview ) ) 210 if ( KOPrefs::instance()->mShowIconFilter || ( !p->mShowIconOnetoolbar &&!p->mShowIconFilterview ) )
210#endif 211#endif
211 212
212{ 213{
213 if ( p->mToolBarHorF ) { 214 if ( p->mToolBarHorF ) {
214 if ( p->mToolBarUpF ) 215 if ( p->mToolBarUpF )
215 tbd = Bottom; 216 tbd = Bottom;
216 else 217 else
217 tbd = Top; 218 tbd = Top;
218 } 219 }
219 else { 220 else {
220 if ( p->mToolBarUpF ) 221 if ( p->mToolBarUpF )
@@ -492,123 +493,141 @@ bool MainWindow::beamReceiveEnabled()
492} 493}
493 494
494void MainWindow::toggleBeamReceive() 495void MainWindow::toggleBeamReceive()
495{ 496{
496 if ( mBRdisabled ) 497 if ( mBRdisabled )
497 return; 498 return;
498#ifndef DESKTOP_VERSION 499#ifndef DESKTOP_VERSION
499 if ( infrared ) { 500 if ( infrared ) {
500 qDebug("KO: Disable BeamReceive "); 501 qDebug("KO: Disable BeamReceive ");
501 delete infrared; 502 delete infrared;
502 infrared = 0; 503 infrared = 0;
503 brAction->setOn(false); 504 brAction->setOn(false);
504 return; 505 return;
505 } 506 }
506 qDebug("KO: Enable BeamReceive "); 507 qDebug("KO: Enable BeamReceive ");
507 brAction->setOn(true); 508 brAction->setOn(true);
508 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ; 509 infrared = new QCopChannel("QPE/Application/datebook",this, "channel" ) ;
509 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& ))); 510 QObject::connect( infrared, SIGNAL (received ( const QCString &, const QByteArray & )),this, SLOT(recieve( const QCString&, const QByteArray& )));
510#endif 511#endif
511} 512}
512void MainWindow::showMaximized () 513void MainWindow::showMaximized ()
513{ 514{
514#ifndef DESKTOP_VERSION 515#ifndef DESKTOP_VERSION
515 if ( ! globalFlagBlockStartup ) 516 if ( ! globalFlagBlockStartup )
516 if ( mClosed ) 517 if ( mClosed )
517 mView->goToday(); 518 mView->goToday();
518#endif 519#endif
519 QWidget::showMaximized () ; 520 QWidget::showMaximized () ;
520 mClosed = false; 521 mClosed = false;
521} 522}
522 523
523bool MainWindow::askForQuitOnSaveError() 524bool MainWindow::askForQuitOnSaveError()
524{ 525{
525 bool retval = false; 526 bool retval = false;
526 switch( QMessageBox::information( this, "KO/Pi", 527 switch( QMessageBox::information( this, "KO/Pi",
527 i18n("Error saving data") + "!\n" + 528 i18n("Error saving data") + "!\n" +
528 i18n("You can save all data\nto another file via\nFile->Export->Export All Data") + "!\n" + 529 i18n("You can save all data\nto another file via\nFile->Export->Export All Data") + "!\n" +
529 i18n("Do you really want\nto close KO/Pi?"), 530 i18n("Do you really want\nto close KO/Pi?"),
530 i18n(" Yes, close "), i18n("No"), 531 i18n(" Yes, close "), i18n("No"),
531 0, 1 ) ) { 532 0, 1 ) ) {
532 case 0: 533 case 0:
533 retval = true; 534 retval = true;
534 break; 535 break;
535 default: 536 default:
536 break; 537 break;
537 } 538 }
538 return retval; 539 return retval;
539} 540}
540 541bool MainWindow::checkAutosave()
542{
543 bool savedata = true;
544 if ( mAutoSaveDisabled && mCalendarModifiedFlag ) {
545 switch( QMessageBox::information( this, "KO/Pi",
546 i18n("Calendar is modified\nbut Autosave is disabled!\nDo you want\nto save the data?"),
547 i18n("Yes, Save!"), i18n("No"),
548 0, 0 ) ) {
549 case 1:
550 case 2:
551 savedata = false;
552 break;
553 default:
554 break;
555 }
556 }
557 return savedata;
558}
541void MainWindow::closeEvent( QCloseEvent* ce ) 559void MainWindow::closeEvent( QCloseEvent* ce )
542{ 560{
543
544
545
546 if ( ! KOPrefs::instance()->mAskForQuit ) { 561 if ( ! KOPrefs::instance()->mAskForQuit ) {
547 saveOnClose(); 562 if ( checkAutosave() ) {
548 if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) { 563 saveOnClose();
549 ce->ignore(); 564 if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) {
550 return; 565 ce->ignore();
566 return;
567 }
551 } 568 }
552 mClosed = true; 569 mClosed = true;
553 ce->accept(); 570 ce->accept();
554 return; 571 return;
555 572
556 } 573 }
557 574
558 switch( QMessageBox::information( this, "KO/Pi", 575 switch( QMessageBox::information( this, "KO/Pi",
559 i18n("Do you really want\nto close KO/Pi?"), 576 i18n("Do you really want\nto close KO/Pi?"),
560 i18n("Close"), i18n("No"), 577 i18n("Close"), i18n("No"),
561 0, 0 ) ) { 578 0, 0 ) ) {
562 case 0: 579 case 0:
563 saveOnClose(); 580 if ( checkAutosave() ) {
564 if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) { 581 saveOnClose();
565 ce->ignore(); 582 if ( mCalendarModifiedFlag && !askForQuitOnSaveError() ) {
566 return; 583 ce->ignore();
584 return;
585 }
567 } 586 }
568 mClosed = true; 587 mClosed = true;
569 ce->accept(); 588 ce->accept();
570 break; 589 break;
571 case 1: 590 case 1:
572 ce->ignore(); 591 ce->ignore();
573 break; 592 break;
574 case 2: 593 case 2:
575 594
576 default: 595 default:
577 break; 596 break;
578 } 597 }
579 598
580 599
581} 600}
582void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data ) 601void MainWindow::receiveStart( const QCString& cmsg, const QByteArray& data )
583{ 602{
584 qDebug("KO: QCOP start message received: %s ", cmsg.data() ); 603 qDebug("KO: QCOP start message received: %s ", cmsg.data() );
585 mCStringMess = cmsg; 604 mCStringMess = cmsg;
586 mByteData = data; 605 mByteData = data;
587} 606}
588void MainWindow::recieve( const QCString& cmsg, const QByteArray& data ) 607void MainWindow::recieve( const QCString& cmsg, const QByteArray& data )
589{ 608{
590 QDataStream stream( data, IO_ReadOnly ); 609 QDataStream stream( data, IO_ReadOnly );
591 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" ); 610 // QMessageBox::about( this, "About KOrganizer/Pi", "*" +msg +"*" );
592 //QString datamess; 611 //QString datamess;
593 //qDebug("message "); 612 //qDebug("message ");
594 qDebug("KO: QCOP message received: %s ", cmsg.data() ); 613 qDebug("KO: QCOP message received: %s ", cmsg.data() );
595 614
596 if ( cmsg == "setDocument(QString)" ) { 615 if ( cmsg == "setDocument(QString)" ) {
597 QDataStream stream( data, IO_ReadOnly ); 616 QDataStream stream( data, IO_ReadOnly );
598 QString fileName; 617 QString fileName;
599 stream >> fileName; 618 stream >> fileName;
600 //qDebug("filename %s ", fileName.latin1()); 619 //qDebug("filename %s ", fileName.latin1());
601 showMaximized(); 620 showMaximized();
602 raise(); 621 raise();
603 KOPrefs::instance()->mLastSyncedLocalFile = fileName ; 622 KOPrefs::instance()->mLastSyncedLocalFile = fileName ;
604 mSyncManager->slotSyncMenu( 1002 ); 623 mSyncManager->slotSyncMenu( 1002 );
605 return; 624 return;
606 } 625 }
607 626
608 if ( cmsg == "-writeFile" ) { 627 if ( cmsg == "-writeFile" ) {
609 // I made from the "-writeFile" an "-writeAlarm" 628 // I made from the "-writeFile" an "-writeAlarm"
610 mView->viewManager()->showWhatsNextView(); 629 mView->viewManager()->showWhatsNextView();
611 mCalendar->checkAlarmForIncidence( 0, true); 630 mCalendar->checkAlarmForIncidence( 0, true);
612 showMaximized(); 631 showMaximized();
613 raise(); 632 raise();
614 return; 633 return;
@@ -1612,96 +1631,97 @@ void MainWindow::kdesynchowto()
1612{ 1631{
1613 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" ); 1632 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/Zaurus-KDE_syncHowTo.txt" );
1614} 1633}
1615void MainWindow::multisynchowto() 1634void MainWindow::multisynchowto()
1616{ 1635{
1617 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" ); 1636 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/MultiSyncHowTo.txt" );
1618} 1637}
1619void MainWindow::synchowto() 1638void MainWindow::synchowto()
1620{ 1639{
1621 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" ); 1640 KApplication::showFile( "KDE-Pim/Pi Synchronization HowTo", "kdepim/SyncHowto.txt" );
1622} 1641}
1623void MainWindow::faq() 1642void MainWindow::faq()
1624{ 1643{
1625 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" ); 1644 KApplication::showFile( i18n("KO/Pi FAQ"), "kdepim/korganizer/kopiFAQ.txt" );
1626 1645
1627} 1646}
1628void MainWindow::whatsNew() 1647void MainWindow::whatsNew()
1629{ 1648{
1630 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" ); 1649 KApplication::showFile( "KDE-Pim/Pi Version Info", "kdepim/WhatsNew.txt" );
1631 1650
1632} 1651}
1633void MainWindow::licence() 1652void MainWindow::licence()
1634{ 1653{
1635 KApplication::showLicence(); 1654 KApplication::showLicence();
1636 1655
1637} 1656}
1638void MainWindow::about() 1657void MainWindow::about()
1639{ 1658{
1640 QString version; 1659 QString version;
1641#include <../version> 1660#include <../version>
1642 QMessageBox::about( this, i18n("About KOrganizer/Pi"), 1661 QMessageBox::about( this, i18n("About KOrganizer/Pi"),
1643 i18n("KOrganizer/Platform-independent\n") + 1662 i18n("KOrganizer/Platform-independent\n") +
1644 "(KO/Pi) " + version + " - " + 1663 "(KO/Pi) " + version + " - " +
1645 1664
1646#ifdef DESKTOP_VERSION 1665#ifdef DESKTOP_VERSION
1647 i18n("Desktop Edition\n") + 1666 i18n("Desktop Edition\n") +
1648#else 1667#else
1649 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") + 1668 i18n("PDA-Edition\nfor: Zaurus 5x00/7x0/860/3000/6000\n") +
1650#endif 1669#endif
1651 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") ); 1670 i18n("(c)2004 Lutz Rogowski (rogowski@kde.org)\nKO/Pi is based on KOrganizer\n(c)2002,2003 Cornelius Schumacher\n(schumacher@kde.org) and the KDE team.\nKOrganizer/Pi is licensed under the GPL.\nKO/Pi can be compiled for\nLinux, Zaurus-PDA and Windows\nwww.pi-sync.info --- www.korganizer.org\nSpecial thanks to Michael and Ben\nfor intensive testing!") );
1652} 1671}
1653void MainWindow::keyBindings() 1672void MainWindow::keyBindings()
1654{ 1673{
1655 QString cap = i18n("KO/Pi Keys + Colors"); 1674 QString cap = i18n("KO/Pi Keys + Colors");
1656 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") + 1675 QString text = i18n("<p><h2>KO/Pi key shortcuts:</h2></p>\n") +
1657 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+ 1676 i18n("<p><b>H</b>: This help dialog | <b>S</b>: Search dialog</p>\n")+
1658 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") + 1677 i18n("<p><b>N</b>: Switch to next view which has a toolbar icon</p>\n") +
1659 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") + 1678 i18n("<p><b>A+(shift or ctrl)</b>: Show occurence of next alarm</p>\n") +
1679 i18n("<p><b>C+ctrl</b>: Dis/enable automatic saving</p>\n") +
1660 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") + 1680 i18n("<p><b>I</b>: Show info for selected event/todo</p>\n") +
1661 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+ 1681 i18n("<p><b>Space</b>: Toggle fullscreen | <b>P</b>: Date picker</p>\n")+
1662 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+ 1682 i18n("<p><b>R</b>: Toggle Resource View |<b>F</b>: Edit filter </p>\n")+
1663 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+ 1683 i18n("<p><b>O</b>: Filter On/Off | <b>J</b>: Journal view</p>\n")+
1664 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+ 1684 i18n("<p><b>1-0</b> (+<b>ctrl</b>): Select filter 1-10 (11-20)</p>\n")+
1665 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+ 1685 i18n("<p><b>X</b>: Next X days view| <b>W</b>: What's next view\n ")+
1666 i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+ 1686 i18n("<p><b>Q</b>: Show next date with conflicting events\n ")+
1667 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+ 1687 i18n("<p><b>V</b>: Todo view | <b>L</b>: Event list view</p>\n")+
1668 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+ 1688 i18n("<p><b>Z,Y</b>: Work week view | <b>U</b>: Week view</p>\n")+
1669 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+ 1689 i18n("<p><b>D</b>: One day view | <b>M</b>: Month view</p>\n")+
1670 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+ 1690 i18n("<p><b>K</b>: Week view in Month view syle</p>\n")+
1671 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+ 1691 i18n("<p><b>E</b>: Edit selected item |<b> E+ctrl</b>: New Event</p>\n")+
1672 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+ 1692 i18n("<p><b>T</b>: Goto today | <b>T+ctrl</b>: New Todo</p>\n")+
1673 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+ 1693 i18n("<p><b>S+ctrl</b>: Add sub-todo | <b>X+ctrl</b>: Toggle datenavigator</p>\n")+
1674 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+ 1694 i18n("<p><b>+,-</b> : Zoom in/out agenda | <b>A</b>: Toggle allday agenda height</p>\n")+
1675 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+ 1695 i18n("<p><b>C</b>: Show current time in agenda view</p>\n")+
1676 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+ 1696 i18n("<p><b>B</b>: Edit description (details) of selected item</p>\n")+
1677 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+ 1697 i18n("<p><b>right</b>: Next week | <b>right+ctrl</b>: Next month</p>\n")+
1678 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+ 1698 i18n("<p><b>left</b>: Prev. week | <b>left+ctrl</b>: Prev. month</p>\n")+
1679 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+ 1699 i18n("<p><b>del,backspace</b>: Delete selected item</p>\n")+
1680 i18n("<p><h3>In agenda view:</h3></p>\n") + 1700 i18n("<p><h3>In agenda view:</h3></p>\n") +
1681 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+ 1701 i18n("<p><b>up/down</b>: Scroll agenda view</p>\n")+
1682 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+ 1702 i18n("<p><b>ctrl+up/down</b>: Scroll small todo view</p>\n")+
1683 i18n("<p><h3>In todo view:</h3></p>\n") + 1703 i18n("<p><h3>In todo view:</h3></p>\n") +
1684 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+ 1704 i18n("<p><b>shift+U</b>: <b>U</b>nparent todo (make root todo)</p>\n")+
1685 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+ 1705 i18n("<p><b>shift+S</b>: Make <b>S</b>ubtodo (reparent todo)</p>\n")+
1686 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+ 1706 i18n("<p><b>shift+P</b>: Make new <b>P</b>arent for todo selected with shift+S</p>\n")+
1687 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+ 1707 i18n("<p><b>Q</b>: Toggle quick todo line edit.</p>\n")+
1688 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1708 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1689 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+ 1709 i18n("<p><b>return</b>: Mark item as completed+one step down.</p>\n")+
1690 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+ 1710 i18n("<p><b>return+shift</b>: Mark item as not completed+one step down</p>\n")+
1691 i18n("<p><h3>In list view:</h3></p>\n") + 1711 i18n("<p><h3>In list view:</h3></p>\n") +
1692 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+ 1712 i18n("<p><b>I</b>: Show info of current item+one step down.</p>\n")+
1693 i18n("<p><b>return</b>: Select item+one step down</p>\n")+ 1713 i18n("<p><b>return</b>: Select item+one step down</p>\n")+
1694 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+ 1714 i18n("<p><b>return+shift</b>: Deselect item+one step down</p>\n")+
1695 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+ 1715 i18n("<p><b>up/down</b>: Next/prev item</p>\n")+
1696 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+ 1716 i18n("<p><b>ctrl+up/down</b>: Goto up/down by 20% of items</p>\n")+
1697 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+ 1717 i18n("<p><b>shift+up/down</b>: Goto first/last item</p>\n")+
1698 i18n("<p><h3>In event/todo viewer:</h3></p>\n") + 1718 i18n("<p><h3>In event/todo viewer:</h3></p>\n") +
1699 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+ 1719 i18n("<p><b>I,C</b>: Close dialog.</p>\n")+
1700 i18n("<p><b>A</b>: Show agenda view.</p>\n")+ 1720 i18n("<p><b>A</b>: Show agenda view.</p>\n")+
1701 i18n("<p><b>E</b>: Edit item</p>\n") + 1721 i18n("<p><b>E</b>: Edit item</p>\n") +
1702 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") + 1722 i18n("<p><h2>KO/Pi icon colors:</h2></p>\n") +
1703 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") + 1723 i18n("<p><b>(for square icons in agenda and month view)</b></p>\n") +
1704 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+ 1724 i18n("<p><b>Cross</b>: Item cancelled.([c] in Whats'Next view)</p>\n")+
1705 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+ 1725 i18n("<p><b>Red</b>: Alarm set.([a] in Whats'Next view)</p>\n")+
1706 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+ 1726 i18n("<p><b>Blue</b>: Recurrent event.([r] in Whats'Next view)</p>\n")+
1707 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+ 1727 i18n("<p><b>Dark green</b>: Information(description) available.([i] in WN view)</p>\n")+
@@ -1927,115 +1947,127 @@ void MainWindow::saveOnClose()
1927 myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) ); 1947 myP = mapFromGlobal( viewToolBar->mapToGlobal( QPoint( 0,0) ) );
1928 if ( p->mToolBarHorV ) 1948 if ( p->mToolBarHorV )
1929 p->mToolBarUpV = myP.y() > height()/2; 1949 p->mToolBarUpV = myP.y() > height()/2;
1930 else 1950 else
1931 p->mToolBarUpV = myP.x() > width()/2 ; 1951 p->mToolBarUpV = myP.x() > width()/2 ;
1932 myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) ); 1952 myP = mapFromGlobal( navigatorToolBar->mapToGlobal( QPoint( 0,0) ) );
1933 if ( p->mToolBarHorN ) 1953 if ( p->mToolBarHorN )
1934 p->mToolBarUpN = myP.y() > height()/2; 1954 p->mToolBarUpN = myP.y() > height()/2;
1935 else 1955 else
1936 p->mToolBarUpN = myP.x() > width()/2 ; 1956 p->mToolBarUpN = myP.x() > width()/2 ;
1937 if ( filterToolBar ) { 1957 if ( filterToolBar ) {
1938 myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) ); 1958 myP = mapFromGlobal( filterToolBar->mapToGlobal( QPoint( 0,0) ) );
1939 if ( p->mToolBarHorF ) 1959 if ( p->mToolBarHorF )
1940 p->mToolBarUpF = myP.y() > height()/2; 1960 p->mToolBarUpF = myP.y() > height()/2;
1941 else 1961 else
1942 p->mToolBarUpF = myP.x() > width()/2 ; 1962 p->mToolBarUpF = myP.x() > width()/2 ;
1943 } 1963 }
1944#else 1964#else
1945 if ( p->mToolBarHor ) 1965 if ( p->mToolBarHor )
1946 p->mToolBarUp = iconToolBar->y() > height()/2; 1966 p->mToolBarUp = iconToolBar->y() > height()/2;
1947 else 1967 else
1948 p->mToolBarUp = iconToolBar->x() > width()/2; 1968 p->mToolBarUp = iconToolBar->x() > width()/2;
1949 if ( p->mToolBarHorV ) 1969 if ( p->mToolBarHorV )
1950 p->mToolBarUpV = viewToolBar->y() > height()/2; 1970 p->mToolBarUpV = viewToolBar->y() > height()/2;
1951 else 1971 else
1952 p->mToolBarUpV = viewToolBar->x() > width()/2 ; 1972 p->mToolBarUpV = viewToolBar->x() > width()/2 ;
1953 1973
1954 if ( p->mToolBarHorN ) 1974 if ( p->mToolBarHorN )
1955 p->mToolBarUpN = navigatorToolBar->y() > height()/2; 1975 p->mToolBarUpN = navigatorToolBar->y() > height()/2;
1956 else 1976 else
1957 p->mToolBarUpN = navigatorToolBar->x() > width()/2 ; 1977 p->mToolBarUpN = navigatorToolBar->x() > width()/2 ;
1958 if ( filterToolBar ) { 1978 if ( filterToolBar ) {
1959 if ( p->mToolBarHorF ) 1979 if ( p->mToolBarHorF )
1960 p->mToolBarUpF = filterToolBar->y() > height()/2; 1980 p->mToolBarUpF = filterToolBar->y() > height()/2;
1961 else 1981 else
1962 p->mToolBarUpF = filterToolBar->x() > width()/2 ; 1982 p->mToolBarUpF = filterToolBar->x() > width()/2 ;
1963 } 1983 }
1964#endif 1984#endif
1965 save(); 1985 save();
1966 mView->writeSettings(); 1986 mView->writeSettings();
1967 mView->checkSuspendAlarm(); 1987 mView->checkSuspendAlarm();
1968} 1988}
1969void MainWindow::slotModifiedChanged( bool ) 1989void MainWindow::slotModifiedChanged( bool )
1970{ 1990{
1971 if ( mBlockAtStartup ) 1991 if ( mBlockAtStartup )
1972 return; 1992 return;
1973 1993
1974 int msec; 1994 int msec;
1995 if ( mAutoSaveDisabled ) {
1996 QTimer::singleShot( 0, this , SLOT ( autoSaveWarning() ) );
1997 qDebug("KO: Autosave disabled (data change deteced)!");
1998 }
1975 if ( mCalendarModifiedFlag ) { 1999 if ( mCalendarModifiedFlag ) {
1976 //qDebug(" MainWindow timer is running "); 2000 //qDebug(" MainWindow timer is running ");
1977 return; 2001 return;
1978 } 2002 }
2003 mCalendarModifiedFlag = true;
2004 if ( mAutoSaveDisabled ) {
2005 return;
2006 }
1979 // we store the changes after 1 minute, 2007 // we store the changes after 1 minute,
1980 // and for safety reasons after 10 minutes again 2008 // and for safety reasons after 10 minutes again
1981 if ( !mSyncManager->blockSave() ) 2009 if ( !mSyncManager->blockSave() )
1982 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000; 2010 msec = (1000 * 60*KOPrefs::instance()->mAutoSaveInterval) +1000;
1983 else 2011 else
1984 msec = 1000 * 600; 2012 msec = 1000 * 600;
1985 mSaveTimer.start( msec, true ); // 1 minute 2013 mSaveTimer.start( msec, true ); // 1 minute
1986 mSaveTimerStart = QDateTime::currentDateTime(); 2014 mSaveTimerStart = QDateTime::currentDateTime();
1987 mSaveDelay = msec/1000; 2015 mSaveDelay = msec/1000;
1988 qDebug("KO: Saving File in %d secs!", msec/1000); 2016 qDebug("KO: Saving File in %d secs!", msec/1000);
1989 mCalendarModifiedFlag = true; 2017}
2018void MainWindow::autoSaveWarning()
2019{
2020 setCaption(i18n("Autosave disabled!" ));
1990} 2021}
1991void MainWindow::saveStopTimer() 2022void MainWindow::saveStopTimer()
1992{ 2023{
1993 mSaveTimer.stop(); 2024 mSaveTimer.stop();
2025 mSaveDelay = 0;
1994} 2026}
1995void MainWindow::backupAllFiles() 2027void MainWindow::backupAllFiles()
1996{ 2028{
1997 QDate reference ( 2000,1,1); 2029 QDate reference ( 2000,1,1);
1998 int daysTo = reference.daysTo ( QDate::currentDate() ); 2030 int daysTo = reference.daysTo ( QDate::currentDate() );
1999 setCaption(i18n("Creating backup ... please wait ..." )); 2031 setCaption(i18n("Creating backup ... please wait ..." ));
2000 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate); 2032 qDebug("KO: Last backup was %d days ago ", daysTo - KOPrefs::instance()->mLastBackupDate);
2001 // we need the file path, the backup dir and the number of bups as param 2033 // we need the file path, the backup dir and the number of bups as param
2002 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir; 2034 QString bupDir = KPimGlobalPrefs::instance()->mBackupDatadir;
2003 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir) 2035 if ( KPimGlobalPrefs::instance()->mBackupUseDefaultDir)
2004 bupDir = KGlobalSettings::backupDataDir(); 2036 bupDir = KGlobalSettings::backupDataDir();
2005 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 2037 int retval = KApplication::createBackup( defaultFileName(), bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
2006 if ( retval == 0 ) { 2038 if ( retval == 0 ) {
2007 setCaption(i18n("Backup cancelled" )); 2039 setCaption(i18n("Backup cancelled" ));
2008 qDebug("KO: Backup cancelled. Will try again tomorrow "); 2040 qDebug("KO: Backup cancelled. Will try again tomorrow ");
2009 // retval == 0 : backup skipped for today, try again tomorrow 2041 // retval == 0 : backup skipped for today, try again tomorrow
2010 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1; 2042 KOPrefs::instance()->mLastBackupDate = daysTo- KPimGlobalPrefs::instance()->mBackupDayCount+1;
2011 } else if ( retval == 1 ){ 2043 } else if ( retval == 1 ){
2012 qDebug("KO: Backup created."); 2044 qDebug("KO: Backup created.");
2013 // backup ok 2045 // backup ok
2014 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars; 2046 QPtrList<KopiCalendarFile> calendars = KOPrefs::instance()->mCalendars;
2015 KopiCalendarFile * cal = calendars.first(); 2047 KopiCalendarFile * cal = calendars.first();
2016 cal = calendars.next(); 2048 cal = calendars.next();
2017 while ( cal ) { 2049 while ( cal ) {
2018 if ( !cal->mErrorOnLoad ) { 2050 if ( !cal->mErrorOnLoad ) {
2019 KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers ); 2051 KApplication::createBackup( cal->mFileName, bupDir, KPimGlobalPrefs::instance()->mBackupNumbers );
2020 } 2052 }
2021 cal = calendars.next(); 2053 cal = calendars.next();
2022 } 2054 }
2023 KOPrefs::instance()->mLastBackupDate = daysTo; 2055 KOPrefs::instance()->mLastBackupDate = daysTo;
2024 setCaption(i18n("Backup succesfully finished" )); 2056 setCaption(i18n("Backup succesfully finished" ));
2025 } else if ( retval == 2 ){ 2057 } else if ( retval == 2 ){
2026 setCaption(i18n("Backup globally disabled" )); 2058 setCaption(i18n("Backup globally disabled" ));
2027 qDebug("KO: Backup globally cancelled."); 2059 qDebug("KO: Backup globally cancelled.");
2028 // backup globally cancelled 2060 // backup globally cancelled
2029 KPimGlobalPrefs::instance()->mBackupEnabled = false; 2061 KPimGlobalPrefs::instance()->mBackupEnabled = false;
2030 } 2062 }
2031 // retval == 3: do nothing, try again later 2063 // retval == 3: do nothing, try again later
2032} 2064}
2033void MainWindow::save() 2065void MainWindow::save()
2034{ 2066{
2035 if ( mSaveDelay ) { 2067 if ( mSaveDelay ) {
2036 int elapsed = mSaveTimerStart.secsTo( QDateTime::currentDateTime() ); 2068 int elapsed = mSaveTimerStart.secsTo( QDateTime::currentDateTime() );
2037 if ( mSaveDelay < elapsed ) { 2069 if ( mSaveDelay < elapsed ) {
2038 qDebug("KO: Pending save after wakeup from suspend detected."); 2070 qDebug("KO: Pending save after wakeup from suspend detected.");
2039 qDebug("KO: Save delay %d sec. Elapsed save time %d sec.", mSaveDelay, elapsed ); 2071 qDebug("KO: Save delay %d sec. Elapsed save time %d sec.", mSaveDelay, elapsed );
2040 qDebug("KO: Restarting save timer to save in 10 sec."); 2072 qDebug("KO: Restarting save timer to save in 10 sec.");
2041 int msec = 10000; 2073 int msec = 10000;
@@ -2162,98 +2194,109 @@ void MainWindow::keyPressEvent ( QKeyEvent * e )
2162 case Qt::Key_5: 2194 case Qt::Key_5:
2163 case Qt::Key_6: 2195 case Qt::Key_6:
2164 case Qt::Key_7: 2196 case Qt::Key_7:
2165 case Qt::Key_8: 2197 case Qt::Key_8:
2166 case Qt::Key_9: 2198 case Qt::Key_9:
2167 pro = e->key()-48; 2199 pro = e->key()-48;
2168 if ( pro == 0 ) 2200 if ( pro == 0 )
2169 pro = 10; 2201 pro = 10;
2170 if ( e->state() == Qt::ControlButton) 2202 if ( e->state() == Qt::ControlButton)
2171 pro += 10; 2203 pro += 10;
2172 break; 2204 break;
2173 case Qt::Key_M: 2205 case Qt::Key_M:
2174 mView->viewManager()->showMonthView(); 2206 mView->viewManager()->showMonthView();
2175 showSelectedDates = true; 2207 showSelectedDates = true;
2176 break; 2208 break;
2177 case Qt::Key_Insert: 2209 case Qt::Key_Insert:
2178 mView->newEvent(); 2210 mView->newEvent();
2179 break; 2211 break;
2180 case Qt::Key_S : 2212 case Qt::Key_S :
2181 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton) 2213 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton)
2182 mView->newSubTodo(); 2214 mView->newSubTodo();
2183 else 2215 else
2184 mView->dialogManager()->showSearchDialog(); 2216 mView->dialogManager()->showSearchDialog();
2185 break; 2217 break;
2186 case Qt::Key_Y : 2218 case Qt::Key_Y :
2187 case Qt::Key_Z : 2219 case Qt::Key_Z :
2188 mView->viewManager()->showWorkWeekView(); 2220 mView->viewManager()->showWorkWeekView();
2189 showSelectedDates = true; 2221 showSelectedDates = true;
2190 break; 2222 break;
2191 case Qt::Key_U : 2223 case Qt::Key_U :
2192 mView->viewManager()->showWeekView(); 2224 mView->viewManager()->showWeekView();
2193 showSelectedDates = true; 2225 showSelectedDates = true;
2194 break; 2226 break;
2195 case Qt::Key_H : 2227 case Qt::Key_H :
2196 keyBindings(); 2228 keyBindings();
2197 break; 2229 break;
2198 case Qt::Key_W: 2230 case Qt::Key_W:
2199 mView->viewManager()->showWhatsNextView(); 2231 mView->viewManager()->showWhatsNextView();
2200 break; 2232 break;
2201 case Qt::Key_L: 2233 case Qt::Key_L:
2202 mView->viewManager()->showListView(); 2234 mView->viewManager()->showListView();
2203 break; 2235 break;
2204 case Qt::Key_N: 2236 case Qt::Key_N:
2205 mView->viewManager()->showNextView(); 2237 mView->viewManager()->showNextView();
2206 break; 2238 break;
2207 case Qt::Key_V: 2239 case Qt::Key_V:
2208 mView->viewManager()->showTodoView(); 2240 mView->viewManager()->showTodoView();
2209 break; 2241 break;
2210 case Qt::Key_C: 2242 case Qt::Key_C:
2211 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() ); 2243 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) {
2244 if ( mAutoSaveDisabled ) {
2245 mAutoSaveDisabled = false;
2246 setCaption(i18n("Autosave enabled!" ));
2247 return;
2248 } else {
2249 mAutoSaveDisabled = true;
2250 saveStopTimer();
2251 setCaption(i18n("Autosave disabled! Save timer stopped!" ));
2252 }
2253 } else
2254 mView->viewManager()->agendaView()->setStartHour( QTime::currentTime ().hour() );
2212 break; 2255 break;
2213 case Qt::Key_P: 2256 case Qt::Key_P:
2214 mView->showDatePicker( ); 2257 mView->showDatePicker( );
2215 break; 2258 break;
2216 case Qt::Key_F: 2259 case Qt::Key_F:
2217 mView->editFilters(); 2260 mView->editFilters();
2218 break; 2261 break;
2219 case Qt::Key_R: 2262 case Qt::Key_R:
2220 mView->toggleFilter(); 2263 mView->toggleFilter();
2221 break; 2264 break;
2222 case Qt::Key_X: 2265 case Qt::Key_X:
2223 if ( e->state() == Qt::ControlButton ) 2266 if ( e->state() == Qt::ControlButton )
2224 mView->toggleDateNavigatorWidget(); 2267 mView->toggleDateNavigatorWidget();
2225 else { 2268 else {
2226 mView->viewManager()->showNextXView(); 2269 mView->viewManager()->showNextXView();
2227 showSelectedDates = true; 2270 showSelectedDates = true;
2228 } 2271 }
2229 break; 2272 break;
2230 case Qt::Key_Space: 2273 case Qt::Key_Space:
2231 mView->toggleExpand(); 2274 mView->toggleExpand();
2232 break; 2275 break;
2233 case Qt::Key_A: 2276 case Qt::Key_A:
2234 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton ) 2277 if ( e->state() == Qt::ControlButton || e->state() == Qt::ShiftButton )
2235 mView->showNextAlarms(); 2278 mView->showNextAlarms();
2236 else 2279 else
2237 mView->toggleAllDaySize(); 2280 mView->toggleAllDaySize();
2238 break; 2281 break;
2239 case Qt::Key_T: 2282 case Qt::Key_T:
2240 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton ) 2283 if ( e->state() == Qt::ControlButton|| e->state() == Qt::ShiftButton )
2241 mView->newTodo(); 2284 mView->newTodo();
2242 else { 2285 else {
2243 mView->goToday(); 2286 mView->goToday();
2244 showSelectedDates = true; 2287 showSelectedDates = true;
2245 } 2288 }
2246 break; 2289 break;
2247 case Qt::Key_Q: 2290 case Qt::Key_Q:
2248 if ( e->state() == Qt::ControlButton ) 2291 if ( e->state() == Qt::ControlButton )
2249 mView->conflictNotAll(); 2292 mView->conflictNotAll();
2250 else if ( e->state() == Qt::ShiftButton ) 2293 else if ( e->state() == Qt::ShiftButton )
2251 mView->conflictAllday(); 2294 mView->conflictAllday();
2252 else 2295 else
2253 mView->conflictAll(); 2296 mView->conflictAll();
2254 break; 2297 break;
2255 case Qt::Key_J: 2298 case Qt::Key_J:
2256 mView->viewManager()->showJournalView(); 2299 mView->viewManager()->showJournalView();
2257 break; 2300 break;
2258 case Qt::Key_B: 2301 case Qt::Key_B:
2259 mView->editIncidenceDescription();; 2302 mView->editIncidenceDescription();;
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 71c069b..d8018b6 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -7,166 +7,168 @@
7#include <qfile.h> 7#include <qfile.h>
8#include <qmenubar.h> 8#include <qmenubar.h>
9#include <qtextstream.h> 9#include <qtextstream.h>
10#include <qregexp.h> 10#include <qregexp.h>
11 11
12#include <libkcal/incidence.h> 12#include <libkcal/incidence.h>
13#include <ksyncmanager.h> 13#include <ksyncmanager.h>
14#include <kpopupmenu.h> 14#include <kpopupmenu.h>
15#ifndef DESKTOP_VERSION 15#ifndef DESKTOP_VERSION
16#include <qcopchannel_qws.h> 16#include <qcopchannel_qws.h>
17#endif 17#endif
18class QAction; 18class QAction;
19class CalendarView; 19class CalendarView;
20class KSyncProfile; 20class KSyncProfile;
21#ifdef DESKTOP_VERSION 21#ifdef DESKTOP_VERSION
22 22
23#define QPEToolBar QToolBar 23#define QPEToolBar QToolBar
24#endif 24#endif
25class QPEToolBar; 25class QPEToolBar;
26 26
27 27
28namespace KCal { 28namespace KCal {
29class CalendarLocal; 29class CalendarLocal;
30} 30}
31 31
32using namespace KCal; 32using namespace KCal;
33 33
34class MainWindow : public QMainWindow 34class MainWindow : public QMainWindow
35{ 35{
36 Q_OBJECT 36 Q_OBJECT
37 public: 37 public:
38 MainWindow( QWidget *parent = 0, const char *name = 0 ); 38 MainWindow( QWidget *parent = 0, const char *name = 0 );
39 ~MainWindow(); 39 ~MainWindow();
40 bool beamReceiveEnabled(); 40 bool beamReceiveEnabled();
41 static QString defaultFileName(); 41 static QString defaultFileName();
42 static QString syncFileName(); 42 static QString syncFileName();
43 static QString resourcePath(); 43 static QString resourcePath();
44 public slots: 44 public slots:
45 void setUsesBigPixmaps ( bool ); 45 void setUsesBigPixmaps ( bool );
46 void setCaption ( const QString & ); 46 void setCaption ( const QString & );
47 void updateWeekNum(const KCal::DateList &); 47 void updateWeekNum(const KCal::DateList &);
48 void updateWeek(QDate); 48 void updateWeek(QDate);
49 void updateFilterToolbar(); 49 void updateFilterToolbar();
50 virtual void showMaximized (); 50 virtual void showMaximized ();
51 void configureAgenda( int ); 51 void configureAgenda( int );
52 void recieve( const QCString& msg, const QByteArray& data ); 52 void recieve( const QCString& msg, const QByteArray& data );
53 void receiveStart( const QCString& msg, const QByteArray& data ); 53 void receiveStart( const QCString& msg, const QByteArray& data );
54 protected slots: 54 protected slots:
55 void autoSaveWarning();
55 void loadDataAfterStart(); 56 void loadDataAfterStart();
56 void calHint(); 57 void calHint();
57 void startMultiSync(); 58 void startMultiSync();
58 void setCaptionToDates(); 59 void setCaptionToDates();
59 void weekAction(); 60 void weekAction();
60 void about(); 61 void about();
61 void licence(); 62 void licence();
62 void faq(); 63 void faq();
63 void usertrans(); 64 void usertrans();
64 void features(); 65 void features();
65 void synchowto(); 66 void synchowto();
66 void storagehowto(); 67 void storagehowto();
67 void timetrackinghowto(); 68 void timetrackinghowto();
68 void kdesynchowto(); 69 void kdesynchowto();
69 void multisynchowto(); 70 void multisynchowto();
70 void whatsNew(); 71 void whatsNew();
71 void keyBindings(); 72 void keyBindings();
72 void aboutAutoSaving();; 73 void aboutAutoSaving();;
73 void aboutKnownBugs(); 74 void aboutKnownBugs();
74 75
75 void processIncidenceSelection( Incidence * ); 76 void processIncidenceSelection( Incidence * );
76 77
77 void importQtopia(); 78 void importQtopia();
78 void importBday(); 79 void importBday();
79 void importOL(); 80 void importOL();
80 void importIcal(); 81 void importIcal();
81 void importFile( QString, bool ); 82 void importFile( QString, bool );
82 void quickImportIcal(); 83 void quickImportIcal();
83 84
84 void slotModifiedChanged( bool ); 85 void slotModifiedChanged( bool );
85 86
86 void save(); 87 void save();
87 void backupAllFiles(); 88 void backupAllFiles();
88 void saveStopTimer(); 89 void saveStopTimer();
89 void configureToolBar( int ); 90 void configureToolBar( int );
90 void printSel(); 91 void printSel();
91 void printCal(); 92 void printCal();
92 void printListView(); 93 void printListView();
93 void saveCalendar(); 94 void saveCalendar();
94 void loadCalendar(); 95 void loadCalendar();
95 void exportVCalendar(); 96 void exportVCalendar();
96 void exportICalendar(); 97 void exportICalendar();
97 void exportCalendar( bool ); 98 void exportCalendar( bool );
98 void fillFilterMenu(); 99 void fillFilterMenu();
99 void fillFilterMenuTB(); 100 void fillFilterMenuTB();
100 void selectFilter( int ); 101 void selectFilter( int );
101 void fillFilterMenuPopup(); 102 void fillFilterMenuPopup();
102 void selectFilterPopup( int ); 103 void selectFilterPopup( int );
103 void exportToPhone( int ); 104 void exportToPhone( int );
104 void toggleBeamReceive(); 105 void toggleBeamReceive();
105 void disableBR(bool); 106 void disableBR(bool);
106 signals: 107 signals:
107 void selectWeek ( int ); 108 void selectWeek ( int );
108 private slots: 109 private slots:
109 void slotResetFocus(); 110 void slotResetFocus();
110 void slotResetFocusLoop(); 111 void slotResetFocusLoop();
111 void showConfigureAgenda(); 112 void showConfigureAgenda();
112 void getFile( bool ); 113 void getFile( bool );
113 void syncFileRequest(); 114 void syncFileRequest();
114 115
115 protected: 116 protected:
116 int mFocusLoop; 117 int mFocusLoop;
117 void hideEvent ( QHideEvent * ); 118 void hideEvent ( QHideEvent * );
118 QString sentSyncFile(); 119 QString sentSyncFile();
119 void displayText( QString, QString); 120 void displayText( QString, QString);
120 void enableIncidenceActions( bool ); 121 void enableIncidenceActions( bool );
121 bool askForQuitOnSaveError(); 122 bool askForQuitOnSaveError();
122 123
123 private: 124 private:
124 125 bool mAutoSaveDisabled;
126 bool checkAutosave();
125 QCString mCStringMess; 127 QCString mCStringMess;
126 QByteArray mByteData; 128 QByteArray mByteData;
127 129
128 //void setMenuBar( QMenuBar * ); 130 //void setMenuBar( QMenuBar * );
129 bool mBRdisabled; 131 bool mBRdisabled;
130#ifndef DESKTOP_VERSION 132#ifndef DESKTOP_VERSION
131 QCopChannel* infrared; 133 QCopChannel* infrared;
132#endif 134#endif
133 QAction* brAction; 135 QAction* brAction;
134 KSyncManager* mSyncManager; 136 KSyncManager* mSyncManager;
135 bool mClosed; 137 bool mClosed;
136 void saveOnClose(); 138 void saveOnClose();
137 bool mFlagKeyPressed; 139 bool mFlagKeyPressed;
138 bool mBlockAtStartup; 140 bool mBlockAtStartup;
139 KMenuBar *menuBar1; 141 KMenuBar *menuBar1;
140 QPEToolBar *iconToolBar; 142 QPEToolBar *iconToolBar;
141 QPEToolBar *viewToolBar; 143 QPEToolBar *viewToolBar;
142 QPEToolBar *navigatorToolBar; 144 QPEToolBar *navigatorToolBar;
143 QPEToolBar *filterToolBar; 145 QPEToolBar *filterToolBar;
144 KMenuBar *filterMenubar; 146 KMenuBar *filterMenubar;
145 QPopupMenu * filterPopupMenu; 147 QPopupMenu * filterPopupMenu;
146 QPopupMenu * mCurrentItemMenu; 148 QPopupMenu * mCurrentItemMenu;
147 void initActions(); 149 void initActions();
148 void setDefaultPreferences(); 150 void setDefaultPreferences();
149 void resizeEvent( QResizeEvent* e); 151 void resizeEvent( QResizeEvent* e);
150 void keyPressEvent ( QKeyEvent * ) ; 152 void keyPressEvent ( QKeyEvent * ) ;
151 void keyReleaseEvent ( QKeyEvent * ) ; 153 void keyReleaseEvent ( QKeyEvent * ) ;
152 QPopupMenu *configureToolBarMenu; 154 QPopupMenu *configureToolBarMenu;
153 QPopupMenu *selectFilterMenu; 155 QPopupMenu *selectFilterMenu;
154 QPopupMenu *selectFilterMenuTB; 156 QPopupMenu *selectFilterMenuTB;
155 QPopupMenu *configureAgendaMenu, *syncMenu; 157 QPopupMenu *configureAgendaMenu, *syncMenu;
156 CalendarLocal *mCalendar; 158 CalendarLocal *mCalendar;
157 CalendarView *mView; 159 CalendarView *mView;
158 QAction *mNewSubTodoAction; 160 QAction *mNewSubTodoAction;
159 QAction *mWeekAction; 161 QAction *mWeekAction;
160 QFont mWeekFont; 162 QFont mWeekFont;
161 QPixmap mWeekPixmap; 163 QPixmap mWeekPixmap;
162 QColor mWeekBgColor; 164 QColor mWeekBgColor;
163 165
164 QAction *mShowAction; 166 QAction *mShowAction;
165 QAction *mEditAction; 167 QAction *mEditAction;
166 QAction *mDeleteAction; 168 QAction *mDeleteAction;
167 QAction *mCloneAction; 169 QAction *mCloneAction;
168 QAction *mMoveAction; 170 QAction *mMoveAction;
169 QAction *mBeamAction; 171 QAction *mBeamAction;
170 QAction *mCancelAction; 172 QAction *mCancelAction;
171 QAction *mPrintSelAction; 173 QAction *mPrintSelAction;
172 174