author | zautrix <zautrix> | 2005-01-05 23:13:10 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-05 23:13:10 (UTC) |
commit | 0618fbee69bfde7f7f3c4a54b5cc45dac446abd3 (patch) (unidiff) | |
tree | 5fa2e93328b3429a22e0a712f45bdc91e3da1f07 | |
parent | ed3b1be69915eaff3bfad542fd50bb18624c323e (diff) | |
download | kdepimpi-0618fbee69bfde7f7f3c4a54b5cc45dac446abd3.zip kdepimpi-0618fbee69bfde7f7f3c4a54b5cc45dac446abd3.tar.gz kdepimpi-0618fbee69bfde7f7f3c4a54b5cc45dac446abd3.tar.bz2 |
added wnv printing
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 2 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 2 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.cpp | 19 | ||||
-rw-r--r-- | korganizer/kowhatsnextview.h | 3 | ||||
-rw-r--r-- | korganizer/mainwindow.cpp | 4 |
6 files changed, 32 insertions, 2 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 | |||
@@ -9,5 +9,6 @@ Added setting to hide not running todos in todo view. | |||
9 | Added columns for start date/time in todo view. | 9 | Added columns for start date/time in todo view. |
10 | Replaced the solid half-hour lines in agenda view by dot lines. | 10 | Replaced the solid half-hour lines in agenda view by dot lines. |
11 | Fixed some minor problems. (Like word wrap in help text windows). | 11 | Added possibility of printing the What's Next View on the desktop |
12 | (i.e. Windows and Linux). | ||
12 | 13 | ||
13 | Fixed a strange problem in KO/Pi alarm applet. | 14 | Fixed a strange problem in KO/Pi alarm applet. |
@@ -16,4 +17,5 @@ such that now Qtopia reboots again if deinstalling the alarm applet. | |||
16 | But the alarm applet should work again. | 17 | But the alarm applet should work again. |
17 | 18 | ||
19 | Fixed some minor problems. (Like word wrap in help text windows). | ||
18 | 20 | ||
19 | ********** VERSION 1.9.15 ************ | 21 | ********** VERSION 1.9.15 ************ |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index b2dd266..cf56fcf 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -239,4 +239,6 @@ void KOViewManager::showWhatsNextView() | |||
239 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); | 239 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); |
240 | addView(mWhatsNextView); | 240 | addView(mWhatsNextView); |
241 | connect(this, SIGNAL( printWNV() ), | ||
242 | mWhatsNextView, SLOT( printMe() ) ); | ||
241 | } | 243 | } |
242 | globalFlagBlockAgenda = 1; | 244 | globalFlagBlockAgenda = 1; |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 26b22be..6f76e2c 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -79,4 +79,6 @@ class KOViewManager : public QObject | |||
79 | KOAgendaView *agendaView() const { return mAgendaView; } | 79 | KOAgendaView *agendaView() const { return mAgendaView; } |
80 | 80 | ||
81 | signals: | ||
82 | void printWNV(); | ||
81 | public slots: | 83 | public slots: |
82 | void showWhatsNextView(); | 84 | void showWhatsNextView(); |
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() | |||
112 | } | 112 | } |
113 | 113 | ||
114 | 114 | void 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 | } | ||
115 | void KOWhatsNextView::printPreview(CalPrinter *calPrinter, const QDate &fd, | 131 | void KOWhatsNextView::printPreview(CalPrinter *calPrinter, const QDate &fd, |
116 | const QDate &td) | 132 | const QDate &td) |
@@ -675,4 +691,5 @@ void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v ) | |||
675 | void KOWhatsNextView::showIncidence(const QString &uid) | 691 | void KOWhatsNextView::showIncidence(const QString &uid) |
676 | { | 692 | { |
693 | |||
677 | if ( !mEventViewer ) { | 694 | if ( !mEventViewer ) { |
678 | qDebug("KOWhatsNextView::showIncidence::sorry, no event viewer set "); | 695 | qDebug("KOWhatsNextView::showIncidence::sorry, no event viewer set "); |
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 9049268..0231cf2 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h | |||
@@ -30,4 +30,6 @@ class QLabel; | |||
30 | class KOEventViewerDialog; | 30 | class KOEventViewerDialog; |
31 | 31 | ||
32 | #include <qpainter.h> | ||
33 | #include <qwidget.h> | ||
32 | class WhatsNextTextBrowser : public QTextBrowser { | 34 | class WhatsNextTextBrowser : public QTextBrowser { |
33 | Q_OBJECT | 35 | Q_OBJECT |
@@ -65,4 +67,5 @@ class KOWhatsNextView : public KOrg::BaseView | |||
65 | public slots: | 67 | public slots: |
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); |
68 | virtual void showEvents(QPtrList<Event> eventList); | 71 | virtual void showEvents(QPtrList<Event> eventList); |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 6bc5b3a..def8431 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -847,4 +847,8 @@ 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 |
850 | importMenu->insertSeparator(); | 854 | importMenu->insertSeparator(); |