summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-06-07 20:23:54 (UTC)
committer zautrix <zautrix>2005-06-07 20:23:54 (UTC)
commit041729646fdaabd2ed69b4fc77c839efa81a7d2e (patch) (side-by-side diff)
tree82c78d5c25d18a79a8ae76aabf75ea40b91c26f2
parentaa9a9368a7b38e34118b65a4e8efa7ea7ec0e8e4 (diff)
downloadkdepimpi-041729646fdaabd2ed69b4fc77c839efa81a7d2e.zip
kdepimpi-041729646fdaabd2ed69b4fc77c839efa81a7d2e.tar.gz
kdepimpi-041729646fdaabd2ed69b4fc77c839efa81a7d2e.tar.bz2
print list added to kopi
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,14 +1,20 @@
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.
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
@@ -1363,19 +1363,19 @@
{ "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,15 +1,15 @@
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
diff --git a/korganizer/kolistview.cpp b/korganizer/kolistview.cpp
index bc52281..7022e02 100644
--- a/korganizer/kolistview.cpp
+++ b/korganizer/kolistview.cpp
@@ -25,24 +25,26 @@
#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>
@@ -54,24 +56,25 @@
#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)
{
@@ -271,25 +274,36 @@ KOListView::KOListView(Calendar *calendar, QWidget *parent,
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);
@@ -713,24 +727,45 @@ void KOListView::writeToFile( bool iCal )
} 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();
@@ -1278,12 +1313,59 @@ void KOListViewListView::contentsMouseMoveEvent(QMouseEvent *e)
// 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
@@ -207,24 +207,25 @@ class ListItemVisitor : public Incidence::Visitor
@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);
@@ -257,24 +258,26 @@ class KOListView : public KOEventView
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();
diff --git a/version b/version
index 3a546e2..f3e46b1 100644
--- a/version
+++ b/version
@@ -1 +1 @@
-version = "2.1.5";
+version = "2.1.6";