summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--bin/kdepim/WhatsNew.txt4
-rw-r--r--korganizer/koviewmanager.cpp2
-rw-r--r--korganizer/koviewmanager.h2
-rw-r--r--korganizer/kowhatsnextview.cpp19
-rw-r--r--korganizer/kowhatsnextview.h3
-rw-r--r--korganizer/mainwindow.cpp6
6 files changed, 33 insertions, 3 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt
index 6a9a200..b66062c 100644
--- a/bin/kdepim/WhatsNew.txt
+++ b/bin/kdepim/WhatsNew.txt
@@ -10,3 +10,4 @@ Added columns for start date/time in todo view.
10Replaced the solid half-hour lines in agenda view by dot lines. 10Replaced the solid half-hour lines in agenda view by dot lines.
11Fixed some minor problems. (Like word wrap in help text windows). 11Added possibility of printing the What's Next View on the desktop
12(i.e. Windows and Linux).
12 13
@@ -17,2 +18,3 @@ But the alarm applet should work again.
17 18
19Fixed some minor problems. (Like word wrap in help text windows).
18 20
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index b2dd266..cf56fcf 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -240,2 +240,4 @@ void KOViewManager::showWhatsNextView()
240 addView(mWhatsNextView); 240 addView(mWhatsNextView);
241 connect(this, SIGNAL( printWNV() ),
242 mWhatsNextView, SLOT( printMe() ) );
241 } 243 }
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 26b22be..6f76e2c 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -80,2 +80,4 @@ class KOViewManager : public QObject
80 80
81 signals:
82 void printWNV();
81 public slots: 83 public slots:
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp
index 5f14bfa..219f7c3 100644
--- a/korganizer/kowhatsnextview.cpp
+++ b/korganizer/kowhatsnextview.cpp
@@ -113,3 +113,19 @@ QPtrList<Incidence> KOWhatsNextView::selectedIncidences()
113 113
114 114void KOWhatsNextView::printMe()
115{
116#ifdef DESKTOP_VERSION
117 QPrinter printer;
118 if (!printer.setup() )
119 return;
120 QTextBrowser tb;
121 tb.setFixedSize( 600, 4000 );
122 QPainter::redirect ( tb.viewport(), &printer );
123 updateView();
124 tb.setText( mText );
125 tb.show();
126 tb.repaint();
127 tb.hide();
128 KMessageBox::information( this, i18n("Printing What's Next View!\n\nPlease close after\nprinting is finished."));
129#endif
130}
115void KOWhatsNextView::printPreview(CalPrinter *calPrinter, const QDate &fd, 131void KOWhatsNextView::printPreview(CalPrinter *calPrinter, const QDate &fd,
@@ -676,2 +692,3 @@ void KOWhatsNextView::showIncidence(const QString &uid)
676{ 692{
693
677 if ( !mEventViewer ) { 694 if ( !mEventViewer ) {
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 9049268..0231cf2 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -31,2 +31,4 @@ class KOEventViewerDialog;
31 31
32#include <qpainter.h>
33#include <qwidget.h>
32class WhatsNextTextBrowser : public QTextBrowser { 34class WhatsNextTextBrowser : public QTextBrowser {
@@ -66,2 +68,3 @@ class KOWhatsNextView : public KOrg::BaseView
66 virtual void updateView(); 68 virtual void updateView();
69 void printMe();
67 virtual void showDates(const QDate &start, const QDate &end); 70 virtual void showDates(const QDate &start, const QDate &end);
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 6bc5b3a..def8431 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -847,3 +847,7 @@ void MainWindow::initActions()
847 connect( action, SIGNAL( activated() ), 847 connect( action, SIGNAL( activated() ),
848 this, SLOT( printSel() ) ); 848 this, SLOT( printSel() ) );
849 action = new QAction( i18n("Print What's Next View..."),icon,i18n("Print What's Next View..."), 0, this );
850 action->addTo( importMenu );
851 connect( action, SIGNAL( activated() ),
852 mView->viewManager(), SIGNAL( printWNV() ) );
849#endif 853#endif