-rw-r--r-- | korganizer/calendarview.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index a46cd87..7ddbe23 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -253,32 +253,33 @@ void CalendarView::init() | |||
253 | mNavigator = new DateNavigator( this, "datevav", mViewManager ); | 253 | mNavigator = new DateNavigator( this, "datevav", mViewManager ); |
254 | 254 | ||
255 | QBoxLayout *topLayout = (QBoxLayout*)layout(); | 255 | QBoxLayout *topLayout = (QBoxLayout*)layout(); |
256 | #ifndef KORG_NOSPLITTER | 256 | #ifndef KORG_NOSPLITTER |
257 | // create the main layout frames. | 257 | // create the main layout frames. |
258 | mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); | 258 | mPanner = new QSplitter(QSplitter::Horizontal,this,"CalendarView::Panner"); |
259 | topLayout->addWidget(mPanner); | 259 | topLayout->addWidget(mPanner); |
260 | 260 | ||
261 | mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, | 261 | mLeftSplitter = new QSplitter(QSplitter::Vertical,mPanner, |
262 | "CalendarView::LeftFrame"); | 262 | "CalendarView::LeftFrame"); |
263 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); | 263 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); |
264 | 264 | ||
265 | mDateNavigator = new KDateNavigator(mLeftSplitter, mCalendar, TRUE, | 265 | mDateNavigator = new KDateNavigator(mLeftSplitter, mCalendar, TRUE, |
266 | "CalendarView::DateNavigator", QDate::currentDate() ); | 266 | "CalendarView::DateNavigator", QDate::currentDate() ); |
267 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); | 267 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); |
268 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); | 268 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); |
269 | mTodoList->setNavigator( mNavigator ); | ||
269 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); | 270 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); |
270 | 271 | ||
271 | #ifdef KORG_NORESOURCEVIEW | 272 | #ifdef KORG_NORESOURCEVIEW |
272 | mResourceView = 0; | 273 | mResourceView = 0; |
273 | #else | 274 | #else |
274 | if ( mResourceManager ) { | 275 | if ( mResourceManager ) { |
275 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); | 276 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); |
276 | mResourceView->updateView(); | 277 | mResourceView->updateView(); |
277 | connect( mResourceView, SIGNAL( resourcesChanged() ), | 278 | connect( mResourceView, SIGNAL( resourcesChanged() ), |
278 | SLOT( updateView() ) ); | 279 | SLOT( updateView() ) ); |
279 | } else { | 280 | } else { |
280 | mResourceView = 0; | 281 | mResourceView = 0; |
281 | } | 282 | } |
282 | #endif | 283 | #endif |
283 | QWidget *rightBox = new QWidget( mPanner ); | 284 | QWidget *rightBox = new QWidget( mPanner ); |
284 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 285 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
@@ -298,32 +299,33 @@ void CalendarView::init() | |||
298 | QBoxLayout * leftFrameLayout; | 299 | QBoxLayout * leftFrameLayout; |
299 | if ( KOPrefs::instance()->mVerticalScreen ) { | 300 | if ( KOPrefs::instance()->mVerticalScreen ) { |
300 | mainBoxLayout = new QVBoxLayout(mainBox); | 301 | mainBoxLayout = new QVBoxLayout(mainBox); |
301 | leftFrameLayout = new QHBoxLayout(leftFrame ); | 302 | leftFrameLayout = new QHBoxLayout(leftFrame ); |
302 | } else { | 303 | } else { |
303 | mainBoxLayout = new QHBoxLayout(mainBox); | 304 | mainBoxLayout = new QHBoxLayout(mainBox); |
304 | leftFrameLayout = new QVBoxLayout(leftFrame ); | 305 | leftFrameLayout = new QVBoxLayout(leftFrame ); |
305 | } | 306 | } |
306 | topLayout->addWidget( mainBox ); | 307 | topLayout->addWidget( mainBox ); |
307 | mainBoxLayout->addWidget (leftFrame); | 308 | mainBoxLayout->addWidget (leftFrame); |
308 | mDateNavigator = new KDateNavigator(leftFrame, mCalendar, TRUE, | 309 | mDateNavigator = new KDateNavigator(leftFrame, mCalendar, TRUE, |
309 | "CalendarView::DateNavigator", QDate::currentDate()); | 310 | "CalendarView::DateNavigator", QDate::currentDate()); |
310 | // mDateNavigator->blockSignals( true ); | 311 | // mDateNavigator->blockSignals( true ); |
311 | leftFrameLayout->addWidget( mDateNavigator ); | 312 | leftFrameLayout->addWidget( mDateNavigator ); |
312 | mFilterView = new KOFilterView(&mFilters,leftFrame,"CalendarView::FilterView"); | 313 | mFilterView = new KOFilterView(&mFilters,leftFrame,"CalendarView::FilterView"); |
313 | mTodoList = new KOTodoView(mCalendar, leftFrame, "todolistsmall"); | 314 | mTodoList = new KOTodoView(mCalendar, leftFrame, "todolistsmall"); |
315 | mTodoList->setNavigator( mNavigator ); | ||
314 | 316 | ||
315 | if ( QApplication::desktop()->width() < 480 ) { | 317 | if ( QApplication::desktop()->width() < 480 ) { |
316 | leftFrameLayout->addWidget(mFilterView); | 318 | leftFrameLayout->addWidget(mFilterView); |
317 | leftFrameLayout->addWidget(mTodoList, 2 ); | 319 | leftFrameLayout->addWidget(mTodoList, 2 ); |
318 | 320 | ||
319 | } else { | 321 | } else { |
320 | leftFrameLayout->addWidget(mTodoList,2 ); | 322 | leftFrameLayout->addWidget(mTodoList,2 ); |
321 | leftFrameLayout->addWidget(mFilterView ); | 323 | leftFrameLayout->addWidget(mFilterView ); |
322 | } | 324 | } |
323 | mFilterView->hide(); | 325 | mFilterView->hide(); |
324 | QWidget *rightBox = new QWidget( mainBox ); | 326 | QWidget *rightBox = new QWidget( mainBox ); |
325 | mainBoxLayout->addWidget ( rightBox, 10 ); | 327 | mainBoxLayout->addWidget ( rightBox, 10 ); |
326 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 328 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
327 | mNavigatorBar = new NavigatorBar( QDate::currentDate(), rightBox, "useBigPixmaps" ); | 329 | mNavigatorBar = new NavigatorBar( QDate::currentDate(), rightBox, "useBigPixmaps" ); |
328 | mRightFrame = new QWidgetStack( rightBox ); | 330 | mRightFrame = new QWidgetStack( rightBox ); |
329 | rightLayout->addWidget( mNavigatorBar ); | 331 | rightLayout->addWidget( mNavigatorBar ); |
@@ -2131,32 +2133,34 @@ void CalendarView::updateTodoViews() | |||
2131 | } | 2133 | } |
2132 | 2134 | ||
2133 | 2135 | ||
2134 | void CalendarView::updateView(const QDate &start, const QDate &end) | 2136 | void CalendarView::updateView(const QDate &start, const QDate &end) |
2135 | { | 2137 | { |
2136 | mTodoList->updateView(); | 2138 | mTodoList->updateView(); |
2137 | mViewManager->updateView(start, end); | 2139 | mViewManager->updateView(start, end); |
2138 | //mDateNavigator->updateView(); | 2140 | //mDateNavigator->updateView(); |
2139 | } | 2141 | } |
2140 | 2142 | ||
2141 | void CalendarView::updateView() | 2143 | void CalendarView::updateView() |
2142 | { | 2144 | { |
2143 | DateList tmpList = mNavigator->selectedDates(); | 2145 | DateList tmpList = mNavigator->selectedDates(); |
2144 | 2146 | ||
2145 | // We assume that the navigator only selects consecutive days. | 2147 | // We assume that the navigator only selects consecutive days. |
2146 | updateView( tmpList.first(), tmpList.last() ); | 2148 | updateView( tmpList.first(), tmpList.last() ); |
2149 | if ( KOPrefs::instance()->mHideNonStartedTodos ) | ||
2150 | mTodoList->updateView(); | ||
2147 | } | 2151 | } |
2148 | 2152 | ||
2149 | void CalendarView::updateUnmanagedViews() | 2153 | void CalendarView::updateUnmanagedViews() |
2150 | { | 2154 | { |
2151 | mDateNavigator->updateDayMatrix(); | 2155 | mDateNavigator->updateDayMatrix(); |
2152 | } | 2156 | } |
2153 | 2157 | ||
2154 | int CalendarView::msgItemDelete() | 2158 | int CalendarView::msgItemDelete() |
2155 | { | 2159 | { |
2156 | return KMessageBox::warningContinueCancel(this, | 2160 | return KMessageBox::warningContinueCancel(this, |
2157 | i18n("This item will be\npermanently deleted."), | 2161 | i18n("This item will be\npermanently deleted."), |
2158 | i18n("KO/Pi Confirmation"),i18n("Delete")); | 2162 | i18n("KO/Pi Confirmation"),i18n("Delete")); |
2159 | } | 2163 | } |
2160 | 2164 | ||
2161 | 2165 | ||
2162 | void CalendarView::edit_cut() | 2166 | void CalendarView::edit_cut() |