Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 5f14bfa..219f7c3 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp @@ -112,5 +112,21 @@ QPtrList<Incidence> KOWhatsNextView::selectedIncidences() } - +void KOWhatsNextView::printMe() +{ +#ifdef DESKTOP_VERSION + QPrinter printer; + if (!printer.setup() ) + return; + QTextBrowser tb; + tb.setFixedSize( 600, 4000 ); + QPainter::redirect ( tb.viewport(), &printer ); + updateView(); + tb.setText( mText ); + tb.show(); + tb.repaint(); + tb.hide(); + KMessageBox::information( this, i18n("Printing What's Next View!\n\nPlease close after\nprinting is finished.")); +#endif +} void KOWhatsNextView::printPreview(CalPrinter *calPrinter, const QDate &fd, const QDate &td) @@ -675,4 +691,5 @@ void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v ) void KOWhatsNextView::showIncidence(const QString &uid) { + if ( !mEventViewer ) { qDebug("KOWhatsNextView::showIncidence::sorry, no event viewer set "); |