-rw-r--r-- | korganizer/koagendaview.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 1908b1c..36c66ea 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -382,99 +382,100 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
382 | 382 | ||
383 | mAllDayFrame = new QHBox(mSplitterAgenda); | 383 | mAllDayFrame = new QHBox(mSplitterAgenda); |
384 | 384 | ||
385 | QWidget *agendaFrame = new QWidget(mSplitterAgenda); | 385 | QWidget *agendaFrame = new QWidget(mSplitterAgenda); |
386 | #else | 386 | #else |
387 | #if 0 | 387 | #if 0 |
388 | QWidget *mainBox = new QWidget( this ); | 388 | QWidget *mainBox = new QWidget( this ); |
389 | topLayout->addWidget( mainBox ); | 389 | topLayout->addWidget( mainBox ); |
390 | QBoxLayout *mainLayout = new QVBoxLayout(mainBox); | 390 | QBoxLayout *mainLayout = new QVBoxLayout(mainBox); |
391 | mAllDayFrame = new QHBox(mainBox); | 391 | mAllDayFrame = new QHBox(mainBox); |
392 | mainLayout->addWidget(mAllDayFrame); | 392 | mainLayout->addWidget(mAllDayFrame); |
393 | mainLayout->setStretchFactor( mAllDayFrame, 0 ); | 393 | mainLayout->setStretchFactor( mAllDayFrame, 0 ); |
394 | mAllDayFrame->setFocusPolicy(NoFocus); | 394 | mAllDayFrame->setFocusPolicy(NoFocus); |
395 | QWidget *agendaFrame = new QWidget(mainBox); | 395 | QWidget *agendaFrame = new QWidget(mainBox); |
396 | mainLayout->addWidget(agendaFrame); | 396 | mainLayout->addWidget(agendaFrame); |
397 | mainLayout->setStretchFactor( agendaFrame, 10 ); | 397 | mainLayout->setStretchFactor( agendaFrame, 10 ); |
398 | 398 | ||
399 | agendaFrame->setFocusPolicy(NoFocus); | 399 | agendaFrame->setFocusPolicy(NoFocus); |
400 | #endif | 400 | #endif |
401 | mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); | 401 | mSplitterAgenda = new KDGanttMinimizeSplitter( Qt::Vertical, this); |
402 | mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); | 402 | mSplitterAgenda->setMinimizeDirection ( KDGanttMinimizeSplitter::Up ); |
403 | topLayout->addWidget( mSplitterAgenda ); | 403 | topLayout->addWidget( mSplitterAgenda ); |
404 | mAllDayFrame = new QHBox(mSplitterAgenda); | 404 | mAllDayFrame = new QHBox(mSplitterAgenda); |
405 | mAllDayFrame->setFocusPolicy(NoFocus); | 405 | mAllDayFrame->setFocusPolicy(NoFocus); |
406 | QWidget *agendaFrame = new QWidget(mSplitterAgenda); | 406 | QWidget *agendaFrame = new QWidget(mSplitterAgenda); |
407 | agendaFrame->setFocusPolicy(NoFocus); | 407 | agendaFrame->setFocusPolicy(NoFocus); |
408 | 408 | ||
409 | #endif | 409 | #endif |
410 | 410 | ||
411 | // Create all-day agenda widget | 411 | // Create all-day agenda widget |
412 | mDummyAllDayLeft = new QVBox( mAllDayFrame ); | 412 | mDummyAllDayLeft = new QVBox( mAllDayFrame ); |
413 | 413 | ||
414 | mExpandButton = new QPushButton(mDummyAllDayLeft); | 414 | mExpandButton = new QPushButton(mDummyAllDayLeft); |
415 | mExpandButton->setPixmap( mNotExpandedPixmap ); | 415 | mExpandButton->setPixmap( mNotExpandedPixmap ); |
416 | int widebut = mExpandButton->sizeHint().width(); | 416 | int widebut = mExpandButton->sizeHint().width(); |
417 | if ( QApplication::desktop()->width() < 480 ) | 417 | if ( QApplication::desktop()->width() < 480 ) |
418 | widebut = widebut*2; | 418 | widebut = widebut*2; |
419 | else | 419 | else |
420 | widebut = (widebut*3) / 2; | 420 | widebut = (widebut*3) / 2; |
421 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, | 421 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, |
422 | // QSizePolicy::Fixed ) ); | 422 | // QSizePolicy::Fixed ) ); |
423 | mExpandButton->setFixedSize( widebut, widebut); | 423 | mExpandButton->setFixedSize( widebut, widebut); |
424 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); | 424 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); |
425 | mExpandButton->setFocusPolicy(NoFocus); | 425 | mExpandButton->setFocusPolicy(NoFocus); |
426 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); | 426 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); |
427 | mAllDayAgenda->setFocusPolicy(NoFocus); | 427 | mAllDayAgenda->setFocusPolicy(NoFocus); |
428 | QVBox *dummyAllDayRight = new QVBox(mAllDayFrame); | 428 | QVBox *dummyAllDayRight = new QVBox(mAllDayFrame); |
429 | 429 | ||
430 | QPushButton *dummyAllDayRightB = new QPushButton(dummyAllDayRight); | ||
431 | mDummyAllDayRightL = new QLabel ( dummyAllDayRight ); | 430 | mDummyAllDayRightL = new QLabel ( dummyAllDayRight ); |
432 | 431 | QPushButton *dummyAllDayRightB = new QPushButton(dummyAllDayRight); | |
432 | new QLabel ( dummyAllDayRight ); | ||
433 | mDummyAllDayRightL->setSizePolicy( QSizePolicy( QSizePolicy::Minimum,QSizePolicy::Fixed ) ); | ||
433 | dummyAllDayRightB->setFlat( true ); | 434 | dummyAllDayRightB->setFlat( true ); |
434 | dummyAllDayRightB->setFocusPolicy(NoFocus); | 435 | dummyAllDayRightB->setFocusPolicy(NoFocus); |
435 | dummyAllDayRightB->setFixedHeight( (dummyAllDayRightB->sizeHint().height()/4)*3 ); | 436 | dummyAllDayRightB->setFixedHeight( (dummyAllDayRightB->sizeHint().height()/4)*3 ); |
436 | 437 | ||
437 | QPopupMenu * wpo = new QPopupMenu (this); | 438 | QPopupMenu * wpo = new QPopupMenu (this); |
438 | QPopupMenu * all = new QPopupMenu (this); | 439 | QPopupMenu * all = new QPopupMenu (this); |
439 | //wpo->insertItem( i18n("W#"), 0 ); | 440 | //wpo->insertItem( i18n("W#"), 0 ); |
440 | int first = 1; | 441 | int first = 1; |
441 | int i; | 442 | int i; |
442 | for ( i = 1; i < 50; ++i ) { | 443 | for ( i = 1; i < 50; ++i ) { |
443 | if ( !(i%10) ) { | 444 | if ( !(i%10) ) { |
444 | all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo ); | 445 | all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo ); |
445 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); | 446 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); |
446 | first = i; | 447 | first = i; |
447 | wpo = new QPopupMenu (this); | 448 | wpo = new QPopupMenu (this); |
448 | } | 449 | } |
449 | wpo->insertItem( QString::number(i), i ); | 450 | wpo->insertItem( QString::number(i), i ); |
450 | } | 451 | } |
451 | for ( i = 50; i < 53; ++i ) { | 452 | for ( i = 50; i < 53; ++i ) { |
452 | wpo->insertItem( QString::number(i), i); | 453 | wpo->insertItem( QString::number(i), i); |
453 | } | 454 | } |
454 | all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo ); | 455 | all->insertItem( i18n("Select week %1-%2" ).arg(first).arg( i-1) ,wpo ); |
455 | dummyAllDayRightB->setPopup( all ); | 456 | dummyAllDayRightB->setPopup( all ); |
456 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); | 457 | connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); |
457 | 458 | ||
458 | // Create event context menu for all day agenda | 459 | // Create event context menu for all day agenda |
459 | mAllDayAgendaPopup = eventPopup(); | 460 | mAllDayAgendaPopup = eventPopup(); |
460 | connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), | 461 | connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), |
461 | mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); | 462 | mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); |
462 | 463 | ||
463 | // Create agenda frame | 464 | // Create agenda frame |
464 | QGridLayout *agendaLayout = new QGridLayout(agendaFrame,3,3); | 465 | QGridLayout *agendaLayout = new QGridLayout(agendaFrame,3,3); |
465 | // QHBox *agendaFrame = new QHBox(splitterAgenda); | 466 | // QHBox *agendaFrame = new QHBox(splitterAgenda); |
466 | 467 | ||
467 | // create event indicator bars | 468 | // create event indicator bars |
468 | mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); | 469 | mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); |
469 | agendaLayout->addWidget(mEventIndicatorTop,0,1); | 470 | agendaLayout->addWidget(mEventIndicatorTop,0,1); |
470 | mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); | 471 | mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); |
471 | mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom, | 472 | mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom, |
472 | agendaFrame); | 473 | agendaFrame); |
473 | agendaLayout->addWidget(mEventIndicatorBottom,2,1); | 474 | agendaLayout->addWidget(mEventIndicatorBottom,2,1); |
474 | QWidget *dummyAgendaRight = new QWidget(agendaFrame); | 475 | QWidget *dummyAgendaRight = new QWidget(agendaFrame); |
475 | agendaLayout->addWidget(dummyAgendaRight,0,2); | 476 | agendaLayout->addWidget(dummyAgendaRight,0,2); |
476 | 477 | ||
477 | // Create time labels | 478 | // Create time labels |
478 | mTimeLabels = new TimeLabels(24,agendaFrame); | 479 | mTimeLabels = new TimeLabels(24,agendaFrame); |
479 | agendaLayout->addWidget(mTimeLabels,1,0); | 480 | agendaLayout->addWidget(mTimeLabels,1,0); |
480 | connect(mTimeLabels,SIGNAL( scaleChanged()), | 481 | connect(mTimeLabels,SIGNAL( scaleChanged()), |