-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 | 6 |
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 | |||
@@ -1,49 +1,51 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.16 ************ | 3 | ********** VERSION 1.9.16 ************ |
4 | 4 | ||
5 | KO/Pi: | 5 | KO/Pi: |
6 | Fixed search dialog size on Z 6000 (480x640 display). | 6 | Fixed search dialog size on Z 6000 (480x640 display). |
7 | Added setting to hide/show time in agenda items. | 7 | Added setting to hide/show time in agenda items. |
8 | Added setting to hide not running todos in todo view. | 8 | 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. |
14 | Did not find the actual problem, | 15 | Did not find the actual problem, |
15 | such that now Qtopia reboots again if deinstalling the alarm applet. | 16 | 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 ************ |
20 | 22 | ||
21 | Usebilty enhancements in KO/Pi: | 23 | Usebilty enhancements in KO/Pi: |
22 | When clicking on the date in a month view cell, the day view is shown. | 24 | When clicking on the date in a month view cell, the day view is shown. |
23 | Old behaviour was, that the "new event" dialog popped up. | 25 | Old behaviour was, that the "new event" dialog popped up. |
24 | 26 | ||
25 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). | 27 | Added a one step "undo delete" in KO/Pi (Accessable in the "Action" menu). |
26 | That means, you can restore the latest | 28 | That means, you can restore the latest |
27 | event/todo/journal you have deleted. | 29 | event/todo/journal you have deleted. |
28 | A journal is deleted, if you clear all the text of the journal. | 30 | A journal is deleted, if you clear all the text of the journal. |
29 | 31 | ||
30 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. | 32 | Fixed the bug of the editor dialogs in KO/Pi of version 1.9.14. |
31 | 33 | ||
32 | KA/Pi starting in 480x640 resolution: | 34 | KA/Pi starting in 480x640 resolution: |
33 | Hide the filter action in toolbar | 35 | Hide the filter action in toolbar |
34 | and added icons for undo/delete/redo in toolbar. | 36 | and added icons for undo/delete/redo in toolbar. |
35 | 37 | ||
36 | Change in OM/Pi ViewMail dialog: | 38 | Change in OM/Pi ViewMail dialog: |
37 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. | 39 | When clicking on the "delete" icon the mail is deleted after confirmation as usual. |
38 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). | 40 | But the edit dialog is not closed as before, now the next mail in the folder is shown automatically (if there is any). |
39 | 41 | ||
40 | Fixed a crash when deleting mail-accounts in OM/Pi. | 42 | Fixed a crash when deleting mail-accounts in OM/Pi. |
41 | 43 | ||
42 | 44 | ||
43 | ********** VERSION 1.9.14 ************ | 45 | ********** VERSION 1.9.14 ************ |
44 | 46 | ||
45 | Fixed some problems with the dialog sizes when switching | 47 | Fixed some problems with the dialog sizes when switching |
46 | portrait/landscape mode on 640x480 PDA display. | 48 | portrait/landscape mode on 640x480 PDA display. |
47 | 49 | ||
48 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. | 50 | Fixed some other small bugs in KA/Pi KO/Pi and OM/Pi and PwM/Pi. |
49 | 51 | ||
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index b2dd266..cf56fcf 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -209,64 +209,66 @@ void KOViewManager::updateView() | |||
209 | // qDebug("KOViewManager::updateView() "); | 209 | // qDebug("KOViewManager::updateView() "); |
210 | // if we are updating mTodoView, we get endless recursion | 210 | // if we are updating mTodoView, we get endless recursion |
211 | if ( mTodoView == mCurrentView ) | 211 | if ( mTodoView == mCurrentView ) |
212 | return; | 212 | return; |
213 | if ( mCurrentView ) mCurrentView->updateView(); | 213 | if ( mCurrentView ) mCurrentView->updateView(); |
214 | 214 | ||
215 | } | 215 | } |
216 | 216 | ||
217 | void KOViewManager::updateView(const QDate &start, const QDate &end) | 217 | void KOViewManager::updateView(const QDate &start, const QDate &end) |
218 | { | 218 | { |
219 | // kdDebug() << "KOViewManager::updateView()" << endl; | 219 | // kdDebug() << "KOViewManager::updateView()" << endl; |
220 | 220 | ||
221 | if (mCurrentView) mCurrentView->showDates(start, end); | 221 | if (mCurrentView) mCurrentView->showDates(start, end); |
222 | 222 | ||
223 | if (mTodoView) mTodoView->updateView(); | 223 | if (mTodoView) mTodoView->updateView(); |
224 | } | 224 | } |
225 | 225 | ||
226 | 226 | ||
227 | void KOViewManager::updateWNview() | 227 | void KOViewManager::updateWNview() |
228 | { | 228 | { |
229 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) | 229 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) |
230 | mWhatsNextView->updateView(); | 230 | mWhatsNextView->updateView(); |
231 | 231 | ||
232 | } | 232 | } |
233 | void KOViewManager::showWhatsNextView() | 233 | void KOViewManager::showWhatsNextView() |
234 | { | 234 | { |
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 | } |
247 | 249 | ||
248 | void KOViewManager::showListView() | 250 | void KOViewManager::showListView() |
249 | { | 251 | { |
250 | if (!mListView) { | 252 | if (!mListView) { |
251 | mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); | 253 | mListView = new KOListView(mMainView->calendar(), mMainView->viewStack(), "KOViewManager::ListView"); |
252 | addView(mListView); | 254 | addView(mListView); |
253 | 255 | ||
254 | connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), | 256 | connect(mListView, SIGNAL(showIncidenceSignal(Incidence *)), |
255 | mMainView, SLOT(showIncidence(Incidence *))); | 257 | mMainView, SLOT(showIncidence(Incidence *))); |
256 | connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), | 258 | connect(mListView, SIGNAL(editIncidenceSignal(Incidence *)), |
257 | mMainView, SLOT(editIncidence(Incidence *))); | 259 | mMainView, SLOT(editIncidence(Incidence *))); |
258 | connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), | 260 | connect(mListView, SIGNAL(deleteIncidenceSignal(Incidence *)), |
259 | mMainView, SLOT(deleteIncidence(Incidence *))); | 261 | mMainView, SLOT(deleteIncidence(Incidence *))); |
260 | connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), | 262 | connect( mListView, SIGNAL( incidenceSelected( Incidence * ) ), |
261 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); | 263 | mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); |
262 | connect( mListView, SIGNAL( signalNewEvent() ), | 264 | connect( mListView, SIGNAL( signalNewEvent() ), |
263 | mMainView, SLOT( newEvent() ) ); | 265 | mMainView, SLOT( newEvent() ) ); |
264 | connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); | 266 | connect(mMainView, SIGNAL(configChanged()), mListView, SLOT(updateConfig())); |
265 | connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), | 267 | connect( mListView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), |
266 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); | 268 | mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); |
267 | connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), | 269 | connect( mListView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), |
268 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); | 270 | mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); |
269 | connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), | 271 | connect( mListView, SIGNAL( moveIncidenceSignal( Incidence * ) ), |
270 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); | 272 | mMainView, SLOT ( moveIncidence( Incidence * ) ) ); |
271 | connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), | 273 | connect( mListView, SIGNAL( beamIncidenceSignal( Incidence * ) ), |
272 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 274 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 26b22be..6f76e2c 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -49,64 +49,66 @@ class KOViewManager : public QObject | |||
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | public: | 50 | public: |
51 | KOViewManager( CalendarView * ); | 51 | KOViewManager( CalendarView * ); |
52 | virtual ~KOViewManager(); | 52 | virtual ~KOViewManager(); |
53 | 53 | ||
54 | /** changes the view to be the currently selected view */ | 54 | /** changes the view to be the currently selected view */ |
55 | void showView(KOrg::BaseView *, bool fullScreen = false ); | 55 | void showView(KOrg::BaseView *, bool fullScreen = false ); |
56 | void updateWNview(); | 56 | void updateWNview(); |
57 | void readSettings(KConfig *config); | 57 | void readSettings(KConfig *config); |
58 | void writeSettings(KConfig *config); | 58 | void writeSettings(KConfig *config); |
59 | bool showsNextDays(); | 59 | bool showsNextDays(); |
60 | /** Read which view was shown last from config file */ | 60 | /** Read which view was shown last from config file */ |
61 | void readCurrentView(KConfig *); | 61 | void readCurrentView(KConfig *); |
62 | /** Write which view is currently shown to config file */ | 62 | /** Write which view is currently shown to config file */ |
63 | void writeCurrentView(KConfig *); | 63 | void writeCurrentView(KConfig *); |
64 | 64 | ||
65 | KOrg::BaseView *currentView(); | 65 | KOrg::BaseView *currentView(); |
66 | 66 | ||
67 | void setDocumentId( const QString & ); | 67 | void setDocumentId( const QString & ); |
68 | 68 | ||
69 | void updateView(); | 69 | void updateView(); |
70 | void updateView( const QDate &start, const QDate &end ); | 70 | void updateView( const QDate &start, const QDate &end ); |
71 | 71 | ||
72 | void raiseCurrentView( bool fullScreen = false ); | 72 | void raiseCurrentView( bool fullScreen = false ); |
73 | 73 | ||
74 | void addView(KOrg::BaseView *); | 74 | void addView(KOrg::BaseView *); |
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(); |
87 | void showWeekView(); | 89 | void showWeekView(); |
88 | void showNextXView(); | 90 | void showNextXView(); |
89 | void showMonthView(); | 91 | void showMonthView(); |
90 | void showTodoView(); | 92 | void showTodoView(); |
91 | void showJournalView(); | 93 | void showJournalView(); |
92 | void showTimeSpanView(); | 94 | void showTimeSpanView(); |
93 | 95 | ||
94 | private: | 96 | private: |
95 | CalendarView *mMainView; | 97 | CalendarView *mMainView; |
96 | 98 | ||
97 | int mCurrentAgendaView; | 99 | int mCurrentAgendaView; |
98 | KOAgendaView *mAgendaView; | 100 | KOAgendaView *mAgendaView; |
99 | KOListView *mListView; | 101 | KOListView *mListView; |
100 | KOMonthView *mMonthView; | 102 | KOMonthView *mMonthView; |
101 | KOTodoView *mTodoView; | 103 | KOTodoView *mTodoView; |
102 | KOWhatsNextView *mWhatsNextView; | 104 | KOWhatsNextView *mWhatsNextView; |
103 | KOJournalView *mJournalView; | 105 | KOJournalView *mJournalView; |
104 | KOTimeSpanView *mTimeSpanView; | 106 | KOTimeSpanView *mTimeSpanView; |
105 | 107 | ||
106 | KOrg::BaseView *mCurrentView; // currently active event view | 108 | KOrg::BaseView *mCurrentView; // currently active event view |
107 | 109 | ||
108 | int mAgendaViewMode; | 110 | int mAgendaViewMode; |
109 | bool mFlagShowNextxDays; | 111 | bool mFlagShowNextxDays; |
110 | 112 | ||
111 | }; | 113 | }; |
112 | 114 | ||
diff --git a/korganizer/kowhatsnextview.cpp b/korganizer/kowhatsnextview.cpp index 5f14bfa..219f7c3 100644 --- a/korganizer/kowhatsnextview.cpp +++ b/korganizer/kowhatsnextview.cpp | |||
@@ -82,65 +82,81 @@ KOWhatsNextView::KOWhatsNextView(Calendar *calendar, QWidget *parent, | |||
82 | 82 | ||
83 | QBoxLayout *topLayout = new QVBoxLayout(this); | 83 | QBoxLayout *topLayout = new QVBoxLayout(this); |
84 | // topLayout->addWidget(mDateLabel); | 84 | // topLayout->addWidget(mDateLabel); |
85 | topLayout->addWidget(mView); | 85 | topLayout->addWidget(mView); |
86 | mTimer = new QTimer( this ); | 86 | mTimer = new QTimer( this ); |
87 | connect(mTimer,SIGNAL( timeout() ),this, SLOT(updateView())); | 87 | connect(mTimer,SIGNAL( timeout() ),this, SLOT(updateView())); |
88 | 88 | ||
89 | connect(mView->horizontalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer())); | 89 | connect(mView->horizontalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer())); |
90 | connect(mView->verticalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer())); | 90 | connect(mView->verticalScrollBar (),SIGNAL( sliderReleased () ),this, SLOT(restartTimer())); |
91 | } | 91 | } |
92 | 92 | ||
93 | KOWhatsNextView::~KOWhatsNextView() | 93 | KOWhatsNextView::~KOWhatsNextView() |
94 | { | 94 | { |
95 | } | 95 | } |
96 | 96 | ||
97 | int KOWhatsNextView::maxDatesHint() | 97 | int KOWhatsNextView::maxDatesHint() |
98 | { | 98 | { |
99 | return 0; | 99 | return 0; |
100 | } | 100 | } |
101 | 101 | ||
102 | int KOWhatsNextView::currentDateCount() | 102 | int KOWhatsNextView::currentDateCount() |
103 | { | 103 | { |
104 | return 0; | 104 | return 0; |
105 | } | 105 | } |
106 | 106 | ||
107 | QPtrList<Incidence> KOWhatsNextView::selectedIncidences() | 107 | 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 | 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) |
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 |
121 | } | 137 | } |
122 | void KOWhatsNextView::updateConfig() | 138 | void KOWhatsNextView::updateConfig() |
123 | { | 139 | { |
124 | setFont( KOPrefs::instance()->mWhatsNextFont ); | 140 | setFont( KOPrefs::instance()->mWhatsNextFont ); |
125 | updateView(); | 141 | updateView(); |
126 | 142 | ||
127 | } | 143 | } |
128 | void KOWhatsNextView::showEvent ( QShowEvent * e ) | 144 | void KOWhatsNextView::showEvent ( QShowEvent * e ) |
129 | { | 145 | { |
130 | //qDebug("KOWhatsNextView::showEvent "); | 146 | //qDebug("KOWhatsNextView::showEvent "); |
131 | restartTimer(); | 147 | restartTimer(); |
132 | QWidget::showEvent ( e ); | 148 | QWidget::showEvent ( e ); |
133 | } | 149 | } |
134 | void KOWhatsNextView::hideEvent ( QHideEvent * e) | 150 | void KOWhatsNextView::hideEvent ( QHideEvent * e) |
135 | { | 151 | { |
136 | //qDebug(" KOWhatsNextView::hideEvent"); | 152 | //qDebug(" KOWhatsNextView::hideEvent"); |
137 | mTimer->stop(); | 153 | mTimer->stop(); |
138 | QWidget::hideEvent ( e ); | 154 | QWidget::hideEvent ( e ); |
139 | } | 155 | } |
140 | void KOWhatsNextView::restartTimer() | 156 | void KOWhatsNextView::restartTimer() |
141 | { | 157 | { |
142 | //qDebug("KOWhatsNextView::restartTimer() "); | 158 | //qDebug("KOWhatsNextView::restartTimer() "); |
143 | mTimer->start( 300000 ); | 159 | mTimer->start( 300000 ); |
144 | //mTimer->start( 5000 ); | 160 | //mTimer->start( 5000 ); |
145 | } | 161 | } |
146 | void KOWhatsNextView::updateView() | 162 | void KOWhatsNextView::updateView() |
@@ -645,64 +661,65 @@ bool KOWhatsNextView::appendTodo(Incidence *ev, QString ind , bool isSub ) | |||
645 | } | 661 | } |
646 | else { | 662 | else { |
647 | ind += "-"; | 663 | ind += "-"; |
648 | mText += "</li>\n"; | 664 | mText += "</li>\n"; |
649 | } | 665 | } |
650 | QPtrList<Incidence> Relations = ev->relations(); | 666 | QPtrList<Incidence> Relations = ev->relations(); |
651 | Incidence *to; | 667 | Incidence *to; |
652 | for (to=Relations.first();to;to=Relations.next()) { | 668 | for (to=Relations.first();to;to=Relations.next()) { |
653 | if (!((Todo*)to)->isCompleted()) | 669 | if (!((Todo*)to)->isCompleted()) |
654 | appendTodo( to, ind , true ); | 670 | appendTodo( to, ind , true ); |
655 | } | 671 | } |
656 | 672 | ||
657 | return true; | 673 | return true; |
658 | } | 674 | } |
659 | 675 | ||
660 | /* | 676 | /* |
661 | void KOWhatsNextView::createEventViewer() | 677 | void KOWhatsNextView::createEventViewer() |
662 | { | 678 | { |
663 | if (!mEventViewer) { | 679 | if (!mEventViewer) { |
664 | 680 | ||
665 | mEventViewer = new KOEventViewerDialog(this); | 681 | mEventViewer = new KOEventViewerDialog(this); |
666 | } | 682 | } |
667 | } | 683 | } |
668 | */ | 684 | */ |
669 | void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v ) | 685 | void KOWhatsNextView::setEventViewer(KOEventViewerDialog* v ) |
670 | { | 686 | { |
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 |
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 "); |
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()); |
683 | if (uid.startsWith("event:")) { | 700 | if (uid.startsWith("event:")) { |
684 | #ifdef DESKTOP_VERSION | 701 | #ifdef DESKTOP_VERSION |
685 | Event *event = calendar()->event(uid.mid(8)); | 702 | Event *event = calendar()->event(uid.mid(8)); |
686 | #else | 703 | #else |
687 | Event *event = calendar()->event(uid.mid(6)); | 704 | Event *event = calendar()->event(uid.mid(6)); |
688 | #endif | 705 | #endif |
689 | //qDebug("event %d uid %s ", event, uid.mid(6).latin1()); | 706 | //qDebug("event %d uid %s ", event, uid.mid(6).latin1()); |
690 | if (!event) return; | 707 | if (!event) return; |
691 | //createEventViewer(); | 708 | //createEventViewer(); |
692 | mEventViewer->setEvent(event); | 709 | mEventViewer->setEvent(event); |
693 | } else if (uid.startsWith("todo:")) { | 710 | } else if (uid.startsWith("todo:")) { |
694 | #ifdef DESKTOP_VERSION | 711 | #ifdef DESKTOP_VERSION |
695 | Todo *todo = calendar()->todo(uid.mid(7)); | 712 | Todo *todo = calendar()->todo(uid.mid(7)); |
696 | #else | 713 | #else |
697 | Todo *todo = calendar()->todo(uid.mid(5)); | 714 | Todo *todo = calendar()->todo(uid.mid(5)); |
698 | #endif | 715 | #endif |
699 | if (!todo) return; | 716 | if (!todo) return; |
700 | //createEventViewer(); | 717 | //createEventViewer(); |
701 | mEventViewer->setTodo(todo); | 718 | mEventViewer->setTodo(todo); |
702 | } else { | 719 | } else { |
703 | return; | 720 | return; |
704 | 721 | ||
705 | } | 722 | } |
706 | mEventViewer->showMe(); | 723 | mEventViewer->showMe(); |
707 | mEventViewer->raise(); | 724 | mEventViewer->raise(); |
708 | } | 725 | } |
diff --git a/korganizer/kowhatsnextview.h b/korganizer/kowhatsnextview.h index 9049268..0231cf2 100644 --- a/korganizer/kowhatsnextview.h +++ b/korganizer/kowhatsnextview.h | |||
@@ -1,96 +1,99 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of KOrganizer. | 2 | This file is part of KOrganizer. |
3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> | 3 | Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> |
4 | 4 | ||
5 | This program is free software; you can redistribute it and/or modify | 5 | This program is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published by | 6 | it under the terms of the GNU General Public License as published by |
7 | the Free Software Foundation; either version 2 of the License, or | 7 | the Free Software Foundation; either version 2 of the License, or |
8 | (at your option) any later version. | 8 | (at your option) any later version. |
9 | 9 | ||
10 | This program is distributed in the hope that it will be useful, | 10 | This program is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | */ | 18 | */ |
19 | #ifndef KOWHATSNEXTVIEW_H | 19 | #ifndef KOWHATSNEXTVIEW_H |
20 | #define KOWHATSNEXTVIEW_H | 20 | #define KOWHATSNEXTVIEW_H |
21 | 21 | ||
22 | #include <qtextbrowser.h> | 22 | #include <qtextbrowser.h> |
23 | #include <qtimer.h> | 23 | #include <qtimer.h> |
24 | 24 | ||
25 | #include <korganizer/baseview.h> | 25 | #include <korganizer/baseview.h> |
26 | 26 | ||
27 | class QListView; | 27 | class QListView; |
28 | class QLabel; | 28 | class QLabel; |
29 | 29 | ||
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 |
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 &); |
38 | 40 | ||
39 | signals: | 41 | signals: |
40 | void showIncidence(const QString &uid); | 42 | void showIncidence(const QString &uid); |
41 | }; | 43 | }; |
42 | 44 | ||
43 | 45 | ||
44 | /** | 46 | /** |
45 | This class provides a view of the next events and todos | 47 | This class provides a view of the next events and todos |
46 | */ | 48 | */ |
47 | class KOWhatsNextView : public KOrg::BaseView | 49 | class KOWhatsNextView : public KOrg::BaseView |
48 | { | 50 | { |
49 | Q_OBJECT | 51 | Q_OBJECT |
50 | public: | 52 | public: |
51 | KOWhatsNextView(Calendar *calendar, QWidget *parent = 0, | 53 | KOWhatsNextView(Calendar *calendar, QWidget *parent = 0, |
52 | const char *name = 0); | 54 | const char *name = 0); |
53 | ~KOWhatsNextView(); | 55 | ~KOWhatsNextView(); |
54 | 56 | ||
55 | virtual int maxDatesHint(); | 57 | virtual int maxDatesHint(); |
56 | virtual int currentDateCount(); | 58 | virtual int currentDateCount(); |
57 | void setEventViewer(KOEventViewerDialog* v ); | 59 | void setEventViewer(KOEventViewerDialog* v ); |
58 | virtual QPtrList<Incidence> selectedIncidences(); | 60 | virtual QPtrList<Incidence> selectedIncidences(); |
59 | DateList selectedDates() | 61 | DateList selectedDates() |
60 | {DateList q; | 62 | {DateList q; |
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: |
73 | bool appendEvent(Incidence *, bool reply=false, bool notRed = true, bool appendTable = false); | 76 | bool appendEvent(Incidence *, bool reply=false, bool notRed = true, bool appendTable = false); |
74 | bool appendTodo(Incidence *, QString ind = "", bool isSub = false ); | 77 | bool appendTodo(Incidence *, QString ind = "", bool isSub = false ); |
75 | void appendDay( int i, QDate date ); | 78 | void appendDay( int i, QDate date ); |
76 | QDate mEventDate; | 79 | QDate mEventDate; |
77 | virtual void showEvent ( QShowEvent * ); | 80 | virtual void showEvent ( QShowEvent * ); |
78 | virtual void hideEvent ( QHideEvent * ); | 81 | virtual void hideEvent ( QHideEvent * ); |
79 | 82 | ||
80 | private slots: | 83 | private slots: |
81 | void showIncidence(const QString &); | 84 | void showIncidence(const QString &); |
82 | void restartTimer(); | 85 | void restartTimer(); |
83 | 86 | ||
84 | 87 | ||
85 | private: | 88 | private: |
86 | //void createEventViewer(); | 89 | //void createEventViewer(); |
87 | QTimer* mTimer; | 90 | QTimer* mTimer; |
88 | QTextBrowser *mView; | 91 | QTextBrowser *mView; |
89 | QString mText; | 92 | QString mText; |
90 | // QLabel *mDateLabel; | 93 | // QLabel *mDateLabel; |
91 | KOEventViewerDialog *mEventViewer; | 94 | KOEventViewerDialog *mEventViewer; |
92 | 95 | ||
93 | QValueList<Incidence *> mTodos; | 96 | QValueList<Incidence *> mTodos; |
94 | }; | 97 | }; |
95 | 98 | ||
96 | #endif | 99 | #endif |
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 6bc5b3a..def8431 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp | |||
@@ -816,65 +816,69 @@ void MainWindow::initActions() | |||
816 | this ); | 816 | this ); |
817 | action->addTo( importMenu ); | 817 | action->addTo( importMenu ); |
818 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); | 818 | connect( action, SIGNAL( activated() ), mView, SLOT( manageCategories() ) ); |
819 | #ifndef DESKTOP_VERSION | 819 | #ifndef DESKTOP_VERSION |
820 | importMenu->insertSeparator(); | 820 | importMenu->insertSeparator(); |
821 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, | 821 | brAction = new QAction( "beam toggle", i18n("Beam receive enabled"), 0, |
822 | this ); | 822 | this ); |
823 | brAction->addTo( importMenu ); | 823 | brAction->addTo( importMenu ); |
824 | brAction->setToggleAction (true ) ; | 824 | brAction->setToggleAction (true ) ; |
825 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); | 825 | connect( brAction, SIGNAL( activated() ), this, SLOT( toggleBeamReceive() ) ); |
826 | 826 | ||
827 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, | 827 | action = new QAction( "beam all", i18n("Beam complete calendar..."), 0, |
828 | this ); | 828 | this ); |
829 | action->addTo( importMenu ); | 829 | action->addTo( importMenu ); |
830 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); | 830 | connect( action, SIGNAL( activated() ), mView, SLOT( beamCalendar() ) ); |
831 | 831 | ||
832 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, | 832 | action = new QAction( "beam all", i18n("Beam filtered calendar..."), 0, |
833 | this ); | 833 | this ); |
834 | action->addTo( importMenu ); | 834 | action->addTo( importMenu ); |
835 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); | 835 | connect( action, SIGNAL( activated() ), mView, SLOT( beamFilteredCalendar()) ); |
836 | #else | 836 | #else |
837 | importMenu->insertSeparator(); | 837 | importMenu->insertSeparator(); |
838 | icon = loadPixmap( pathString + "print" ); | 838 | icon = loadPixmap( pathString + "print" ); |
839 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); | 839 | action = new QAction( i18n("Print calendar..."),icon,i18n("Print calendar..."), 0, this ); |
840 | action->addTo( importMenu ); | 840 | action->addTo( importMenu ); |
841 | connect( action, SIGNAL( activated() ), | 841 | connect( action, SIGNAL( activated() ), |
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() ) ); |
855 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, | 859 | action = new QAction( "beam all", i18n("Exit (+save)"), 0, |
856 | this ); | 860 | this ); |
857 | action->addTo( importMenu ); | 861 | action->addTo( importMenu ); |
858 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); | 862 | connect( action, SIGNAL( activated() ), this, SLOT( close() ) ); |
859 | 863 | ||
860 | //menuBar->insertItem( "Configure",configureMenu ); | 864 | //menuBar->insertItem( "Configure",configureMenu ); |
861 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); | 865 | //configureMenu->insertItem( "Toolbar",configureToolBarMenu ); |
862 | icon = loadPixmap( "korganizer/korganizer" ); | 866 | icon = loadPixmap( "korganizer/korganizer" ); |
863 | 867 | ||
864 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); | 868 | action = new QAction( "Whats New", i18n("What's new?"), 0,this ); |
865 | action->addTo( helpMenu ); | 869 | action->addTo( helpMenu ); |
866 | connect( action, SIGNAL( activated() ), | 870 | connect( action, SIGNAL( activated() ), |
867 | SLOT( whatsNew() ) ); | 871 | SLOT( whatsNew() ) ); |
868 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); | 872 | action = new QAction( "featureHowto", i18n("Features + hints..."), 0,this ); |
869 | action->addTo( helpMenu ); | 873 | action->addTo( helpMenu ); |
870 | connect( action, SIGNAL( activated() ), | 874 | connect( action, SIGNAL( activated() ), |
871 | SLOT( features() ) ); | 875 | SLOT( features() ) ); |
872 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); | 876 | action = new QAction( "Keys + Colors", i18n("Keys + Colors..."), 0, this ); |
873 | action->addTo( helpMenu ); | 877 | action->addTo( helpMenu ); |
874 | connect( action, SIGNAL( activated() ), | 878 | connect( action, SIGNAL( activated() ), |
875 | SLOT( keyBindings() ) ); | 879 | SLOT( keyBindings() ) ); |
876 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); | 880 | action = new QAction( "Sync Howto", i18n("Sync HowTo..."), 0,this ); |
877 | action->addTo( helpMenu ); | 881 | action->addTo( helpMenu ); |
878 | connect( action, SIGNAL( activated() ), | 882 | connect( action, SIGNAL( activated() ), |
879 | SLOT( synchowto() ) ); | 883 | SLOT( synchowto() ) ); |
880 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); | 884 | action = new QAction( "KDE Sync Howto", i18n("KDE Sync HowTo..."), 0,this ); |