-rw-r--r-- | korganizer/calendarview.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 90b36ac..8100e25 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -269,96 +269,97 @@ void CalendarView::init() | |||
269 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); | 269 | mPanner->setResizeMode(mLeftSplitter,QSplitter::KeepSize); |
270 | 270 | ||
271 | mDateNavigator = new DateNavigatorContainer( mLeftSplitter, | 271 | mDateNavigator = new DateNavigatorContainer( mLeftSplitter, |
272 | "CalendarView::DateNavigator" ); | 272 | "CalendarView::DateNavigator" ); |
273 | 273 | ||
274 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); | 274 | mLeftSplitter->setResizeMode(mDateNavigator,QSplitter::KeepSize); |
275 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); | 275 | mTodoList = new KOTodoView(mCalendar, mLeftSplitter, "todolist_small2"); |
276 | mTodoList->setNavigator( mNavigator ); | 276 | mTodoList->setNavigator( mNavigator ); |
277 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); | 277 | mFilterView = new KOFilterView(&mFilters,mLeftSplitter,"CalendarView::FilterView"); |
278 | 278 | ||
279 | #ifdef KORG_NORESOURCEVIEW | 279 | #ifdef KORG_NORESOURCEVIEW |
280 | mResourceView = 0; | 280 | mResourceView = 0; |
281 | #else | 281 | #else |
282 | if ( mResourceManager ) { | 282 | if ( mResourceManager ) { |
283 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); | 283 | mResourceView = new ResourceView( mResourceManager, mLeftSplitter ); |
284 | mResourceView->updateView(); | 284 | mResourceView->updateView(); |
285 | connect( mResourceView, SIGNAL( resourcesChanged() ), | 285 | connect( mResourceView, SIGNAL( resourcesChanged() ), |
286 | SLOT( updateView() ) ); | 286 | SLOT( updateView() ) ); |
287 | } else { | 287 | } else { |
288 | mResourceView = 0; | 288 | mResourceView = 0; |
289 | } | 289 | } |
290 | #endif | 290 | #endif |
291 | QWidget *rightBox = new QWidget( mPanner ); | 291 | QWidget *rightBox = new QWidget( mPanner ); |
292 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 292 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
293 | 293 | ||
294 | mRightFrame = new QWidgetStack( rightBox ); | 294 | mRightFrame = new QWidgetStack( rightBox ); |
295 | rightLayout->addWidget( mRightFrame, 1 ); | 295 | rightLayout->addWidget( mRightFrame, 1 ); |
296 | 296 | ||
297 | mLeftFrame = mLeftSplitter; | 297 | mLeftFrame = mLeftSplitter; |
298 | #else | 298 | #else |
299 | //QWidget *mainBox = new QWidget( this ); | 299 | //QWidget *mainBox = new QWidget( this ); |
300 | //QWidget *leftFrame = new QWidget( mainBox ); | 300 | //QWidget *leftFrame = new QWidget( mainBox ); |
301 | //QBoxLayout * mainBoxLayout; | 301 | //QBoxLayout * mainBoxLayout; |
302 | if ( KOPrefs::instance()->mVerticalScreen ) { | 302 | if ( KOPrefs::instance()->mVerticalScreen ) { |
303 | //mainBoxLayout = new QVBoxLayout(mainBox); | 303 | //mainBoxLayout = new QVBoxLayout(mainBox); |
304 | //leftFrameLayout = new QHBoxLayout(leftFrame ); | 304 | //leftFrameLayout = new QHBoxLayout(leftFrame ); |
305 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); | 305 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Vertical, this ); |
306 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 306 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
307 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; | 307 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, mMainFrame);; |
308 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); | 308 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Right ); |
309 | } else { | 309 | } else { |
310 | //mainBoxLayout = new QHBoxLayout(mainBox); | 310 | //mainBoxLayout = new QHBoxLayout(mainBox); |
311 | //leftFrameLayout = new QVBoxLayout(leftFrame ); | 311 | //leftFrameLayout = new QVBoxLayout(leftFrame ); |
312 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); | 312 | mMainFrame = new KDGanttMinimizeSplitter( Qt::Horizontal, this); |
313 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); | 313 | mMainFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Left); |
314 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); | 314 | mLeftFrame = new KDGanttMinimizeSplitter( Qt::Vertical, mMainFrame); |
315 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 315 | mLeftFrame->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
316 | } | 316 | } |
317 | mMainFrame->setSizePolicy( QSizePolicy (QSizePolicy::Expanding,QSizePolicy::Expanding) ); | ||
317 | //QBoxLayout * leftFrameLayout; | 318 | //QBoxLayout * leftFrameLayout; |
318 | topLayout->addWidget( mMainFrame ); | 319 | topLayout->addWidget( mMainFrame ); |
319 | //mainBoxLayout->addWidget (mLeftFrame); | 320 | //mainBoxLayout->addWidget (mLeftFrame); |
320 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, | 321 | mDateNavigator = new DateNavigatorContainer( mLeftFrame, |
321 | "CalendarView::DateNavigator" ); | 322 | "CalendarView::DateNavigator" ); |
322 | #if 0 | 323 | #if 0 |
323 | // FIXME | 324 | // FIXME |
324 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, | 325 | mDateNavigator = new KDateNavigator(mLeftFrame, mCalendar, TRUE, |
325 | "CalendarView::DateNavigator", QDate::currentDate()); | 326 | "CalendarView::DateNavigator", QDate::currentDate()); |
326 | #endif | 327 | #endif |
327 | // mDateNavigator->blockSignals( true ); | 328 | // mDateNavigator->blockSignals( true ); |
328 | //leftFrameLayout->addWidget( mDateNavigator ); | 329 | //leftFrameLayout->addWidget( mDateNavigator ); |
329 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); | 330 | mTodoList = new KOTodoView(mCalendar, mLeftFrame, "todolistsmall"); |
330 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); | 331 | mFilterView = new KOFilterView(&mFilters,mLeftFrame,"CalendarView::FilterView"); |
331 | mTodoList->setNavigator( mNavigator ); | 332 | mTodoList->setNavigator( mNavigator ); |
332 | #if 0 | 333 | #if 0 |
333 | if ( QApplication::desktop()->width() < 480 ) { | 334 | if ( QApplication::desktop()->width() < 480 ) { |
334 | leftFrameLayout->addWidget(mFilterView); | 335 | leftFrameLayout->addWidget(mFilterView); |
335 | leftFrameLayout->addWidget(mTodoList, 2 ); | 336 | leftFrameLayout->addWidget(mTodoList, 2 ); |
336 | 337 | ||
337 | } else { | 338 | } else { |
338 | leftFrameLayout->addWidget(mTodoList,2 ); | 339 | leftFrameLayout->addWidget(mTodoList,2 ); |
339 | leftFrameLayout->addWidget(mFilterView ); | 340 | leftFrameLayout->addWidget(mFilterView ); |
340 | } | 341 | } |
341 | #endif | 342 | #endif |
342 | mFilterView->hide(); | 343 | mFilterView->hide(); |
343 | QWidget *rightBox = new QWidget( mMainFrame ); | 344 | QWidget *rightBox = new QWidget( mMainFrame ); |
344 | //mainBoxLayout->addWidget ( rightBox, 10 ); | 345 | //mainBoxLayout->addWidget ( rightBox, 10 ); |
345 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 346 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
346 | mRightFrame = new QWidgetStack( rightBox ); | 347 | mRightFrame = new QWidgetStack( rightBox ); |
347 | rightLayout->addWidget( mRightFrame, 10 ); | 348 | rightLayout->addWidget( mRightFrame, 10 ); |
348 | 349 | ||
349 | //mLeftFrame = (QWidget *)leftFrame; | 350 | //mLeftFrame = (QWidget *)leftFrame; |
350 | if ( KOPrefs::instance()->mVerticalScreen ) { | 351 | if ( KOPrefs::instance()->mVerticalScreen ) { |
351 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); | 352 | //mDateNavigator->setFixedHeight( mDateNavigator->sizeHint().height() ); |
352 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); | 353 | //mDateNavigator->setMinimumWidth( mDateNavigator->sizeHint().width() ); |
353 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); | 354 | //mTodoList->setFixedHeight( mDateNavigator->sizeHint().height() ); |
354 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); | 355 | //leftFrame->setFixedHeight( mDateNavigator->sizeHint().height() ); |
355 | } else { | 356 | } else { |
356 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); | 357 | //mDateNavigator->setFixedWidth( mDateNavigator->sizeHint().width() ); |
357 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); | 358 | //mTodoList->setFixedWidth( mDateNavigator->sizeHint().width() ); |
358 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); | 359 | //leftFrame->setFixedWidth( mDateNavigator->sizeHint().width() ); |
359 | } | 360 | } |
360 | if ( !KOPrefs::instance()->mShowDateNavigator) | 361 | if ( !KOPrefs::instance()->mShowDateNavigator) |
361 | mDateNavigator->hide(); | 362 | mDateNavigator->hide(); |
362 | //qDebug("Calendarview Size %d %d ", width(), height()); | 363 | //qDebug("Calendarview Size %d %d ", width(), height()); |
363 | #endif | 364 | #endif |
364 | 365 | ||