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
@@ -5,19 +5,21 @@ Info about the changes in new versions of KDE-Pim/Pi
5KO/Pi: 5KO/Pi:
6Fixed search dialog size on Z 6000 (480x640 display). 6Fixed search dialog size on Z 6000 (480x640 display).
7Added setting to hide/show time in agenda items. 7Added setting to hide/show time in agenda items.
8Added setting to hide not running todos in todo view. 8Added setting to hide not running todos in todo view.
9Added columns for start date/time in todo view. 9Added 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
13Fixed a strange problem in KO/Pi alarm applet. 14Fixed a strange problem in KO/Pi alarm applet.
14Did not find the actual problem, 15Did not find the actual problem,
15such that now Qtopia reboots again if deinstalling the alarm applet. 16such that now Qtopia reboots again if deinstalling the alarm applet.
16But the alarm applet should work again. 17But the alarm applet should work again.
17 18
19Fixed some minor problems. (Like word wrap in help text windows).
18 20
19********** VERSION 1.9.15 ************ 21********** VERSION 1.9.15 ************
20 22
21Usebilty enhancements in KO/Pi: 23Usebilty enhancements in KO/Pi:
22When clicking on the date in a month view cell, the day view is shown. 24When clicking on the date in a month view cell, the day view is shown.
23Old behaviour was, that the "new event" dialog popped up. 25Old behaviour was, that the "new event" dialog popped up.
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp
index b2dd266..cf56fcf 100644
--- a/korganizer/koviewmanager.cpp
+++ b/korganizer/koviewmanager.cpp
@@ -235,12 +235,14 @@ void KOViewManager::showWhatsNextView()
235 if (!mWhatsNextView) { 235 if (!mWhatsNextView) {
236 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), 236 mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(),
237 "KOViewManager::WhatsNextView"); 237 "KOViewManager::WhatsNextView");
238 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); 238 mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog());
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;
243 showView(mWhatsNextView, true ); 245 showView(mWhatsNextView, true );
244 //mWhatsNextView->updateView(); 246 //mWhatsNextView->updateView();
245 247
246} 248}
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h
index 26b22be..6f76e2c 100644
--- a/korganizer/koviewmanager.h
+++ b/korganizer/koviewmanager.h
@@ -75,12 +75,14 @@ class KOViewManager : public QObject
75 75
76 Incidence *currentSelection(); 76 Incidence *currentSelection();
77 QDate currentSelectionDate(); 77 QDate currentSelectionDate();
78 78
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();
83 void showListView(); 85 void showListView();
84 void showAgendaView( bool fullScreen = false ); 86 void showAgendaView( bool fullScreen = false );
85 void showDayView(); 87 void showDayView();
86 void showWorkWeekView(); 88 void showWorkWeekView();
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()
108{ 108{
109 QPtrList<Incidence> eventList; 109 QPtrList<Incidence> eventList;
110 110
111 return eventList; 111 return eventList;
112} 112}
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,
116 const QDate &td) 132 const QDate &td)
117{ 133{
118#ifndef KORG_NOPRINTER 134#ifndef KORG_NOPRINTER
119 calPrinter->preview(CalPrinter::Day, fd, td); 135 calPrinter->preview(CalPrinter::Day, fd, td);
120#endif 136#endif
@@ -671,12 +687,13 @@ void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v )
671 mEventViewer = v; 687 mEventViewer = v;
672} 688}
673 689
674// TODO: Create this function in CalendarView and remove it from here 690// TODO: Create this function in CalendarView and remove it from here
675void KOWhatsNextView::showIncidence(const QString &uid) 691void 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 ");
679 return; 696 return;
680 } 697 }
681 //kdDebug() << "KOWhatsNextView::showIncidence(): " << uid << endl; 698 //kdDebug() << "KOWhatsNextView::showIncidence(): " << uid << endl;
682 //qDebug("KOWhatsNextView::showIncidence %s ", uid.latin1()); 699 //qDebug("KOWhatsNextView::showIncidence %s ", uid.latin1());
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h
index 9049268..0231cf2 100644
--- a/korganizer/kowhatsnextview.h
+++ b/korganizer/kowhatsnextview.h
@@ -26,12 +26,14 @@
26 26
27class QListView; 27class QListView;
28class QLabel; 28class QLabel;
29 29
30class KOEventViewerDialog; 30class KOEventViewerDialog;
31 31
32#include <qpainter.h>
33#include <qwidget.h>
32class WhatsNextTextBrowser : public QTextBrowser { 34class WhatsNextTextBrowser : public QTextBrowser {
33 Q_OBJECT 35 Q_OBJECT
34 public: 36 public:
35 WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {} 37 WhatsNextTextBrowser(QWidget *parent) : QTextBrowser(parent) {}
36 38
37 void setSource(const QString &); 39 void setSource(const QString &);
@@ -61,12 +63,13 @@ class KOWhatsNextView : public KOrg::BaseView
61 return q;} 63 return q;}
62 virtual void printPreview(CalPrinter *calPrinter, 64 virtual void printPreview(CalPrinter *calPrinter,
63 const QDate &, const QDate &); 65 const QDate &, const QDate &);
64 66
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);
69 void updateConfig(); 72 void updateConfig();
70 void changeEventDisplay(Event *, int); 73 void changeEventDisplay(Event *, int);
71 74
72 protected: 75 protected:
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 6bc5b3a..def8431 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -842,13 +842,17 @@ void MainWindow::initActions()
842 this, SLOT( printCal() ) ); 842 this, SLOT( printCal() ) );
843 843
844 icon = loadPixmap( pathString + "print" ); 844 icon = loadPixmap( pathString + "print" );
845 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this ); 845 action = new QAction( i18n("Print agenda selection..."),icon,i18n("Print agenda selection..."), 0, this );
846 action->addTo( importMenu ); 846 action->addTo( importMenu );
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();
851 action = new QAction( "beam all", i18n("Save"), 0, 855 action = new QAction( "beam all", i18n("Save"), 0,
852 this ); 856 this );
853 action->addTo( importMenu ); 857 action->addTo( importMenu );
854 connect( action, SIGNAL( activated() ), this, SLOT( save() ) ); 858 connect( action, SIGNAL( activated() ), this, SLOT( save() ) );