summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
authorzautrix <zautrix>2005-04-17 12:17:07 (UTC)
committer zautrix <zautrix>2005-04-17 12:17:07 (UTC)
commit2d81c75c4ffb8f144ae58e90e68496500d07a19e (patch) (unidiff)
tree1b27958fdc2948c1235579029188b1de78d7b820 /korganizer/koagendaview.cpp
parentf64384edcc1e3b3f7511480866b0900aa1ebdda6 (diff)
downloadkdepimpi-2d81c75c4ffb8f144ae58e90e68496500d07a19e.zip
kdepimpi-2d81c75c4ffb8f144ae58e90e68496500d07a19e.tar.gz
kdepimpi-2d81c75c4ffb8f144ae58e90e68496500d07a19e.tar.bz2
fixx
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp20
1 files changed, 4 insertions, 16 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 17f791d..b43c40e 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -429,17 +429,16 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
429 429
430 // Create agenda frame 430 // Create agenda frame
431 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); 431 QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3);
432 // QHBox *agendaFrame = new QHBox(splitterAgenda); 432 // QHBox *agendaFrame = new QHBox(splitterAgenda);
433 433
434 // create event indicator bars 434 // create event indicator bars
435 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); 435 mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame);
436#ifndef DESKTOP_VERSION 436#ifndef DESKTOP_VERSION
437 // FIX
438 mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); 437 mEventIndicatorTop->setPaintWidget( mSplitterAgenda );
439#endif 438#endif
440 mDayLabelsFrame = new QHBox(agendaFrame); 439 mDayLabelsFrame = new QHBox(agendaFrame);
441 //topLayout->addWidget(mDayLabelsFrame); 440 //topLayout->addWidget(mDayLabelsFrame);
442 mDayLabels = new QFrame (mDayLabelsFrame); 441 mDayLabels = new QFrame (mDayLabelsFrame);
443 mLayoutDayLabels = new QHBoxLayout(mDayLabels); 442 mLayoutDayLabels = new QHBoxLayout(mDayLabels);
444 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2); 443 agendaLayout->addMultiCellWidget(mDayLabelsFrame ,0,0,0,2);
445 agendaLayout->addWidget(mEventIndicatorTop,1,1); 444 agendaLayout->addWidget(mEventIndicatorTop,1,1);
@@ -562,16 +561,18 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
562 SLOT( updateConfig( ) ) ); 561 SLOT( updateConfig( ) ) );
563 connect( mAgenda, SIGNAL( addToCalSignal(Incidence *, Incidence *) ), 562 connect( mAgenda, SIGNAL( addToCalSignal(Incidence *, Incidence *) ),
564 SLOT( addToCalSlot(Incidence *, Incidence * ) ) ); 563 SLOT( addToCalSlot(Incidence *, Incidence * ) ) );
565 connect( mAllDayAgenda, SIGNAL( addToCalSignal(Incidence * ,Incidence *) ), 564 connect( mAllDayAgenda, SIGNAL( addToCalSignal(Incidence * ,Incidence *) ),
566 SLOT( addToCalSlot(Incidence * , Incidence *) ) ); 565 SLOT( addToCalSlot(Incidence * , Incidence *) ) );
567 // connect( mAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); 566 // connect( mAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) );
568 //connect( mAllDayAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) ); 567 //connect( mAllDayAgenda, SIGNAL( cloneIncidenceSignal(Incidence *) ), SIGNAL( cloneIncidenceSignal(Incidence *) ) );
569 568
569 connect( mAllDayAgenda, SIGNAL( signalClearSelection() ),mAgenda, SLOT( slotClearSelection()) );
570 connect( mAgenda, SIGNAL( signalClearSelection() ),mAllDayAgenda, SLOT( slotClearSelection()) );
570 571
571} 572}
572 573
573void KOAgendaView::toggleAllDay() 574void KOAgendaView::toggleAllDay()
574{ 575{
575 if ( mSplitterAgenda->firstHandle() ) 576 if ( mSplitterAgenda->firstHandle() )
576 mSplitterAgenda->firstHandle()->toggle(); 577 mSplitterAgenda->firstHandle()->toggle();
577} 578}
@@ -720,21 +721,17 @@ void KOAgendaView::createDayLabels()
720 if ( !dayLabel ) { 721 if ( !dayLabel ) {
721 appendLabels = true; 722 appendLabels = true;
722 dayLabel = getNewDaylabel(); 723 dayLabel = getNewDaylabel();
723 } 724 }
724 dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() ); 725 dayLabel->setFixedWidth( mTimeLabels->width()+mAgenda->frameWidth() );
725 dayLabel->setFont( dlf ); 726 dayLabel->setFont( dlf );
726 dayLabel->setNum( -1 ); 727 dayLabel->setNum( -1 );
727 //dayLabel->setAlignment(QLabel::AlignHCenter); 728 //dayLabel->setAlignment(QLabel::AlignHCenter);
728#if 0 729
729 if ( QApplication::desktop()->width() <= 320 )
730 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ).left(2) );
731 else
732#endif
733 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) ); 730 dayLabel->setText( KOGlobals::self()->calendarSystem()->monthName( mSelectedDates.first(), true ) );
734 dayLabel->show(); 731 dayLabel->show();
735 DateList::ConstIterator dit; 732 DateList::ConstIterator dit;
736 bool oneday = (mSelectedDates.first() == mSelectedDates.last() ); 733 bool oneday = (mSelectedDates.first() == mSelectedDates.last() );
737 int counter = -1; 734 int counter = -1;
738 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) { 735 for( dit = mSelectedDates.begin(); dit != mSelectedDates.end(); ++dit ) {
739 ++counter; 736 ++counter;
740 QDate date = *dit; 737 QDate date = *dit;
@@ -1174,26 +1171,17 @@ void KOAgendaView::fillAgenda()
1174 if ( curCol-endX < 0 ) { 1171 if ( curCol-endX < 0 ) {
1175 mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol); 1172 mAllDayAgenda->insertAllDayItem(event,currentDate,0,curCol);
1176 } 1173 }
1177 } 1174 }
1178 } 1175 }
1179 } else { 1176 } else {
1180 mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol); 1177 mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol);
1181 } 1178 }
1182#if 0 1179
1183 if (beginX <= 0 && curCol == 0) {
1184 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1185 } else if (beginX == curCol) {
1186 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1187 } else {
1188 qDebug("skipped %d %d %d ",beginX , endX, curCol);
1189 }
1190#endif
1191 //mAllDayAgenda->insertAllDayItem(event,currentDate,curCol,curCol);
1192 } else { 1180 } else {
1193 if (beginX <= 0 && curCol == 0) { 1181 if (beginX <= 0 && curCol == 0) {
1194 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); 1182 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1195 } else if (beginX == curCol) { 1183 } else if (beginX == curCol) {
1196 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX); 1184 mAllDayAgenda->insertAllDayItem(event,currentDate,beginX,endX);
1197 } 1185 }
1198 } 1186 }
1199 } else if (event->isMultiDay()) { 1187 } else if (event->isMultiDay()) {