-rw-r--r-- | korganizer/calendarview.cpp | 1 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 1 | ||||
-rw-r--r-- | korganizer/kotodoview.cpp | 17 | ||||
-rw-r--r-- | korganizer/kotodoview.h | 2 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 13 | ||||
-rw-r--r-- | korganizer/koviewmanager.h | 2 |
6 files changed, 28 insertions, 8 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index db33017..cca73f2 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -2147,33 +2147,32 @@ void CalendarView::changeEventDisplay(Event *which, int action) | |||
2147 | 2147 | ||
2148 | if (which) { | 2148 | if (which) { |
2149 | // If there is an event view visible update the display | 2149 | // If there is an event view visible update the display |
2150 | mViewManager->currentView()->changeEventDisplay(which,action); | 2150 | mViewManager->currentView()->changeEventDisplay(which,action); |
2151 | // TODO: check, if update needed | 2151 | // TODO: check, if update needed |
2152 | // if (which->getTodoStatus()) { | 2152 | // if (which->getTodoStatus()) { |
2153 | mTodoList->updateView(); | 2153 | mTodoList->updateView(); |
2154 | // } | 2154 | // } |
2155 | } else { | 2155 | } else { |
2156 | mViewManager->currentView()->updateView(); | 2156 | mViewManager->currentView()->updateView(); |
2157 | } | 2157 | } |
2158 | } | 2158 | } |
2159 | 2159 | ||
2160 | 2160 | ||
2161 | void CalendarView::updateTodoViews() | 2161 | void CalendarView::updateTodoViews() |
2162 | { | 2162 | { |
2163 | |||
2164 | mTodoList->updateView(); | 2163 | mTodoList->updateView(); |
2165 | mViewManager->currentView()->updateView(); | 2164 | mViewManager->currentView()->updateView(); |
2166 | 2165 | ||
2167 | } | 2166 | } |
2168 | 2167 | ||
2169 | 2168 | ||
2170 | void CalendarView::updateView(const QDate &start, const QDate &end) | 2169 | void CalendarView::updateView(const QDate &start, const QDate &end) |
2171 | { | 2170 | { |
2172 | mTodoList->updateView(); | 2171 | mTodoList->updateView(); |
2173 | mViewManager->updateView(start, end); | 2172 | mViewManager->updateView(start, end); |
2174 | //mDateNavigator->updateView(); | 2173 | //mDateNavigator->updateView(); |
2175 | } | 2174 | } |
2176 | 2175 | ||
2177 | void CalendarView::updateView() | 2176 | void CalendarView::updateView() |
2178 | { | 2177 | { |
2179 | DateList tmpList = mNavigator->selectedDates(); | 2178 | DateList tmpList = mNavigator->selectedDates(); |
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 4cefb26..770a42b 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -960,32 +960,33 @@ void KOMonthView::updateView() | |||
960 | return; | 960 | return; |
961 | //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); | 961 | //qDebug("+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ "); |
962 | int i; | 962 | int i; |
963 | for( i = 0; i < mCells.count(); ++i ) { | 963 | for( i = 0; i < mCells.count(); ++i ) { |
964 | mCells[i]->updateCell(); | 964 | mCells[i]->updateCell(); |
965 | } | 965 | } |
966 | 966 | ||
967 | //qDebug("KOMonthView::updateView() "); | 967 | //qDebug("KOMonthView::updateView() "); |
968 | processSelectionChange(); | 968 | processSelectionChange(); |
969 | // qDebug("---------------------------------------------------------------------+ "); | 969 | // qDebug("---------------------------------------------------------------------+ "); |
970 | mCells[0]->setFocus(); | 970 | mCells[0]->setFocus(); |
971 | } | 971 | } |
972 | 972 | ||
973 | void KOMonthView::resizeEvent(QResizeEvent * e) | 973 | void KOMonthView::resizeEvent(QResizeEvent * e) |
974 | { | 974 | { |
975 | computeLayout(); | 975 | computeLayout(); |
976 | mCells[0]->setFocus(); | ||
976 | } | 977 | } |
977 | void KOMonthView::computeLayout() | 978 | void KOMonthView::computeLayout() |
978 | { | 979 | { |
979 | // select the appropriate heading string size. E.g. "Wednesday" or "Wed". | 980 | // select the appropriate heading string size. E.g. "Wednesday" or "Wed". |
980 | // note this only changes the text if the requested size crosses the | 981 | // note this only changes the text if the requested size crosses the |
981 | // threshold between big enough to support the full name and not big | 982 | // threshold between big enough to support the full name and not big |
982 | // enough. | 983 | // enough. |
983 | 984 | ||
984 | int daysToShow = 7; | 985 | int daysToShow = 7; |
985 | bool combinedSatSun = false; | 986 | bool combinedSatSun = false; |
986 | if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { | 987 | if (mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ) { |
987 | daysToShow = 6; | 988 | daysToShow = 6; |
988 | combinedSatSun = true; | 989 | combinedSatSun = true; |
989 | } | 990 | } |
990 | int tWid = topLevelWidget()->size().width(); | 991 | int tWid = topLevelWidget()->size().width(); |
991 | int tHei = topLevelWidget()->size().height(); | 992 | int tHei = topLevelWidget()->size().height(); |
diff --git a/korganizer/kotodoview.cpp b/korganizer/kotodoview.cpp index 8d8fc2a..82437d8 100644 --- a/korganizer/kotodoview.cpp +++ b/korganizer/kotodoview.cpp | |||
@@ -321,32 +321,33 @@ void KOQuickTodo::focusInEvent(QFocusEvent *ev) | |||
321 | if ( text()==i18n("Click to add a new Todo") ) | 321 | if ( text()==i18n("Click to add a new Todo") ) |
322 | setText(""); | 322 | setText(""); |
323 | QLineEdit::focusInEvent(ev); | 323 | QLineEdit::focusInEvent(ev); |
324 | } | 324 | } |
325 | 325 | ||
326 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) | 326 | void KOQuickTodo::focusOutEvent(QFocusEvent *ev) |
327 | { | 327 | { |
328 | setText(i18n("Click to add a new Todo")); | 328 | setText(i18n("Click to add a new Todo")); |
329 | QLineEdit::focusOutEvent(ev); | 329 | QLineEdit::focusOutEvent(ev); |
330 | } | 330 | } |
331 | 331 | ||
332 | ///////////////////////////////////////////////////////////////////////////// | 332 | ///////////////////////////////////////////////////////////////////////////// |
333 | 333 | ||
334 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | 334 | KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : |
335 | KOrg::BaseView(calendar,parent,name) | 335 | KOrg::BaseView(calendar,parent,name) |
336 | { | 336 | { |
337 | mPendingUpdateBeforeRepaint = false; | ||
337 | isFlatDisplay = false; | 338 | isFlatDisplay = false; |
338 | mNavigator = 0; | 339 | mNavigator = 0; |
339 | QBoxLayout *topLayout = new QVBoxLayout(this); | 340 | QBoxLayout *topLayout = new QVBoxLayout(this); |
340 | mName = QString ( name ); | 341 | mName = QString ( name ); |
341 | mBlockUpdate = false; | 342 | mBlockUpdate = false; |
342 | mQuickAdd = new KOQuickTodo(this); | 343 | mQuickAdd = new KOQuickTodo(this); |
343 | topLayout->addWidget(mQuickAdd); | 344 | topLayout->addWidget(mQuickAdd); |
344 | 345 | ||
345 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); | 346 | if ( !KOPrefs::instance()->mEnableQuickTodo ) mQuickAdd->hide(); |
346 | 347 | ||
347 | mTodoListView = new KOTodoListView(calendar,this, name ); | 348 | mTodoListView = new KOTodoListView(calendar,this, name ); |
348 | topLayout->addWidget(mTodoListView); | 349 | topLayout->addWidget(mTodoListView); |
349 | //mTodoListView->header()->setMaximumHeight(30); | 350 | //mTodoListView->header()->setMaximumHeight(30); |
350 | mTodoListView->setRootIsDecorated(true); | 351 | mTodoListView->setRootIsDecorated(true); |
351 | mTodoListView->setAllColumnsShowFocus(true); | 352 | mTodoListView->setAllColumnsShowFocus(true); |
352 | 353 | ||
@@ -520,40 +521,52 @@ KOTodoView::KOTodoView(Calendar *calendar,QWidget* parent,const char* name) : | |||
520 | SLOT( addQuickTodo() ) ); | 521 | SLOT( addQuickTodo() ) ); |
521 | 522 | ||
522 | } | 523 | } |
523 | 524 | ||
524 | KOTodoView::~KOTodoView() | 525 | KOTodoView::~KOTodoView() |
525 | { | 526 | { |
526 | delete mDocPrefs; | 527 | delete mDocPrefs; |
527 | } | 528 | } |
528 | 529 | ||
529 | void KOTodoView::jumpToDate () | 530 | void KOTodoView::jumpToDate () |
530 | { | 531 | { |
531 | // if (mActiveItem) { | 532 | // if (mActiveItem) { |
532 | // mActiveItem->todo()); | 533 | // mActiveItem->todo()); |
533 | // if ( mActiveItem->todo()->hasDueDate() ) | 534 | // if ( mActiveItem->todo()->hasDueDate() ) |
534 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); | 535 | // emit mActiveItem->todo()jumpToTime( mTodo->dtDue().date() ); |
535 | } | 536 | } |
536 | 537 | void KOTodoView::paintEvent(QPaintEvent * pevent) | |
538 | { | ||
539 | if ( mPendingUpdateBeforeRepaint ) { | ||
540 | updateView(); | ||
541 | mPendingUpdateBeforeRepaint = false; | ||
542 | } | ||
543 | KOrg::BaseView::paintEvent( pevent); | ||
544 | } | ||
545 | bool mPendingUpdateBeforeRepaint; | ||
537 | void KOTodoView::updateView() | 546 | void KOTodoView::updateView() |
538 | { | 547 | { |
539 | pendingSubtodo = 0; | 548 | pendingSubtodo = 0; |
540 | if ( mBlockUpdate ) { | 549 | if ( mBlockUpdate ) { |
541 | //qDebug("blocked "); | ||
542 | return; | 550 | return; |
543 | } | 551 | } |
552 | if ( !isVisible() ) { | ||
553 | mPendingUpdateBeforeRepaint = true; | ||
554 | return; | ||
555 | } | ||
556 | //qDebug("KOTodoView::updateView() %x", this); | ||
544 | if ( isFlatDisplay ) { | 557 | if ( isFlatDisplay ) { |
545 | setAllFlat(); | 558 | setAllFlat(); |
546 | return; | 559 | return; |
547 | } | 560 | } |
548 | //qDebug("update "); | 561 | //qDebug("update "); |
549 | // kdDebug() << "KOTodoView::updateView()" << endl; | 562 | // kdDebug() << "KOTodoView::updateView()" << endl; |
550 | QFont fo = KOPrefs::instance()->mTodoViewFont; | 563 | QFont fo = KOPrefs::instance()->mTodoViewFont; |
551 | mTodoListView->clear(); | 564 | mTodoListView->clear(); |
552 | if ( mName == "todolistsmall" ) { | 565 | if ( mName == "todolistsmall" ) { |
553 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { | 566 | if ( KOPrefs::instance()->mTodoViewUsesSmallFont ) { |
554 | int ps = fo.pointSize() -2; | 567 | int ps = fo.pointSize() -2; |
555 | if ( ps > 12 ) | 568 | if ( ps > 12 ) |
556 | ps -= 2; | 569 | ps -= 2; |
557 | fo.setPointSize( ps ); | 570 | fo.setPointSize( ps ); |
558 | } | 571 | } |
559 | } | 572 | } |
diff --git a/korganizer/kotodoview.h b/korganizer/kotodoview.h index 68e29bb..16bc133 100644 --- a/korganizer/kotodoview.h +++ b/korganizer/kotodoview.h | |||
@@ -200,32 +200,34 @@ class KOTodoView : public KOrg::BaseView | |||
200 | protected slots: | 200 | protected slots: |
201 | void processSelectionChange(); | 201 | void processSelectionChange(); |
202 | void addQuickTodo(); | 202 | void addQuickTodo(); |
203 | void setTodoModified( Todo* ); | 203 | void setTodoModified( Todo* ); |
204 | void todoModified(Todo *, int ); | 204 | void todoModified(Todo *, int ); |
205 | 205 | ||
206 | private: | 206 | private: |
207 | /* | 207 | /* |
208 | * the TodoEditor approach is rather unscaling in the long | 208 | * the TodoEditor approach is rather unscaling in the long |
209 | * run. | 209 | * run. |
210 | * Korganizer keeps it in memory and we need to update | 210 | * Korganizer keeps it in memory and we need to update |
211 | * 1. make KOTodoViewItem a QObject again? | 211 | * 1. make KOTodoViewItem a QObject again? |
212 | * 2. add a public method for setting one todo modified? | 212 | * 2. add a public method for setting one todo modified? |
213 | * 3. add a private method for setting a todo modified + friend here? | 213 | * 3. add a private method for setting a todo modified + friend here? |
214 | * -- zecke 2002-07-08 | 214 | * -- zecke 2002-07-08 |
215 | */ | 215 | */ |
216 | void paintEvent(QPaintEvent * pevent); | ||
217 | bool mPendingUpdateBeforeRepaint; | ||
216 | friend class KOTodoViewItem; | 218 | friend class KOTodoViewItem; |
217 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); | 219 | QMap<Todo *,KOTodoViewItem *>::ConstIterator insertTodoItem(Todo *todo); |
218 | void restoreItemState( QListViewItem * ); | 220 | void restoreItemState( QListViewItem * ); |
219 | 221 | ||
220 | bool checkTodo( Todo * ); | 222 | bool checkTodo( Todo * ); |
221 | bool isFlatDisplay; | 223 | bool isFlatDisplay; |
222 | void setOpen( QListViewItem*, bool setOpen); | 224 | void setOpen( QListViewItem*, bool setOpen); |
223 | KOTodoListView *mTodoListView; | 225 | KOTodoListView *mTodoListView; |
224 | QPopupMenu *mItemPopupMenu; | 226 | QPopupMenu *mItemPopupMenu; |
225 | QPopupMenu *mPopupMenu; | 227 | QPopupMenu *mPopupMenu; |
226 | QPopupMenu *mPriorityPopupMenu; | 228 | QPopupMenu *mPriorityPopupMenu; |
227 | QPopupMenu *mPercentageCompletedPopupMenu; | 229 | QPopupMenu *mPercentageCompletedPopupMenu; |
228 | QPopupMenu *mCategoryPopupMenu; | 230 | QPopupMenu *mCategoryPopupMenu; |
229 | 231 | ||
230 | QMap<int, int> mPercentage; | 232 | QMap<int, int> mPercentage; |
231 | QMap<int, int> mPriority; | 233 | QMap<int, int> mPriority; |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index 35774d6..2cd8792 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -191,59 +191,62 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | |||
191 | if(view == mCurrentView && view != mWhatsNextView ) { | 191 | if(view == mCurrentView && view != mWhatsNextView ) { |
192 | if ( mCurrentAgendaView < 0 ) | 192 | if ( mCurrentAgendaView < 0 ) |
193 | return; | 193 | return; |
194 | full = mMainView->leftFrame()->isVisible(); | 194 | full = mMainView->leftFrame()->isVisible(); |
195 | } else { | 195 | } else { |
196 | mCurrentView = view; | 196 | mCurrentView = view; |
197 | // bool full = fullScreen; | 197 | // bool full = fullScreen; |
198 | bool isFull = !mMainView->leftFrame()->isVisible(); | 198 | bool isFull = !mMainView->leftFrame()->isVisible(); |
199 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) | 199 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) |
200 | full = true; | 200 | full = true; |
201 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) | 201 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) |
202 | full = false; | 202 | full = false; |
203 | } | 203 | } |
204 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); | 204 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); |
205 | //raiseCurrentView( full ); | 205 | //raiseCurrentView( full ); |
206 | mMainView->processIncidenceSelection( 0 ); | 206 | mMainView->processIncidenceSelection( 0 ); |
207 | mMainView->updateView(); | 207 | //mMainView->updateView(); |
208 | raiseCurrentView( full ); | 208 | raiseCurrentView( full, true ); |
209 | mMainView->adaptNavigationUnits(); | 209 | mMainView->adaptNavigationUnits(); |
210 | } | 210 | } |
211 | 211 | ||
212 | void KOViewManager::raiseCurrentView( bool fullScreen ) | 212 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) |
213 | { | 213 | { |
214 | mCurrentAgendaView = 0; | 214 | mCurrentAgendaView = 0; |
215 | int wid = mMainView->width() ; | 215 | int wid = mMainView->width() ; |
216 | int hei = mMainView->height(); | 216 | int hei = mMainView->height(); |
217 | if ( mCurrentView == mMonthView ) { | 217 | if ( mCurrentView == mMonthView ) { |
218 | mMainView->navigatorBar()->show(); | 218 | mMainView->navigatorBar()->show(); |
219 | hei -= mMainView->navigatorBar()->sizeHint().height(); | 219 | hei -= mMainView->navigatorBar()->sizeHint().height(); |
220 | //mMainView->navigatorBar()->hide(); | 220 | //mMainView->navigatorBar()->hide(); |
221 | } else { | 221 | } else { |
222 | mMainView->navigatorBar()->hide(); | 222 | mMainView->navigatorBar()->hide(); |
223 | } | 223 | } |
224 | if ( fullScreen ) { | 224 | if ( fullScreen ) { |
225 | mMainView->leftFrame()->hide(); | 225 | mMainView->leftFrame()->hide(); |
226 | } else { | 226 | } else { |
227 | mMainView->leftFrame()->show(); | 227 | mMainView->leftFrame()->show(); |
228 | if ( KOPrefs::instance()->mVerticalScreen ) | 228 | if ( KOPrefs::instance()->mVerticalScreen ) |
229 | hei -= mMainView->leftFrame()->height(); | 229 | hei -= mMainView->leftFrame()->height(); |
230 | else | 230 | else |
231 | wid -= mMainView->leftFrame()->width(); | 231 | wid -= mMainView->leftFrame()->width(); |
232 | } | 232 | } |
233 | emit signalFullScreen( !fullScreen ); | 233 | emit signalFullScreen( !fullScreen ); |
234 | if ( callUpdateView ) | ||
235 | mMainView->updateView(); | ||
236 | |||
234 | if ( globalFlagBlockAgenda == 5 ) { | 237 | if ( globalFlagBlockAgenda == 5 ) { |
235 | globalFlagBlockAgenda = 4; | 238 | globalFlagBlockAgenda = 4; |
236 | globalFlagBlockAgendaItemPaint = 1; | 239 | globalFlagBlockAgendaItemPaint = 1; |
237 | } | 240 | } |
238 | mMainView->viewStack()->raiseWidget(mCurrentView); | 241 | mMainView->viewStack()->raiseWidget(mCurrentView); |
239 | if ( globalFlagBlockAgenda == 4 ) { | 242 | if ( globalFlagBlockAgenda == 4 ) { |
240 | if ( mCurrentView == mAgendaView ) { | 243 | if ( mCurrentView == mAgendaView ) { |
241 | //globalFlagBlockAgenda =1 ; | 244 | //globalFlagBlockAgenda =1 ; |
242 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) | 245 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) |
243 | mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); | 246 | mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); |
244 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) | 247 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) |
245 | mAgendaView->setStartHour( QTime::currentTime ().hour() ); | 248 | mAgendaView->setStartHour( QTime::currentTime ().hour() ); |
246 | qApp->processEvents(); | 249 | qApp->processEvents(); |
247 | //qDebug("qApp->processEvents() "); | 250 | //qDebug("qApp->processEvents() "); |
248 | globalFlagBlockAgenda = 0; | 251 | globalFlagBlockAgenda = 0; |
249 | mAgendaView->repaintAgenda(); | 252 | mAgendaView->repaintAgenda(); |
@@ -259,33 +262,33 @@ void KOViewManager::raiseCurrentView( bool fullScreen ) | |||
259 | void KOViewManager::updateView() | 262 | void KOViewManager::updateView() |
260 | { | 263 | { |
261 | // qDebug("KOViewManager::updateView() "); | 264 | // qDebug("KOViewManager::updateView() "); |
262 | // if we are updating mTodoView, we get endless recursion | 265 | // if we are updating mTodoView, we get endless recursion |
263 | if ( mTodoView == mCurrentView ) | 266 | if ( mTodoView == mCurrentView ) |
264 | return; | 267 | return; |
265 | if ( mCurrentView ) mCurrentView->updateView(); | 268 | if ( mCurrentView ) mCurrentView->updateView(); |
266 | 269 | ||
267 | } | 270 | } |
268 | 271 | ||
269 | void KOViewManager::updateView(const QDate &start, const QDate &end) | 272 | void KOViewManager::updateView(const QDate &start, const QDate &end) |
270 | { | 273 | { |
271 | // kdDebug() << "KOViewManager::updateView()" << endl; | 274 | // kdDebug() << "KOViewManager::updateView()" << endl; |
272 | 275 | ||
273 | if (mCurrentView) mCurrentView->showDates(start, end); | 276 | if (mCurrentView) mCurrentView->showDates(start, end); |
274 | 277 | ||
275 | if (mTodoView) mTodoView->updateView(); | 278 | if (mTodoView && mTodoView == mCurrentView ) mTodoView->updateView(); |
276 | } | 279 | } |
277 | 280 | ||
278 | 281 | ||
279 | void KOViewManager::updateWNview() | 282 | void KOViewManager::updateWNview() |
280 | { | 283 | { |
281 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) | 284 | if ( mCurrentView == mWhatsNextView && mWhatsNextView ) |
282 | mWhatsNextView->updateView(); | 285 | mWhatsNextView->updateView(); |
283 | 286 | ||
284 | } | 287 | } |
285 | void KOViewManager::showWhatsNextView() | 288 | void KOViewManager::showWhatsNextView() |
286 | { | 289 | { |
287 | if (!mWhatsNextView) { | 290 | if (!mWhatsNextView) { |
288 | mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), | 291 | mWhatsNextView = new KOWhatsNextView(mMainView->calendar(),mMainView->viewStack(), |
289 | "KOViewManager::WhatsNextView"); | 292 | "KOViewManager::WhatsNextView"); |
290 | mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); | 293 | mWhatsNextView->setEventViewer( mMainView->getEventViewerDialog()); |
291 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); | 294 | connect(mMainView, SIGNAL(configChanged()), mWhatsNextView, SLOT(updateConfig())); |
@@ -507,33 +510,35 @@ void KOViewManager::showMonthView() | |||
507 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); | 510 | mMainView, SLOT ( beamIncidence( Incidence * ) ) ); |
508 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), | 511 | connect( mMonthView, SIGNAL( selectWeekNum( int ) ), |
509 | mMainView, SLOT ( selectWeekNum( int ) ) ); | 512 | mMainView, SLOT ( selectWeekNum( int ) ) ); |
510 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), | 513 | connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), |
511 | mMainView, SLOT ( showDay( QDate ) ) ); | 514 | mMainView, SLOT ( showDay( QDate ) ) ); |
512 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); | 515 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); |
513 | connect( mMonthView, SIGNAL(nextMonth() ), | 516 | connect( mMonthView, SIGNAL(nextMonth() ), |
514 | mMainView->navigatorBar(), SIGNAL(goNextMonth() ) ); | 517 | mMainView->navigatorBar(), SIGNAL(goNextMonth() ) ); |
515 | connect( mMonthView, SIGNAL(prevMonth() ), | 518 | connect( mMonthView, SIGNAL(prevMonth() ), |
516 | mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) ); | 519 | mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) ); |
517 | mMonthView->updateConfig(); | 520 | mMonthView->updateConfig(); |
518 | } | 521 | } |
519 | 522 | ||
520 | globalFlagBlockAgenda = 1; | 523 | globalFlagBlockAgenda = 1; |
521 | //mFlagShowNextxDays = false; | 524 | //mFlagShowNextxDays = false; |
522 | // if(mMonthView == mCurrentView) return; | 525 | // if(mMonthView == mCurrentView) return; |
526 | mMainView->dateNavigator()->blockSignals( true ); | ||
523 | mMainView->dateNavigator()->selectMonth(); | 527 | mMainView->dateNavigator()->selectMonth(); |
528 | mMainView->dateNavigator()->blockSignals( false); | ||
524 | // DateList tmpList = mMainView->dateNavigator()->selectedDates( ); | 529 | // DateList tmpList = mMainView->dateNavigator()->selectedDates( ); |
525 | //mMonthView->showDates(tmpList.first(), tmpList.last()); | 530 | //mMonthView->showDates(tmpList.first(), tmpList.last()); |
526 | 531 | ||
527 | showView(mMonthView, true ); | 532 | showView(mMonthView, true ); |
528 | 533 | ||
529 | } | 534 | } |
530 | 535 | ||
531 | void KOViewManager::showTodoView() | 536 | void KOViewManager::showTodoView() |
532 | { | 537 | { |
533 | //mFlagShowNextxDays = false; | 538 | //mFlagShowNextxDays = false; |
534 | if ( !mTodoView ) { | 539 | if ( !mTodoView ) { |
535 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), | 540 | mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), |
536 | "KOViewManager::TodoView" ); | 541 | "KOViewManager::TodoView" ); |
537 | 542 | ||
538 | addView( mTodoView ); | 543 | addView( mTodoView ); |
539 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); | 544 | // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); |
diff --git a/korganizer/koviewmanager.h b/korganizer/koviewmanager.h index 137eb2d..66ab138 100644 --- a/korganizer/koviewmanager.h +++ b/korganizer/koviewmanager.h | |||
@@ -55,33 +55,33 @@ class KOViewManager : public QObject | |||
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( const QDate &start, const QDate &end ); | 69 | void updateView( const QDate &start, const QDate &end ); |
70 | 70 | ||
71 | void raiseCurrentView( bool fullScreen = false ); | 71 | void raiseCurrentView( bool fullScreen = false , bool updateView = false); |
72 | 72 | ||
73 | void addView(KOrg::BaseView *); | 73 | void addView(KOrg::BaseView *); |
74 | 74 | ||
75 | Incidence *currentSelection(); | 75 | Incidence *currentSelection(); |
76 | QDate currentSelectionDate(); | 76 | QDate currentSelectionDate(); |
77 | 77 | ||
78 | KOAgendaView *agendaView() const { return mAgendaView; } | 78 | KOAgendaView *agendaView() const { return mAgendaView; } |
79 | 79 | ||
80 | signals: | 80 | signals: |
81 | void printWNV(); | 81 | void printWNV(); |
82 | void signalFullScreen( bool ); | 82 | void signalFullScreen( bool ); |
83 | void signalAgendaView( bool ); | 83 | void signalAgendaView( bool ); |
84 | public slots: | 84 | public slots: |
85 | void showDateView( int, QDate ); | 85 | void showDateView( int, QDate ); |
86 | void updateView(); | 86 | void updateView(); |
87 | void showWhatsNextView(); | 87 | void showWhatsNextView(); |