summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show 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,50 +1,56 @@
Info about the changes in new versions of KDE-Pim/Pi
+********** VERSION 2.1.6 ************
+
+KO/Pi:
+Added to the list view (the list view is used in search dialog as well) the possibility to print it.
+Added to the list view the possibility to hide entries, if you do not want to print all entries of the list view.
+
********** VERSION 2.1.5 ************
This is the new stable version.
Bugfix:
Fixed a problem with agenda popup on the desktop in KO/Pi.
Fixed a crash when reloading file, e.g. after a passive pi-sync synchronization.
Added config option to not display completed todos in agenda view.
Addressee view is now using the formatted name, if defined.
That makes it possible to display "lastname, firstname" in that view now.
To set the formatted name for all contacts, please use menu:
Edit->Change->Set formatted name.
Fixed the bug in KA/Pi that is was not possible to add images to a contact on Windows.
********** VERSION 2.1.4 ************
Fixed two more bugs in the KA/Pi CSV import dialog:
Made it possible to read multi-line fields and import it to the "Note" field.
Fixed a problem in mapping custom fields, whatever a custem field is...
********** VERSION 2.1.3 ************
Changed the menu structure of the alarm applet:
Moved "Simulate" to " Play Beeps" submenu and re-added "Todo List".
Fixed several problems in the KA/Pi CSV import dialog:
Added "Category", made codec configureable and made it possible to map many fields to the "Note" field.
********** VERSION 2.1.2 ************
Fixed a problem closing the alarm dialog on Zaurus with "OK" button.
Fixed a problem when importing data from Outlook with mutiple categories set.
Changed display of days in datenavigator:
Birthdays are now blue, not dark green.
When todo view is shown, no birtdays are shown and days with due todos are shown blue.
When journal view is shown, only holidays are shown and days with journals are blue.
Added Backup options to global config:
You can create now x-daily backups for KO/Pi, KA/Pi (for file resources only, file resource is the standard type) and PwM/Pi ( all files you will open ).
It is recommended to use another HDD/Memory card for the backup directory. If (very useful on the Zaurus) the specified backup directory does not exist you are asked if you want to try again to create a backup. That makes it possible to insert your memory card in the Zaurus and then trying again.
The backup is created when the application wants to save for the first time on a backup-day. You can specify the amount of backups and the day interval of backups.
********** VERSION 2.1.1 ************
Stable release 2.1.1!
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
@@ -1327,55 +1327,55 @@
{ "The next alarm is in\nless than one minute!","Der nächste Alarm kommt in\nweniger als einer Minute!" },
{ "\nThe internal alarm notification is disabled!\n","\nDie interne Alarmbenachrichtigung ist ausgeschaltet!\n" },
{ "Enable it in the settings menu, TAB alarm.","Schalten Sie sie an im Menu Einstellungen, TAB Alarm." },
{ "Show Sync Events","Zeige Sync-Ereignisse" },
{ "Use short date in WN+Event view","Zeige Kurzdatum in WN+Terminanzeige" },
{ "Number of max.displayed todo prios:","Anzahl max.angezeigter Todo-Prios:" },
{ " on "," am " },
{ "On: ","Am: " },
{ "<i>The recurrence is computed from the start datetime!</i>","<i>Die Wiederholung wird vom Startwert aus berechnet!</i>" },
{ "Start/Stop todo...","Starte/Stoppe Todo..." },
{ "Color for running todos:","Farbe für laufende Todos:" },
{ "The todo\n%1\nis started.\nDo you want to set\nthe state to stopped?","Das Todo\n%1\nist gestartet.\nWollen Sie es\nauf gestoppt setzen?" },
{ "Todo is started","Todo ist gestartet" },
{ "Stop todo","Stoppe Todo" },
{ "Todo is stopped","Todo ist gestoppt" },
{ "Start todo","Starte Todo" },
{ "The todo\n%1\nis stopped.\nDo you want to set\nthe state to started?","Das Todo\n%1\nist gestoppt.\nWollen Sie es auf\ngestartet setzen?" },
{ "The todo\n%1\nwill be cloned!\nIt has subtodos!\nDo you want to clone\nall subtodos as well?","Das Todo\n%1\nwird geklont!\nEs hat Untertodos!\nMöchten Sie alle\nUntertodos auch klonen?" },
{ "Todo has subtodos","Todo hat Untertodos" },
{ "Block popup until mouse button release","Sperre Popup bis Mausknopf losgelassen" },
{ "Colors","Farben" },
{ "Click on new parent item","Klicke auf neues Übertodo" },
{ "Reparenting aborted!","Übertodo setzen abgebrochen" },
{ "Cannot move Todo to itself\nor a child of itself","Kann nicht Todo auf\nsich selbst oder\nein Untertodo verschieben" },
{ "Recursive reparenting not possible!","Rekursives Verschieben nicht möglich" },
{ "Delete all completed todos?\n(Completed recurring todos\nwill not be deleted!)","Entferne alle erledigten Todos?\n(Erledigte wiederholende Todos\nwerden nicht gelöscht!)" },
{ "Alternating background of list views","Abwechselnder Hintergrund für Listen" },
{ "times","Zeiten" },
{ "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?" },
{ "Backup enabled","Backup angeschaltet" },
{ "Use standard backup dir","Standard Backupverzeichnis" },
{ "Number of Backups:","Anzahl der Backups" },
{ "Make backup every ","Mache ein Backup alle " },
{ " days"," Tage" },
{ "Creating backup ... please wait ...","Erzeuge Backup ... bitte warten ..." },
{ "Backup Failed!","Backup Problem!" },
{ "Try again now","Versuche jetzt nochmal" },
{ "Try again later","Versuche später nochmal" },
{ "Try again tomorrow","Versuche morgen nochmal" },
{ "Disable backup","Schalte Backup ab" },
{ "<b>Backup directory does not exist: </b>","<b>Backup Verzeichnis existiert nicht: </b>" },
{ "<b>The backup copy command failed!</b>","<b>Das Backup Kopierkommando is fehlgeschlagen!</b>" },
{ "Choose action","Wähle Aktion" },
{ "Comment for todo:","Kommentar zum Todo:" },
{ "Stop+note","Stop+Notiz" },
{ "Agenda view shows completed todos","Agenda Ansicht zeigt erledigte Todos" },
{ "KO/Pi: Missing alarms!","KO/Pi: Verpasste Alarme!" },
{ "You missed the alarms for the following events or todos:","Sie verpassten die Alarme für folgende Termine oder Todos:" },
-{ "","" },
-{ "","" },
+{ "Print complete list","Drucke komplette Liste" },
+{ "Hide all selected","Verstecke Selektierte" },
{ "","" },
{ "","" },
{ "","" },
{ "","" },
{ "","" }, \ 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,51 +1,51 @@
Summary: A collection of PIM programs
Name: KDE-Pim-Pi
-Version: 2.1.5
+Version: 2.1.6
Release: SuSE_9.2
Copyright:GPL
Group: Productivity/Pim
Source:http://sourceforge.net/projects/kdepimpi/
URL:http://sourceforge.net/projects/kdepimpi/
Packager: zautrix
%description
This package contains the platform-independent PIM programs from
www.pi-sync.info, compiled for SuSE 9.2:
KTimeTacker/Pi
KPhone/Pi
KAddressbook/Pi
KOrganizer/Pi
PasswordManager/Pi
KOPieMail/Pi
These applications do not need anything from the KDE-desktop
at all to run on Linux. However, there is a dependency from
two KDE libs, because a small command line program is included
to make it possible to sync with the KDE-desktop applications.
These applications are independent from the KDE-desktop
environment. That means, nothing of your existing
KDE-desktop setup will be changed, or any data
(calendar-addressbook) used by the KDE-desktop
applications will be changed or accessed.
These applications stores their data and config in
$HOME/kdepim/
However, because the same file format is used,
an easy exchange of data with the KDE-desktop
is possible.
A small command line program is included
to make it possible to sync with the KDE-desktop applications.
You do not need to call this program from the commandline,
it is called from the KDE-Pim/Pi apps when you choose there:
Sync with KDE_Desktop.
If something is going wrong, please start the
KDE-Pim/Pi program itself from the console to get detailed output.
After installation, you should have a
PIM-pi
folder in your KDE start menu, where you can
start the applications from.
These programs makes it possible to sync your Zaurus easily
(with the KDE-Pim/Pi programs running on the Zaurus)
with the KDE-desktop calendar/addressbook data.
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index bc52281..7022e02 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -1,113 +1,116 @@
/*
This file is part of KOrganizer.
Copyright (c) 1999 Preston Brown
Copyright (c) 2000,2001 Cornelius Schumacher <schumacher@kde.org>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
As a special exception, permission is given to link this program
with any edition of Qt, and distribute the resulting executable,
without including the source code for Qt in the source distribution.
*/
#include <qlistview.h>
#include <qlayout.h>
#include <qlabel.h>
#include <qpopupmenu.h>
#include <qprogressbar.h>
#include <qfileinfo.h>
#include <qmessagebox.h>
#include <qdialog.h>
#include <qtextstream.h>
#include <qdir.h>
#include <qwhatsthis.h>
#include <qregexp.h>
+#include <qpainter.h>
+#include <qpaintdevicemetrics.h>
#include <klocale.h>
#include <kdebug.h>
#include <kiconloader.h>
#include <kglobal.h>
#include <libkdepim/kpimglobalprefs.h>
#include <libkcal/calendar.h>
#include <libkcal/calendarlocal.h>
#include <libkcal/icalformat.h>
#include <libkcal/vcalformat.h>
#include <libkcal/recurrence.h>
#include <libkcal/filestorage.h>
#include <libkdepim/categoryselectdialog.h>
#include <libkcal/kincidenceformatter.h>
#ifndef DESKTOP_VERSION
#include <qpe/qpeapplication.h>
#else
#include <qapplication.h>
#endif
#ifndef KORG_NOPRINTER
#include "calprinter.h"
#endif
#include "koglobals.h"
#include "koprefs.h"
#include "kfiledialog.h"
#include "kolistview.h"
+#include "koeventviewer.h"
class KOListViewWhatsThis :public QWhatsThis
{
public:
KOListViewWhatsThis( QWidget *wid, KOListView* view ) : QWhatsThis( wid ), _wid(wid),_view (view) { };
protected:
virtual QString text( const QPoint& p)
{
return _view->getWhatsThisText(p) ;
}
private:
QWidget* _wid;
KOListView * _view;
};
ListItemVisitor::ListItemVisitor(KOListViewItem *item, QDate date )
{
mItem = item;
mDate = date;
}
ListItemVisitor::~ListItemVisitor()
{
}
bool ListItemVisitor::visit(Event *e)
{
bool ok = false;
QString start, end;
QDate ds, de;
if ( e->doesRecur() ) {
ds = e->getNextOccurence( QDateTime( mDate, QTime(0,0,0)), &ok ).date();
if ( ok ) {
int days = e->dtStart().date().daysTo(e->dtEnd().date() );
start = KGlobal::locale()->formatDate(ds,true);
de = ds.addDays( days);
end = KGlobal::locale()->formatDate(de,true);
}
}
if ( ! ok ) {
start =e->dtStartDateStr();
end = e->dtEndDateStr();
@@ -235,97 +238,108 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
const char *name)
: KOEventView(calendar, parent, name)
{
mActiveItem = 0;
mListView = new KOListViewListView(this);
mListView->addColumn(i18n("Summary"));
mListView->addColumn(i18n("Start Date"));
mListView->addColumn(i18n("Start Time"));
mListView->addColumn(i18n("End Date"));
mListView->addColumn(i18n("End Time"));
mListView->addColumn(i18n("Alarm")); // alarm set?
mListView->addColumn(i18n("Recurs")); // recurs?
mListView->addColumn(i18n("Due Date"));
mListView->addColumn(i18n("Due Time"));
mListView->addColumn(i18n("Cancelled"));
mListView->addColumn(i18n("Categories"));
mListView->setColumnAlignment(0,AlignLeft);
mListView->setColumnAlignment(1,AlignLeft);
mListView->setColumnAlignment(2,AlignHCenter);
mListView->setColumnAlignment(3,AlignLeft);
mListView->setColumnAlignment(4,AlignHCenter);
mListView->setColumnAlignment(5,AlignLeft);
mListView->setColumnAlignment(6,AlignLeft);
mListView->setColumnAlignment(7,AlignLeft);
mListView->setColumnAlignment(8,AlignLeft);
mListView->setColumnAlignment(9,AlignLeft);
mListView->setColumnAlignment(10,AlignLeft);
mListView->setColumnWidthMode(10, QListView::Manual);
mKOListViewWhatsThis = new KOListViewWhatsThis(mListView->viewport(),this);
int iii = 0;
for ( iii = 0; iii< 10 ; ++iii )
mListView->setColumnWidthMode( iii, QListView::Manual );
QBoxLayout *layoutTop = new QVBoxLayout(this);
layoutTop->addWidget(mListView);
mListView->setFont ( KOPrefs::instance()->mListViewFont );
mPopupMenu = eventPopup();
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Select all"),this,
SLOT(allSelection()),true);
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Deselect all"),this,
SLOT(clearSelection()),true);
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Delete all selected"),this,
SLOT(deleteAll()),true);
+#ifdef DESKTOP_VERSION
+ mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
+ i18n("Hide all selected"),this,
+ SLOT(hideAll()),true);
+#endif
+ mPopupMenu->insertSeparator();
+#ifdef DESKTOP_VERSION
+ mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
+ i18n("Print complete list"),this,
+ SLOT(printList()),true);
mPopupMenu->insertSeparator();
+#endif
QPopupMenu * exportPO = new QPopupMenu ( this );
mPopupMenu->insertItem( i18n("Export selected"), exportPO );
exportPO->insertItem( i18n("As iCal (ics) file..."),this,
SLOT(saveToFile()));
exportPO->insertItem( i18n("As vCal (vcs) file..."),this,
SLOT(saveToFileVCS()));
exportPO->insertItem( i18n("Journal/Details..."),this,
SLOT(saveDescriptionToFile()));
// mPopupMenu->insertSeparator();
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Add Categ. to selected..."),this,
SLOT(addCat()),true);
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Set Categ. for selected..."),this,
SLOT(setCat()),true);
//mPopupMenu->insertSeparator();
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Set alarm for selected..."),this,
SLOT(setAlarm()),true);
#ifndef DESKTOP_VERSION
mPopupMenu->insertSeparator();
mPopupMenu->addAdditionalItem(QIconSet(QPixmap()),
i18n("Beam selected via IR"),this,
SLOT(beamSelected()),true);
#endif
/*
mPopupMenu = new QPopupMenu;
mPopupMenu->insertItem(i18n("Edit Event"), this,
SLOT (editEvent()));
mPopupMenu->insertItem(SmallIcon("delete"), i18n("Delete Event"), this,
SLOT (deleteEvent()));
mPopupMenu->insertSeparator();
mPopupMenu->insertItem(i18n("Show Dates"), this,
SLOT(showDates()));
mPopupMenu->insertItem(i18n("Hide Dates"), this,
SLOT(hideDates()));
*/
QObject::connect(mListView,SIGNAL( newEvent()),
this,SIGNAL(signalNewEvent()));
QObject::connect(mListView,SIGNAL(doubleClicked(QListViewItem *)),
this,SLOT(defaultItemAction(QListViewItem *)));
QObject::connect(mListView,SIGNAL(rightButtonPressed( QListViewItem *,
const QPoint &, int )),
this,SLOT(popupMenu(QListViewItem *,const QPoint &,int)));
QObject::connect(mListView,SIGNAL(currentChanged(QListViewItem *)),
SLOT(processSelectionChange(QListViewItem *)));
@@ -677,96 +691,117 @@ void KOListView::writeToFile( bool iCal )
if ( fn.right( 4 ).lower() == ".vcs" ) {
fn = fn.left( fn.length() -3) + "ics";
}
} else {
if ( fn.right( 4 ).lower() == ".ics" ) {
fn = fn.left( fn.length() -3) + "vcs";
}
}
fn = KFileDialog::getSaveFileName( fn, i18n("Save filename"), this );
if ( fn == "" )
return;
QFileInfo info;
info.setFile( fn );
QString mes;
bool createbup = true;
if ( info. exists() ) {
mes = i18n("File already exists!\nOld file from:\n%1\nOverwrite?\n").arg (KGlobal::locale()->formatDateTime(info.lastModified (), true, false ) );
int result = QMessageBox::warning( this, i18n("KO/Pi: Warning!"),mes,
i18n("Overwrite!"), i18n("Cancel"), 0,
0, 1 );
if ( result != 0 ) {
createbup = false;
}
}
if ( createbup ) {
CalendarLocal cal;
cal.setTimeZoneId(KPimGlobalPrefs::instance()->mTimeZoneId);
Incidence *incidence = delSel.first();
while ( incidence ) {
cal.addIncidence( incidence->clone() );
incidence = delSel.next();
}
if ( iCal ) {
ICalFormat format;
format.save( &cal, fn );
} else {
VCalFormat format;
format.save( &cal, fn );
}
mes = i18n("KO/Pi:Saved %1").arg(fn );
KOPrefs::instance()->mLastSaveFile = fn;
topLevelWidget()->setCaption(mes);
}
}
QTimer::singleShot( 1, this, SLOT ( resetFocus() ) );
}
+void KOListView::hideAll()
+{
+ QPtrList<QListViewItem> delSel ;
+ QListViewItem *item = mListView->firstChild ();
+ while ( item ) {
+ if ( item->isSelected() ) {
+ delSel.append(item);
+ }
+ item = item->nextSibling();
+ }
+ item = delSel.first() ;
+ while ( item ) {
+ QListViewItem * del = item;
+ item = delSel.next();
+ delete del;
+ }
+}
+void KOListView::printList()
+{
+ mListView->printList();
+}
void KOListView::deleteAll()
{
int icount = 0;
QPtrList<Incidence> delSel ;
QListViewItem *item = mListView->firstChild ();
while ( item ) {
if ( item->isSelected() ) {
delSel.append(((KOListViewItem *)item)->data());
++icount;
}
item = item->nextSibling();
}
if ( icount ) {
Incidence *incidence = delSel.first();
Incidence *toDelete;
KOPrefs *p = KOPrefs::instance();
bool confirm = p->mConfirm;
QString mess;
mess = mess.sprintf( i18n("You have %d item(s) selected.\n"), icount );
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")) ) {
p->mConfirm = false;
int delCounter = 0;
QDialog dia ( this, "p-dialog", true );
QLabel lab (i18n("Close dialog to abort deletion!"), &dia );
QVBoxLayout lay( &dia );
lay.setMargin(7);
lay.setSpacing(7);
lay.addWidget( &lab);
QProgressBar bar( icount, &dia );
lay.addWidget( &bar);
int w = 220;
int h = 50;
int dw = QApplication::desktop()->width();
int dh = QApplication::desktop()->height();
dia.setGeometry( (dw-w)/2, (dh - h )/2 ,w,h );
//dia.resize( 240,50 );
dia.show();
while ( incidence ) {
bar.setProgress( delCounter );
mess = mess.sprintf( i18n("Deleting item %d ..."), ++delCounter );
dia.setCaption( mess );
qApp->processEvents();
toDelete = (incidence);
incidence = delSel.next();
emit deleteIncidenceSignal(toDelete );
if ( dia.result() != 0 )
@@ -1242,48 +1277,95 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
{
KListView::contentsMouseMoveEvent(e);
}
#endif
void KOListViewListView::popupMenu()
{
mPopupTimer->stop();
QMouseEvent* e = new QMouseEvent( QEvent::MouseButtonPress, mEventPos ,mEventGlobalPos, RightButton , RightButton );
QApplication::postEvent( this->viewport(), e );
}
void KOListViewListView::contentsMousePressEvent(QMouseEvent *e)
{
//qDebug("contentsMousePressEvent++++ %d %d", e->pos().y(), e->globalPos().y());
mYMousePos = mapToGlobal( (e->pos())).y();
if ( e->button() == LeftButton ) {
mPopupTimer->start( 600 );
mEventPos = contentsToViewport(e->pos());
mEventGlobalPos = e->globalPos();
}
KListView::contentsMousePressEvent( e );
if ( e->button() == RightButton ) {
QListViewItem* ci = currentItem();
//clearSelection();
if ( ci )
ci->setSelected( true );
}
}
void KOListViewListView::contentsMouseReleaseEvent(QMouseEvent *e)
{
mPopupTimer->stop();
KListView::contentsMouseReleaseEvent(e);
}
void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
{
// qDebug("contentsMouseMoveEv....... ");
// qDebug("start: %d current %d ",mYMousePos , mapToGlobal( (e->pos())).y() );
int diff = mYMousePos - mapToGlobal( (e->pos())).y();
if ( diff < 0 ) diff = -diff;
if ( diff > 15 )
mPopupTimer->stop();
else {
mEventPos = contentsToViewport(e->pos());
mEventGlobalPos = e->globalPos();
}
KListView::contentsMouseMoveEvent(e);
}
+#define protected public
+#include <qheader.h>
+#undef protected
+void KOListViewListView::printList()
+{
+#ifdef DESKTOP_VERSION
+ KOPrintPrefs pp ( this );
+ if (!pp.exec() )
+ return;
+ int scaleval = pp.printMode() ;
+
+ QPrinter printer;
+ if (!printer.setup() )
+ return;
+ clearSelection ();
+ QPainter p;
+ p.begin ( &printer );
+ QPaintDeviceMetrics m = QPaintDeviceMetrics ( &printer );
+ float dx, dy;
+ int wid = (m.width() * 9)/10;
+ dx = (float) wid/(float)contentsWidth ();
+ dy = (float)(m.height()) / (float)contentsHeight ();
+ float scale;
+ // scale to fit the width or height of the paper
+ if ( dx < dy )
+ scale = dx;
+ else
+ scale = dy;
+
+ p.translate( m.width()/10,m.width()/10 );
+ if ( scaleval == 2 || scaleval == 1 && scale < 1.0 ) {
+ p.scale( scale, scale );
+ }
+
+ int cou = header()->count();
+ int iii;
+ QRect rect ( 0,0,0, header()->height());
+ for ( iii = 0; iii < cou; ++iii ) {
+ rect.setLeft ( header()->sectionPos( iii ) );
+ rect.setRight ( header()->sectionPos( iii ) + header()->sectionSize (iii));
+ header()->paintSection ( & p, header()->mapToIndex (iii), rect );
+ }
+ p.translate( 0, header()->height());
+ drawContentsOffset ( &p, 0,0, 0,0, contentsWidth (), contentsHeight () );
+ p.end();
+#endif
+}
diff --git a/korganizer/kolistview.h b/korganizer/kolistview.h
index f4d6879..c25592d 100644
--- a/korganizer/kolistview.h
+++ b/korganizer/kolistview.h
@@ -171,144 +171,147 @@ void pickAlarmProgram()
};
typedef CustomListViewItem<Incidence *> KOListViewItem;
/**
This class provides the initialisation of a KOListViewItem for calendar
components using the Incidence::Visitor.
*/
class ListItemVisitor : public Incidence::Visitor
{
public:
ListItemVisitor(KOListViewItem *, QDate d);
~ListItemVisitor();
bool visit(Event *);
bool visit(Todo *);
bool visit(Journal *);
private:
KOListViewItem *mItem;
QDate mDate;
};
/**
This class provides a multi-column list view of events. It can
display events from one particular day or several days, it doesn't
matter. To use a view that only handles one day at a time, use
KODayListView.
@short multi-column list view of various events.
@author Preston Brown <pbrown@kde.org>
@see KOBaseView, KODayListView
*/
class KOListView;
class KOListViewListView : public KListView
{
Q_OBJECT
public:
KOListViewListView(KOListView * lv );
bool hasMultiSelection(QListViewItem*);
+ void printList();
signals:
void newEvent();
void showIncidence( Incidence* );
public slots:
void popupMenu();
private:
QPoint mEventPos;
QPoint mEventGlobalPos;
QTimer* mPopupTimer;
int mYMousePos;
void keyPressEvent ( QKeyEvent * ) ;
void contentsMouseDoubleClickEvent(QMouseEvent *e);
void contentsMousePressEvent(QMouseEvent *e);
void contentsMouseReleaseEvent(QMouseEvent *e);
void contentsMouseMoveEvent(QMouseEvent *e);
bool mMouseDown;
};
class KOListView : public KOEventView
{
Q_OBJECT
public:
KOListView(Calendar *calendar, QWidget *parent = 0,
const char *name = 0);
~KOListView();
virtual int maxDatesHint();
virtual int currentDateCount();
virtual QPtrList<Incidence> selectedIncidences();
virtual DateList selectedDates();
void showDates(bool show);
Incidence* currentItem();
void addTodos(QPtrList<Todo> eventList);
void addJournals(QPtrList<Journal> eventList);
virtual void printPreview(CalPrinter *calPrinter,
const QDate &, const QDate &);
void readSettings(KConfig *config, QString setting = "KOListView Layout");
void writeSettings(KConfig *config, QString setting = "KOListView Layout");
void updateList();
void clearList();
void setStartDate(const QDate &start);
int count();
QString getWhatsThisText(QPoint p);
signals:
void signalNewEvent();
void beamIncidenceList(QPtrList<Incidence>);
public slots:
+ void hideAll();
+ void printList();
void resetFocus();
virtual void updateView();
virtual void showDates(const QDate &start, const QDate &end);
virtual void showEvents(QPtrList<Event> eventList);
void clearSelection();
void allSelection();
void clear();
void beamDone( Ir *ir );
void showDates();
void hideDates();
void deleteAll();
void saveToFile();
void saveToFileVCS();
void saveDescriptionToFile();
void beamSelected();
void updateConfig();
void addCat();
void setCat();
void setAlarm();
void setCategories( bool removeOld );
void changeEventDisplay(Event *, int);
void defaultItemAction(QListViewItem *item);
void popupMenu(QListViewItem *item,const QPoint &,int);
protected slots:
void processSelectionChange(QListViewItem *);
protected:
void writeToFile( bool iCal );
void addEvents(QPtrList<Event> eventList);
void addIncidence(Incidence *);
KOListViewItem *getItemForEvent(Event *event);
private:
KOListViewWhatsThis *mKOListViewWhatsThis;
KOListViewListView *mListView;
KOEventPopupMenu *mPopupMenu;
KOListViewItem *mActiveItem;
QDict<Incidence> mUidDict;
QDate mStartDate;
void keyPressEvent ( QKeyEvent * ) ;
};
#endif
diff --git a/version b/version
index 3a546e2..f3e46b1 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-version = "2.1.5";
+version = "2.1.6";