summaryrefslogtreecommitdiffabout
path: root/korganizer/kowhatsnextview.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kowhatsnextview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/kowhatsnextview.cpp19
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
@@ -108,13 +108,29 @@ QPtrList<Incidence> KOWhatsNextView::selectedIncidences()
{
QPtrList<Incidence> eventList;
return eventList;
}
-
+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)
{
#ifndef KORG_NOPRINTER
calPrinter->preview(CalPrinter::Day, fd, td);
#endif
@@ -671,12 +687,13 @@ void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v )
mEventViewer = v;
}
// TODO: Create this function in CalendarView and remove it from here
void KOWhatsNextView::showIncidence(const QString &uid)
{
+
if ( !mEventViewer ) {
qDebug("KOWhatsNextView::showIncidence::sorry, no event viewer set ");
return;
}
//kdDebug() << "KOWhatsNextView::showIncidence(): " << uid << endl;
//qDebug("KOWhatsNextView::showIncidence %s ", uid.latin1());