summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt6
-rw-r--r--bin/kdepim/korganizer/germantranslation.txt4
-rw-r--r--desktop/rpm/kdepim_rpm2
-rw-r--r--korganizer/kolistview.cpp82
-rw-r--r--korganizer/kolistview.h3
-rw-r--r--version2
6 files changed, 95 insertions, 4 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 6e3b886..719f120 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -1,26 +1,32 @@
1Info about the changes in new versions of KDE-Pim/Pi 1Info about the changes in new versions of KDE-Pim/Pi
2 2
3********** VERSION 2.1.6 ************
4
5KO/Pi:
6Added to the list view (the list view is used in search dialog as well) the possibility to print it.
7Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
8
3********** VERSION 2.1.5 ************ 9********** VERSION 2.1.5 ************
4 10
5This is the new stable version. 11This is the new stable version.
6Bugfix: 12Bugfix:
7Fixed a problem with agenda popup on the desktop in KO/Pi. 13Fixed a problem with agenda popup on the desktop in KO/Pi.
8Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization. 14Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
9Added config option to not display completed todos in agenda view. 15Added config option to not display completed todos in agenda view.
10Addressee view is now using the formatted name, if defined. 16Addressee view is now using the formatted name, if defined.
11That makes it possible to display "lastname, firstname" in that view now. 17That makes it possible to display "lastname, firstname" in that view now.
12To set the formatted name for all contacts, please use menu: 18To set the formatted name for all contacts, please use menu:
13Edit->Change->Set formatted name. 19Edit->Change->Set formatted name.
14Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows. 20Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
15 21
16********** VERSION 2.1.4 ************ 22********** VERSION 2.1.4 ************
17 23
18Fixed two more bugs in the KA/Pi CSV import dialog: 24Fixed two more bugs in the KA/Pi CSV import dialog:
19Made it possible to read multi-line fields and import it to the "Note" field. 25Made it possible to read multi-line fields and import it to the "Note" field.
20Fixed a problem in mapping custom fields, whatever a custem field is... 26Fixed a problem in mapping custom fields, whatever a custem field is...
21 27
22********** VERSION 2.1.3 ************ 28********** VERSION 2.1.3 ************
23 29
24Changed the menu structure of the alarm applet: 30Changed the menu structure of the alarm applet:
25Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List". 31Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
26 32
diff --git a/bin/kdepim/korganizer/germantranslation.txt b/bin/kdepim/korganizer/germantranslation.txt
index 5a27a10..8f28234 100644
--- a/bin/kdepim/korganizer/germantranslation.txt
+++ b/bin/kdepim/korganizer/germantranslation.txt
@@ -1351,31 +1351,31 @@
1351{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" }, 1351{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" },
1352{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" }, 1352{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" },
1353{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" }, 1353{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
1354{ "times","Zeiten" }, 1354{ "times","Zeiten" },
1355{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" }, 1355{ "The todo\n%1\nhas subtodos!\nDo you want to set\nthe categories for\nall subtodos as well?","Das Todo\n%1\nhat Untertodos!\nMöchten Sie die Kategorien\nauch für alle Untertodos setzen?" },
1356{ "Backup enabled","Backup angeschaltet" }, 1356{ "Backup enabled","Backup angeschaltet" },
1357{ "Use standard backup dir","Standard Backupverzeichnis" }, 1357{ "Use standard backup dir","Standard Backupverzeichnis" },
1358{ "Number of Backups:","Anzahl der Backups" }, 1358{ "Number of Backups:","Anzahl der Backups" },
1359{ "Make backup every ","Mache ein Backup alle " }, 1359{ "Make backup every ","Mache ein Backup alle " },
1360{ " days"," Tage" }, 1360{ " days"," Tage" },
1361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." }, 1361{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
1362{ "Backup Failed!","Backup Problem!" }, 1362{ "Backup Failed!","Backup Problem!" },
1363{ "Try again now","Versuche jetzt nochmal" }, 1363{ "Try again now","Versuche jetzt nochmal" },
1364{ "Try again later","Versuche später nochmal" }, 1364{ "Try again later","Versuche später nochmal" },
1365{ "Try again tomorrow","Versuche morgen nochmal" }, 1365{ "Try again tomorrow","Versuche morgen nochmal" },
1366{ "Disable backup","Schalte Backup ab" }, 1366{ "Disable backup","Schalte Backup ab" },
1367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" }, 1367{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
1368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" }, 1368{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
1369{ "Choose action","Wähle Aktion" }, 1369{ "Choose action","Wähle Aktion" },
1370{ "Comment for todo:","Kommentar zum Todo:" }, 1370{ "Comment for todo:","Kommentar zum Todo:" },
1371{ "Stop+note","Stop+Notiz" }, 1371{ "Stop+note","Stop+Notiz" },
1372{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" }, 1372{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
1373{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" }, 1373{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
1374{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" }, 1374{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
1375{ "","" }, 1375{ "Print complete list","Drucke komplette Liste" },
1376{ "","" }, 1376{ "Hide all selected","Verstecke Selektierte" },
1377{ "","" }, 1377{ "","" },
1378{ "","" }, 1378{ "","" },
1379{ "","" }, 1379{ "","" },
1380{ "","" }, 1380{ "","" },
1381{ "","" }, \ No newline at end of file 1381{ "","" }, \ No newline at end of file
diff --git a/desktop/rpm/kdepim_rpm b/desktop/rpm/kdepim_rpm
index cf68670..ee00372 100644
--- a/desktop/rpm/kdepim_rpm
+++ b/desktop/rpm/kdepim_rpm
@@ -1,27 +1,27 @@
1Summary: A collection of PIM programs 1Summary: A collection of PIM programs
2Name: KDE-Pim-Pi 2Name: KDE-Pim-Pi
3Version: 2.1.5 3Version: 2.1.6
4Release: SuSE_9.2 4Release: SuSE_9.2
5Copyright:GPL 5Copyright:GPL
6Group: Productivity/Pim 6Group: Productivity/Pim
7Source:http://sourceforge.net/projects/kdepimpi/ 7Source:http://sourceforge.net/projects/kdepimpi/
8URL:http://sourceforge.net/projects/kdepimpi/ 8URL:http://sourceforge.net/projects/kdepimpi/
9Packager: zautrix 9Packager: zautrix
10 10
11%description 11%description
12This package contains the platform-independent PIM programs from 12This package contains the platform-independent PIM programs from
13www.pi-sync.info, compiled for SuSE 9.2: 13www.pi-sync.info, compiled for SuSE 9.2:
14KTimeTacker/Pi 14KTimeTacker/Pi
15KPhone/Pi 15KPhone/Pi
16KAddressbook/Pi 16KAddressbook/Pi
17KOrganizer/Pi 17KOrganizer/Pi
18PasswordManager/Pi 18PasswordManager/Pi
19KOPieMail/Pi 19KOPieMail/Pi
20 20
21These applications do not need anything from the KDE-desktop 21These applications do not need anything from the KDE-desktop
22at all to run on Linux. However, there is a dependency from 22at all to run on Linux. However, there is a dependency from
23two KDE libs, because a small command line program is included 23two KDE libs, because a small command line program is included
24to make it possible to sync with the KDE-desktop applications. 24to make it possible to sync with the KDE-desktop applications.
25 25
26These applications are independent from the KDE-desktop 26These applications are independent from the KDE-desktop
27environment. That means, nothing of your existing 27environment. That means, nothing of your existing
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index bc52281..7022e02 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -13,77 +13,80 @@
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details. 14 GNU General Public License for more details.
15 15
16 You should have received a copy of the GNU General Public License 16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software 17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 18 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 19
20 As a special exception, permission is given to link this program 20 As a special exception, permission is given to link this program
21 with any edition of Qt, and distribute the resulting executable, 21 with any edition of Qt, and distribute the resulting executable,
22 without including the source code for Qt in the source distribution. 22 without including the source code for Qt in the source distribution.
23*/ 23*/
24 24
25#include <qlistview.h> 25#include <qlistview.h>
26#include <qlayout.h> 26#include <qlayout.h>
27#include <qlabel.h> 27#include <qlabel.h>
28#include <qpopupmenu.h> 28#include <qpopupmenu.h>
29#include <qprogressbar.h> 29#include <qprogressbar.h>
30#include <qfileinfo.h> 30#include <qfileinfo.h>
31#include <qmessagebox.h> 31#include <qmessagebox.h>
32#include <qdialog.h> 32#include <qdialog.h>
33#include <qtextstream.h> 33#include <qtextstream.h>
34#include <qdir.h> 34#include <qdir.h>
35#include <qwhatsthis.h> 35#include <qwhatsthis.h>
36#include <qregexp.h> 36#include <qregexp.h>
37#include <qpainter.h>
38#include <qpaintdevicemetrics.h>
37 39
38#include <klocale.h> 40#include <klocale.h>
39#include <kdebug.h> 41#include <kdebug.h>
40#include <kiconloader.h> 42#include <kiconloader.h>
41#include <kglobal.h> 43#include <kglobal.h>
42 44
43#include <libkdepim/kpimglobalprefs.h> 45#include <libkdepim/kpimglobalprefs.h>
44#include <libkcal/calendar.h> 46#include <libkcal/calendar.h>
45#include <libkcal/calendarlocal.h> 47#include <libkcal/calendarlocal.h>
46#include <libkcal/icalformat.h> 48#include <libkcal/icalformat.h>
47#include <libkcal/vcalformat.h> 49#include <libkcal/vcalformat.h>
48#include <libkcal/recurrence.h> 50#include <libkcal/recurrence.h>
49#include <libkcal/filestorage.h> 51#include <libkcal/filestorage.h>
50#include <libkdepim/categoryselectdialog.h> 52#include <libkdepim/categoryselectdialog.h>
51#include <libkcal/kincidenceformatter.h> 53#include <libkcal/kincidenceformatter.h>
52#ifndef DESKTOP_VERSION 54#ifndef DESKTOP_VERSION
53#include <qpe/qpeapplication.h> 55#include <qpe/qpeapplication.h>
54#else 56#else
55#include <qapplication.h> 57#include <qapplication.h>
56#endif 58#endif
57 59
58#ifndef KORG_NOPRINTER 60#ifndef KORG_NOPRINTER
59#include "calprinter.h" 61#include "calprinter.h"
60#endif 62#endif
61#include "koglobals.h" 63#include "koglobals.h"
62#include "koprefs.h" 64#include "koprefs.h"
63#include "kfiledialog.h" 65#include "kfiledialog.h"
64 66
65#include "kolistview.h" 67#include "kolistview.h"
68#include "koeventviewer.h"
66 69
67 70
68 71
69 72
70class KOListViewWhatsThis :public QWhatsThis 73class KOListViewWhatsThis :public QWhatsThis
71{ 74{
72public: 75public:
73 KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { }; 76 KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
74 77
75protected: 78protected:
76 virtual QString text( const QPoint& p) 79 virtual QString text( const QPoint& p)
77 { 80 {
78 return _view->getWhatsThisText(p) ; 81 return _view->getWhatsThisText(p) ;
79 } 82 }
80private: 83private:
81 QWidget* _wid; 84 QWidget* _wid;
82 KOListView * _view; 85 KOListView * _view;
83}; 86};
84 87
85 88
86ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date ) 89ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date )
87{ 90{
88 mItem = item; 91 mItem = item;
89 mDate = date; 92 mDate = date;
@@ -259,49 +262,60 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
259 mListView->setColumnAlignment(7,AlignLeft); 262 mListView->setColumnAlignment(7,AlignLeft);
260 mListView->setColumnAlignment(8,AlignLeft); 263 mListView->setColumnAlignment(8,AlignLeft);
261 mListView->setColumnAlignment(9,AlignLeft); 264 mListView->setColumnAlignment(9,AlignLeft);
262 mListView->setColumnAlignment(10,AlignLeft); 265 mListView->setColumnAlignment(10,AlignLeft);
263 mListView->setColumnWidthMode(10, QListView::Manual); 266 mListView->setColumnWidthMode(10, QListView::Manual);
264 mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this); 267 mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this);
265 268
266 int iii = 0; 269 int iii = 0;
267 for ( iii = 0; iii< 10 ; ++iii ) 270 for ( iii = 0; iii< 10 ; ++iii )
268 mListView->setColumnWidthMode( iii, QListView::Manual ); 271 mListView->setColumnWidthMode( iii, QListView::Manual );
269 272
270 QBoxLayout *layoutTop = new QVBoxLayout(this); 273 QBoxLayout *layoutTop = new QVBoxLayout(this);
271 layoutTop->addWidget(mListView); 274 layoutTop->addWidget(mListView);
272 mListView->setFont ( KOPrefs::instance()->mListViewFont ); 275 mListView->setFont ( KOPrefs::instance()->mListViewFont );
273 mPopupMenu = eventPopup(); 276 mPopupMenu = eventPopup();
274 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 277 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
275 i18n("Select all"),this, 278 i18n("Select all"),this,
276 SLOT(allSelection()),true); 279 SLOT(allSelection()),true);
277 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 280 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
278 i18n("Deselect all"),this, 281 i18n("Deselect all"),this,
279 SLOT(clearSelection()),true); 282 SLOT(clearSelection()),true);
280 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 283 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
281 i18n("Delete all selected"),this, 284 i18n("Delete all selected"),this,
282 SLOT(deleteAll()),true); 285 SLOT(deleteAll()),true);
286#ifdef DESKTOP_VERSION
287 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
288 i18n("Hide all selected"),this,
289 SLOT(hideAll()),true);
290#endif
291 mPopupMenu->insertSeparator();
292#ifdef DESKTOP_VERSION
293 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
294 i18n("Print complete list"),this,
295 SLOT(printList()),true);
283 mPopupMenu->insertSeparator(); 296 mPopupMenu->insertSeparator();
297#endif
284 QPopupMenu * exportPO = new QPopupMenu ( this ); 298 QPopupMenu * exportPO = new QPopupMenu ( this );
285 mPopupMenu->insertItem( i18n("Export selected"), exportPO ); 299 mPopupMenu->insertItem( i18n("Export selected"), exportPO );
286 exportPO->insertItem( i18n("As iCal (ics) file..."),this, 300 exportPO->insertItem( i18n("As iCal (ics) file..."),this,
287 SLOT(saveToFile())); 301 SLOT(saveToFile()));
288 exportPO->insertItem( i18n("As vCal (vcs) file..."),this, 302 exportPO->insertItem( i18n("As vCal (vcs) file..."),this,
289 SLOT(saveToFileVCS())); 303 SLOT(saveToFileVCS()));
290 exportPO->insertItem( i18n("Journal/Details..."),this, 304 exportPO->insertItem( i18n("Journal/Details..."),this,
291 SLOT(saveDescriptionToFile())); 305 SLOT(saveDescriptionToFile()));
292 // mPopupMenu->insertSeparator(); 306 // mPopupMenu->insertSeparator();
293 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 307 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
294 i18n("Add Categ. to selected..."),this, 308 i18n("Add Categ. to selected..."),this,
295 SLOT(addCat()),true); 309 SLOT(addCat()),true);
296 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 310 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
297 i18n("Set Categ. for selected..."),this, 311 i18n("Set Categ. for selected..."),this,
298 SLOT(setCat()),true); 312 SLOT(setCat()),true);
299 //mPopupMenu->insertSeparator(); 313 //mPopupMenu->insertSeparator();
300 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 314 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
301 i18n("Set alarm for selected..."),this, 315 i18n("Set alarm for selected..."),this,
302 SLOT(setAlarm()),true); 316 SLOT(setAlarm()),true);
303 317
304 318
305#ifndef DESKTOP_VERSION 319#ifndef DESKTOP_VERSION
306 mPopupMenu->insertSeparator(); 320 mPopupMenu->insertSeparator();
307 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()), 321 mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
@@ -701,48 +715,69 @@ void KOListView::writeToFile( bool iCal )
701 } 715 }
702 if ( createbup ) { 716 if ( createbup ) {
703 CalendarLocal cal; 717 CalendarLocal cal;
704 cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId); 718 cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
705 Incidence *incidence = delSel.first(); 719 Incidence *incidence = delSel.first();
706 while ( incidence ) { 720 while ( incidence ) {
707 cal.addIncidence( incidence->clone() ); 721 cal.addIncidence( incidence->clone() );
708 incidence = delSel.next(); 722 incidence = delSel.next();
709 } 723 }
710 if ( iCal ) { 724 if ( iCal ) {
711 ICalFormat format; 725 ICalFormat format;
712 format.save( &cal, fn ); 726 format.save( &cal, fn );
713 } else { 727 } else {
714 728
715 VCalFormat format; 729 VCalFormat format;
716 format.save( &cal, fn ); 730 format.save( &cal, fn );
717 } 731 }
718 mes = i18n("KO/Pi:Saved %1").arg(fn ); 732 mes = i18n("KO/Pi:Saved %1").arg(fn );
719 KOPrefs::instance()->mLastSaveFile = fn; 733 KOPrefs::instance()->mLastSaveFile = fn;
720 topLevelWidget()->setCaption(mes); 734 topLevelWidget()->setCaption(mes);
721 } 735 }
722 } 736 }
723 QTimer::singleShot( 1, this, SLOT ( resetFocus() ) ); 737 QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
724} 738}
739void KOListView::hideAll()
740{
741 QPtrList<QListViewItem> delSel ;
742 QListViewItem *item = mListView->firstChild ();
743 while ( item ) {
744 if ( item->isSelected() ) {
745 delSel.append(item);
746 }
747 item = item->nextSibling();
748 }
749 item = delSel.first() ;
750 while ( item ) {
751 QListViewItem * del = item;
752 item = delSel.next();
753 delete del;
754 }
755}
756void KOListView::printList()
757{
758 mListView->printList();
759}
725void KOListView::deleteAll() 760void KOListView::deleteAll()
726{ 761{
727 int icount = 0; 762 int icount = 0;
728 QPtrList<Incidence> delSel ; 763 QPtrList<Incidence> delSel ;
729 QListViewItem *item = mListView->firstChild (); 764 QListViewItem *item = mListView->firstChild ();
730 while ( item ) { 765 while ( item ) {
731 if ( item->isSelected() ) { 766 if ( item->isSelected() ) {
732 delSel.append(((KOListViewItem *)item)->data()); 767 delSel.append(((KOListViewItem *)item)->data());
733 ++icount; 768 ++icount;
734 } 769 }
735 770
736 item = item->nextSibling(); 771 item = item->nextSibling();
737 } 772 }
738 if ( icount ) { 773 if ( icount ) {
739 Incidence *incidence = delSel.first(); 774 Incidence *incidence = delSel.first();
740 Incidence *toDelete; 775 Incidence *toDelete;
741 KOPrefs *p = KOPrefs::instance(); 776 KOPrefs *p = KOPrefs::instance();
742 bool confirm = p->mConfirm; 777 bool confirm = p->mConfirm;
743 QString mess; 778 QString mess;
744 mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount ); 779 mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount );
745 if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) { 780 if ( KMessageBox::Continue == KMessageBox::warningContinueCancel(this, mess + i18n("All selected items will be\npermanently deleted.\n(Deleting items will take\nsome time on a PDA)\n"), i18n("KO/Pi Confirmation"),i18n("Delete")) ) {
746 p->mConfirm = false; 781 p->mConfirm = false;
747 int delCounter = 0; 782 int delCounter = 0;
748 QDialog dia ( this, "p-dialog", true ); 783 QDialog dia ( this, "p-dialog", true );
@@ -1266,24 +1301,71 @@ void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
1266 if ( ci ) 1301 if ( ci )
1267 ci->setSelected( true ); 1302 ci->setSelected( true );
1268 } 1303 }
1269} 1304}
1270void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e) 1305void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e)
1271{ 1306{
1272 mPopupTimer->stop(); 1307 mPopupTimer->stop();
1273 KListView::contentsMouseReleaseEvent(e); 1308 KListView::contentsMouseReleaseEvent(e);
1274} 1309}
1275void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e) 1310void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
1276{ 1311{
1277 // qDebug("contentsMouseMoveEv....... "); 1312 // qDebug("contentsMouseMoveEv....... ");
1278 // qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() ); 1313 // qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() );
1279 int diff = mYMousePos - mapToGlobal( (e->pos())).y(); 1314 int diff = mYMousePos - mapToGlobal( (e->pos())).y();
1280 if ( diff < 0 ) diff = -diff; 1315 if ( diff < 0 ) diff = -diff;
1281 if ( diff > 15 ) 1316 if ( diff > 15 )
1282 mPopupTimer->stop(); 1317 mPopupTimer->stop();
1283 else { 1318 else {
1284 mEventPos = contentsToViewport(e->pos()); 1319 mEventPos = contentsToViewport(e->pos());
1285 mEventGlobalPos = e->globalPos(); 1320 mEventGlobalPos = e->globalPos();
1286 } 1321 }
1287 KListView::contentsMouseMoveEvent(e); 1322 KListView::contentsMouseMoveEvent(e);
1288} 1323}
1289 1324
1325#define protected public
1326#include <qheader.h>
1327#undef protected
1328void KOListViewListView::printList()
1329{
1330#ifdef DESKTOP_VERSION
1331 KOPrintPrefs pp ( this );
1332 if (!pp.exec() )
1333 return;
1334 int scaleval = pp.printMode() ;
1335
1336 QPrinter printer;
1337 if (!printer.setup() )
1338 return;
1339 clearSelection ();
1340 QPainter p;
1341 p.begin ( &printer );
1342 QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
1343 float dx, dy;
1344 int wid = (m.width() * 9)/10;
1345 dx = (float) wid/(float)contentsWidth ();
1346 dy = (float)(m.height()) / (float)contentsHeight ();
1347 float scale;
1348 // scale to fit the width or height of the paper
1349 if ( dx < dy )
1350 scale = dx;
1351 else
1352 scale = dy;
1353
1354 p.translate( m.width()/10,m.width()/10 );
1355 if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
1356 p.scale( scale, scale );
1357 }
1358
1359 int cou = header()->count();
1360 int iii;
1361 QRect rect ( 0,0,0, header()->height());
1362 for ( iii = 0; iii < cou; ++iii ) {
1363 rect.setLeft ( header()->sectionPos( iii ) );
1364 rect.setRight ( header()->sectionPos( iii ) + header()->sectionSize (iii));
1365 header()->paintSection ( & p, header()->mapToIndex (iii), rect );
1366 }
1367 p.translate( 0, header()->height());
1368 drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () );
1369 p.end();
1370#endif
1371}
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index f4d6879..c25592d 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -195,48 +195,49 @@ class ListItemVisitor : public Incidence::Visitor
195 195
196 private: 196 private:
197 KOListViewItem *mItem; 197 KOListViewItem *mItem;
198 QDate mDate; 198 QDate mDate;
199}; 199};
200 200
201/** 201/**
202 This class provides a multi-column list view of events. It can 202 This class provides a multi-column list view of events. It can
203 display events from one particular day or several days, it doesn't 203 display events from one particular day or several days, it doesn't
204 matter. To use a view that only handles one day at a time, use 204 matter. To use a view that only handles one day at a time, use
205 KODayListView. 205 KODayListView.
206 206
207 @short multi-column list view of various events. 207 @short multi-column list view of various events.
208 @author Preston Brown <pbrown@kde.org> 208 @author Preston Brown <pbrown@kde.org>
209 @see KOBaseView, KODayListView 209 @see KOBaseView, KODayListView
210*/ 210*/
211class KOListView; 211class KOListView;
212 212
213class KOListViewListView : public KListView 213class KOListViewListView : public KListView
214{ 214{
215 Q_OBJECT 215 Q_OBJECT
216 public: 216 public:
217 KOListViewListView(KOListView * lv ); 217 KOListViewListView(KOListView * lv );
218 bool hasMultiSelection(QListViewItem*); 218 bool hasMultiSelection(QListViewItem*);
219 void printList();
219 signals: 220 signals:
220 void newEvent(); 221 void newEvent();
221 void showIncidence( Incidence* ); 222 void showIncidence( Incidence* );
222 public slots: 223 public slots:
223 void popupMenu(); 224 void popupMenu();
224 private: 225 private:
225 QPoint mEventPos; 226 QPoint mEventPos;
226 QPoint mEventGlobalPos; 227 QPoint mEventGlobalPos;
227 QTimer* mPopupTimer; 228 QTimer* mPopupTimer;
228 int mYMousePos; 229 int mYMousePos;
229 void keyPressEvent ( QKeyEvent * ) ; 230 void keyPressEvent ( QKeyEvent * ) ;
230 void contentsMouseDoubleClickEvent(QMouseEvent *e); 231 void contentsMouseDoubleClickEvent(QMouseEvent *e);
231 void contentsMousePressEvent(QMouseEvent *e); 232 void contentsMousePressEvent(QMouseEvent *e);
232 void contentsMouseReleaseEvent(QMouseEvent *e); 233 void contentsMouseReleaseEvent(QMouseEvent *e);
233 void contentsMouseMoveEvent(QMouseEvent *e); 234 void contentsMouseMoveEvent(QMouseEvent *e);
234 bool mMouseDown; 235 bool mMouseDown;
235}; 236};
236 237
237class KOListView : public KOEventView 238class KOListView : public KOEventView
238{ 239{
239 Q_OBJECT 240 Q_OBJECT
240 public: 241 public:
241 KOListView(Calendar *calendar, QWidget *parent = 0, 242 KOListView(Calendar *calendar, QWidget *parent = 0,
242 const char *name = 0); 243 const char *name = 0);
@@ -245,48 +246,50 @@ class KOListView : public KOEventView
245 virtual int maxDatesHint(); 246 virtual int maxDatesHint();
246 virtual int currentDateCount(); 247 virtual int currentDateCount();
247 virtual QPtrList<Incidence> selectedIncidences(); 248 virtual QPtrList<Incidence> selectedIncidences();
248 virtual DateList selectedDates(); 249 virtual DateList selectedDates();
249 250
250 void showDates(bool show); 251 void showDates(bool show);
251 Incidence* currentItem(); 252 Incidence* currentItem();
252 void addTodos(QPtrList<Todo> eventList); 253 void addTodos(QPtrList<Todo> eventList);
253 void addJournals(QPtrList<Journal> eventList); 254 void addJournals(QPtrList<Journal> eventList);
254 virtual void printPreview(CalPrinter *calPrinter, 255 virtual void printPreview(CalPrinter *calPrinter,
255 const QDate &, const QDate &); 256 const QDate &, const QDate &);
256 257
257 void readSettings(KConfig *config, QString setting = "KOListView Layout"); 258 void readSettings(KConfig *config, QString setting = "KOListView Layout");
258 void writeSettings(KConfig *config, QString setting = "KOListView Layout"); 259 void writeSettings(KConfig *config, QString setting = "KOListView Layout");
259 void updateList(); 260 void updateList();
260 void clearList(); 261 void clearList();
261 void setStartDate(const QDate &start); 262 void setStartDate(const QDate &start);
262 int count(); 263 int count();
263 QString getWhatsThisText(QPoint p); 264 QString getWhatsThisText(QPoint p);
264 signals: 265 signals:
265 void signalNewEvent(); 266 void signalNewEvent();
266 void beamIncidenceList(QPtrList<Incidence>); 267 void beamIncidenceList(QPtrList<Incidence>);
267 268
268 public slots: 269 public slots:
270 void hideAll();
271 void printList();
269 void resetFocus(); 272 void resetFocus();
270 virtual void updateView(); 273 virtual void updateView();
271 virtual void showDates(const QDate &start, const QDate &end); 274 virtual void showDates(const QDate &start, const QDate &end);
272 virtual void showEvents(QPtrList<Event> eventList); 275 virtual void showEvents(QPtrList<Event> eventList);
273 void clearSelection(); 276 void clearSelection();
274 void allSelection(); 277 void allSelection();
275 278
276 void clear(); 279 void clear();
277 void beamDone( Ir *ir ); 280 void beamDone( Ir *ir );
278 void showDates(); 281 void showDates();
279 void hideDates(); 282 void hideDates();
280 void deleteAll(); 283 void deleteAll();
281 void saveToFile(); 284 void saveToFile();
282 void saveToFileVCS(); 285 void saveToFileVCS();
283 void saveDescriptionToFile(); 286 void saveDescriptionToFile();
284 void beamSelected(); 287 void beamSelected();
285 void updateConfig(); 288 void updateConfig();
286 void addCat(); 289 void addCat();
287 void setCat(); 290 void setCat();
288 void setAlarm(); 291 void setAlarm();
289 void setCategories( bool removeOld ); 292 void setCategories( bool removeOld );
290 void changeEventDisplay(Event *, int); 293 void changeEventDisplay(Event *, int);
291 294
292 void defaultItemAction(QListViewItem *item); 295 void defaultItemAction(QListViewItem *item);
diff --git a/version b/version
index 3a546e2..f3e46b1 100644
--- a/version
+++ b/version
@@ -1 +1 @@
version = "2.1.5"; version = "2.1.6";