summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
authorzautrix <zautrix>2005-02-02 15:21:26 (UTC)
committer zautrix <zautrix>2005-02-02 15:21:26 (UTC)
commitf94c5075fdd356c7a73b23150287034216ef0bdf (patch) (unidiff)
treede0cc9b2b2caf41f4c1d3a7a81de8579030abab3 /korganizer/koagendaview.cpp
parent66c1429e6d29331dac4182d2c42aaf1630916c7d (diff)
downloadkdepimpi-f94c5075fdd356c7a73b23150287034216ef0bdf.zip
kdepimpi-f94c5075fdd356c7a73b23150287034216ef0bdf.tar.gz
kdepimpi-f94c5075fdd356c7a73b23150287034216ef0bdf.tar.bz2
fihix
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index aed9bae..c018dc7 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -416,50 +416,54 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
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); 430 QPushButton *dummyAllDayRightB = new QPushButton(dummyAllDayRight);
431 QLabel * dummyAllDayRightL = new QLabel ( dummyAllDayRight ); 431 QLabel * dummyAllDayRightL = new QLabel ( dummyAllDayRight );
432 432
433 dummyAllDayRightB->setFlat( true ); 433 dummyAllDayRightB->setFlat( true );
434 dummyAllDayRightB->setFocusPolicy(NoFocus); 434 dummyAllDayRightB->setFocusPolicy(NoFocus);
435 // dummyAllDayRightB->setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding )); 435 // dummyAllDayRightB->setSizePolicy(QSizePolicy( QSizePolicy::Expanding ,QSizePolicy::Expanding ));
436 //dummyAllDayRightB->setFixedHeight( dummyAllDayRightB->sizeHint().height()/2 ); 436 //dummyAllDayRightB->setFixedHeight( dummyAllDayRightB->sizeHint().height()/2 );
437 QPopupMenu * wpo = new QPopupMenu (this); 437 QPopupMenu * wpo = new QPopupMenu (this);
438 wpo->insertItem( i18n("W#"), 0 ); 438 wpo->insertItem( i18n("W#"), 0 );
439 int i; 439 int i;
440 for ( i = 1; i < 54; i++ ) 440 for ( i = 1; i < 53; i++ )
441 wpo->insertItem( QString::number( i ),i ); 441 wpo->insertItem( QString::number( i ),i );
442 //Qt bug - we must add some empty fields...
443 for ( i = 53; i < 54; ++i ) {
444 wpo->insertItem( "", 52 );
445 }
442 dummyAllDayRightB->setPopup( wpo ); 446 dummyAllDayRightB->setPopup( wpo );
443 447
444 connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) ); 448 connect( wpo, SIGNAL( activated(int) ), SIGNAL( selectWeekNum ( int ) ) );
445 449
446 // Create event context menu for all day agenda 450 // Create event context menu for all day agenda
447 mAllDayAgendaPopup = eventPopup(); 451 mAllDayAgendaPopup = eventPopup();
448 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), 452 connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)),
449 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); 453 mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *)));
450 454
451 // Create agenda frame 455 // Create agenda frame
452 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,3,3); 456 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,3,3);
453 // QHBox *agendaFrame = new QHBox(splitterAgenda); 457 // QHBox *agendaFrame = new QHBox(splitterAgenda);
454 458
455 // create event indicator bars 459 // create event indicator bars
456 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); 460 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame);
457 agendaLayout->addWidget(mEventIndicatorTop,0,1); 461 agendaLayout->addWidget(mEventIndicatorTop,0,1);
458 mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); 462 mEventIndicatorTop->setPaintWidget( mSplitterAgenda );
459 mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom, 463 mEventIndicatorBottom = new EventIndicator(EventIndicator::Bottom,
460 agendaFrame); 464 agendaFrame);
461 agendaLayout->addWidget(mEventIndicatorBottom,2,1); 465 agendaLayout->addWidget(mEventIndicatorBottom,2,1);
462 QWidget *dummyAgendaRight = new QWidget(agendaFrame); 466 QWidget *dummyAgendaRight = new QWidget(agendaFrame);
463 agendaLayout->addWidget(dummyAgendaRight,0,2); 467 agendaLayout->addWidget(dummyAgendaRight,0,2);
464 468
465 // Create time labels 469 // Create time labels