author | zautrix <zautrix> | 2005-04-02 12:16:34 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-02 12:16:34 (UTC) |
commit | 997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe (patch) (unidiff) | |
tree | f788b37459574b5cea0d2ab874882c6a396c240d /korganizer/koagendaview.cpp | |
parent | e0d51120d2f0c178115746e0c1357af40f95bc77 (diff) | |
download | kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.zip kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.tar.gz kdepimpi-997e7660a81baa2b8aeb1b66a3cc3ebe54e00ebe.tar.bz2 |
more fixes
-rw-r--r-- | korganizer/koagendaview.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index 8d32152..95388ef 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -496,27 +496,25 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
496 | widebut = heibut ; | 496 | widebut = heibut ; |
497 | 497 | ||
498 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, | 498 | //mExpandButton->setSizePolicy( QSizePolicy( QSizePolicy::Fixed, |
499 | // QSizePolicy::Fixed ) ); | 499 | // QSizePolicy::Fixed ) ); |
500 | mExpandButton->setFixedSize( widebut, widebut); | 500 | mExpandButton->setFixedSize( widebut, widebut); |
501 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); | 501 | connect( mExpandButton, SIGNAL( clicked() ), SIGNAL( toggleExpand() ) ); |
502 | mExpandButton->setFocusPolicy(NoFocus); | 502 | mExpandButton->setFocusPolicy(NoFocus); |
503 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); | 503 | mAllDayAgenda = new KOAgenda(1,mAllDayFrame); |
504 | mAllDayAgenda->setFocusPolicy(NoFocus); | 504 | mAllDayAgenda->setFocusPolicy(NoFocus); |
505 | QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); | 505 | QLabel *dummyAllDayRight = new QLabel (mAllDayFrame); |
506 | 506 | ||
507 | // Create event context menu for all day agenda | 507 | // Create event context menu for all day agenda |
508 | mAllDayAgendaPopup = eventPopup(); | 508 | //mAllDayAgendaPopup = eventPopup(); |
509 | connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), | ||
510 | mAllDayAgendaPopup,SLOT(showIncidencePopup(Incidence *))); | ||
511 | 509 | ||
512 | // Create agenda frame | 510 | // Create agenda frame |
513 | QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); | 511 | QGridLayout *agendaLayout = new QGridLayout(agendaFrame,4,3); |
514 | // QHBox *agendaFrame = new QHBox(splitterAgenda); | 512 | // QHBox *agendaFrame = new QHBox(splitterAgenda); |
515 | 513 | ||
516 | // create event indicator bars | 514 | // create event indicator bars |
517 | mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); | 515 | mEventIndicatorTop = new EventIndicator(EventIndicator::Top,agendaFrame); |
518 | #ifndef DESKTOP_VERSION | 516 | #ifndef DESKTOP_VERSION |
519 | // FIX | 517 | // FIX |
520 | mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); | 518 | mEventIndicatorTop->setPaintWidget( mSplitterAgenda ); |
521 | #endif | 519 | #endif |
522 | mDayLabelsFrame = new QHBox(agendaFrame); | 520 | mDayLabelsFrame = new QHBox(agendaFrame); |
@@ -535,34 +533,38 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) : | |||
535 | // Create time labels | 533 | // Create time labels |
536 | mTimeLabels = new TimeLabels(24,agendaFrame); | 534 | mTimeLabels = new TimeLabels(24,agendaFrame); |
537 | agendaLayout->addWidget(mTimeLabels,2,0); | 535 | agendaLayout->addWidget(mTimeLabels,2,0); |
538 | connect(mTimeLabels,SIGNAL( scaleChanged()), | 536 | connect(mTimeLabels,SIGNAL( scaleChanged()), |
539 | this,SLOT(updateConfig())); | 537 | this,SLOT(updateConfig())); |
540 | 538 | ||
541 | // Create agenda | 539 | // Create agenda |
542 | mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame); | 540 | mAgenda = new KOAgenda(1,96,KOPrefs::instance()->mHourSize,agendaFrame); |
543 | agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); | 541 | agendaLayout->addMultiCellWidget(mAgenda,2,2,1,2); |
544 | agendaLayout->setColStretch(1,1); | 542 | agendaLayout->setColStretch(1,1); |
545 | mAgenda->setFocusPolicy(NoFocus); | 543 | mAgenda->setFocusPolicy(NoFocus); |
546 | // Create event context menu for agenda | 544 | // Create event context menu for agenda |
547 | mAgendaPopup = eventPopup(); | 545 | mAllAgendaPopup = eventPopup(); |
548 | 546 | ||
549 | mAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), | 547 | mAllAgendaPopup->addAdditionalItem(QIconSet(SmallIcon("bell")), |
550 | i18n("Toggle Alarm"),mAgenda, | 548 | i18n("Toggle Alarm"),mAgenda, |
551 | SLOT(popupAlarm()),true); | 549 | SLOT(popupAlarm()),true); |
552 | 550 | ||
553 | 551 | ||
554 | connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), | 552 | connect(mAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), |
555 | mAgendaPopup,SLOT(showIncidencePopup(Incidence *))); | 553 | mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); |
556 | 554 | ||
555 | connect(mAllDayAgenda,SIGNAL(showIncidencePopupSignal(Incidence *)), | ||
556 | mAllAgendaPopup,SLOT(showIncidencePopup(Incidence *))); | ||
557 | mAgenda->setPopup( mAllAgendaPopup ); | ||
558 | mAllDayAgenda->setPopup( mAllAgendaPopup ); | ||
557 | // make connections between dependent widgets | 559 | // make connections between dependent widgets |
558 | mTimeLabels->setAgenda(mAgenda); | 560 | mTimeLabels->setAgenda(mAgenda); |
559 | 561 | ||
560 | // Update widgets to reflect user preferences | 562 | // Update widgets to reflect user preferences |
561 | // updateConfig(); | 563 | // updateConfig(); |
562 | 564 | ||
563 | // createDayLabels(); | 565 | // createDayLabels(); |
564 | 566 | ||
565 | // these blank widgets make the All Day Event box line up with the agenda | 567 | // these blank widgets make the All Day Event box line up with the agenda |
566 | dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); | 568 | dummyAllDayRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); |
567 | dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); | 569 | dummyAgendaRight->setFixedWidth(mAgenda->verticalScrollBar()->width()); |
568 | mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); | 570 | mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); |
@@ -658,26 +660,26 @@ void KOAgendaView::addToCalSlot(Incidence * inc, Incidence * incOld ) | |||
658 | 660 | ||
659 | if ( incOld ) { | 661 | if ( incOld ) { |
660 | if ( incOld->type() == "Todo" ) | 662 | if ( incOld->type() == "Todo" ) |
661 | emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED ); | 663 | emit todoMoved((Todo*)incOld, KOGlobals::EVENTEDITED ); |
662 | else | 664 | else |
663 | emit incidenceChanged(incOld, KOGlobals::EVENTEDITED); | 665 | emit incidenceChanged(incOld, KOGlobals::EVENTEDITED); |
664 | } | 666 | } |
665 | 667 | ||
666 | } | 668 | } |
667 | 669 | ||
668 | KOAgendaView::~KOAgendaView() | 670 | KOAgendaView::~KOAgendaView() |
669 | { | 671 | { |
670 | delete mAgendaPopup; | 672 | delete mAllAgendaPopup; |
671 | delete mAllDayAgendaPopup; | 673 | //delete mAllDayAgendaPopup; |
672 | delete KOAgendaItem::paintPix(); | 674 | delete KOAgendaItem::paintPix(); |
673 | delete KOAgendaItem::paintPixSel(); | 675 | delete KOAgendaItem::paintPixSel(); |
674 | } | 676 | } |
675 | void KOAgendaView::resizeEvent( QResizeEvent* e ) | 677 | void KOAgendaView::resizeEvent( QResizeEvent* e ) |
676 | { | 678 | { |
677 | //qDebug("KOAgendaView::resizeEvent( QResizeEvent* e ) %d ", e->size().width()); | 679 | //qDebug("KOAgendaView::resizeEvent( QResizeEvent* e ) %d ", e->size().width()); |
678 | bool uc = false; | 680 | bool uc = false; |
679 | int ow = e->oldSize().width(); | 681 | int ow = e->oldSize().width(); |
680 | int oh = e->oldSize().height(); | 682 | int oh = e->oldSize().height(); |
681 | int w = e->size().width(); | 683 | int w = e->size().width(); |
682 | int h = e->size().height(); | 684 | int h = e->size().height(); |
683 | if ( (ow > oh && w< h ) || (ow < oh && w > h ) ) { | 685 | if ( (ow > oh && w< h ) || (ow < oh && w > h ) ) { |