summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-04-08 13:58:07 (UTC)
committer zautrix <zautrix>2005-04-08 13:58:07 (UTC)
commitc0f1d38e29ee0d0a1d1dcb5bda08089923926b41 (patch) (unidiff)
treea235fdef5d4b8b519bfd8141247993ba778b39b2 /korganizer
parent19a95939a6469ab5469f6904f57263a792598f07 (diff)
downloadkdepimpi-c0f1d38e29ee0d0a1d1dcb5bda08089923926b41.zip
kdepimpi-c0f1d38e29ee0d0a1d1dcb5bda08089923926b41.tar.gz
kdepimpi-c0f1d38e29ee0d0a1d1dcb5bda08089923926b41.tar.bz2
fix
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 20a5b74..76d5c4b 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -923,66 +923,73 @@ void KOAgendaView::updateConfig()
923 } 923 }
924 924
925 925
926 // update config for children 926 // update config for children
927 mTimeLabels->updateConfig(); 927 mTimeLabels->updateConfig();
928 mAgenda->storePosition(); 928 mAgenda->storePosition();
929 mAgenda->updateConfig(); 929 mAgenda->updateConfig();
930 mAllDayAgenda->updateConfig(); 930 mAllDayAgenda->updateConfig();
931 // widget synchronization 931 // widget synchronization
932 //TODO: find a better way, maybe signal/slot 932 //TODO: find a better way, maybe signal/slot
933 mTimeLabels->positionChanged(); 933 mTimeLabels->positionChanged();
934 934
935 // for some reason, this needs to be called explicitly 935 // for some reason, this needs to be called explicitly
936 mTimeLabels->repaint(); 936 mTimeLabels->repaint();
937 937
938 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width()); 938 mDummyAllDayLeft->setFixedWidth(mTimeLabels->width());
939 939
940 // ToolTips displaying summary of events 940 // ToolTips displaying summary of events
941 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance() 941 KOAgendaItem::toolTipGroup()->setEnabled(KOPrefs::instance()
942 ->mEnableToolTips); 942 ->mEnableToolTips);
943 943
944 //setHolidayMasks(); 944 //setHolidayMasks();
945 945
946 //createDayLabels(); called by via updateView(); 946 //createDayLabels(); called by via updateView();
947 mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth()); 947 mEventIndicatorTop->setXOffset(mTimeLabels->width() + mAgenda->frameWidth());
948 updateView(); 948 updateView();
949 mAgenda->restorePosition(); 949 mAgenda->restorePosition();
950} 950}
951 951
952 952
953void KOAgendaView::updateEventDates(KOAgendaItem *item, int type) 953void KOAgendaView::updateEventDates(KOAgendaItem *item, int type)
954{ 954{
955 // kdDebug() << "KOAgendaView::updateEventDates(): " << item->text() << endl; 955
956 //qDebug("KOAgendaView::updateEventDates "); 956
957 int xxx = item->cellX();
958 //qDebug("KOAgendaView::updateEventDates %d %d %d %d %d", xxx, mMinY.at(xxx),mMaxY.at(xxx),item->cellYTop(),item->cellYBottom() );
959 if ( mMinY.at(xxx) > item->cellYTop() )
960 mMinY.at(xxx) = item->cellYTop();
961 if ( mMaxY.at(xxx) < item->cellYBottom() )
962 mMaxY.at(xxx) = item->cellYBottom();
963
957 QDateTime startDt,endDt; 964 QDateTime startDt,endDt;
958 QDate startDate; 965 QDate startDate;
959 int lenInSecs; 966 int lenInSecs;
960 // if ( type == KOAgenda::RESIZETOP ) 967 // if ( type == KOAgenda::RESIZETOP )
961 // qDebug("RESIZETOP "); 968 // qDebug("RESIZETOP ");
962 // if ( type == KOAgenda::RESIZEBOTTOM ) 969 // if ( type == KOAgenda::RESIZEBOTTOM )
963 // qDebug("RESIZEBOTTOM "); 970 // qDebug("RESIZEBOTTOM ");
964 // if ( type == KOAgenda::MOVE ) 971 // if ( type == KOAgenda::MOVE )
965 // qDebug("MOVE "); 972 // qDebug("MOVE ");
966 if ( item->incidence()->type() == "Event" ) { 973 if ( item->incidence()->type() == "Event" ) {
967 startDt =item->incidence()->dtStart(); 974 startDt =item->incidence()->dtStart();
968 endDt = item->incidence()->dtEnd(); 975 endDt = item->incidence()->dtEnd();
969 lenInSecs = startDt.secsTo( endDt ); 976 lenInSecs = startDt.secsTo( endDt );
970 } 977 }
971 978
972 // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED ); 979 // emit incidenceItemChanged( item->incidence(), KOGlobals::EVENTEDITED );
973 980
974 if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) { 981 if ( item->incidence()->type()=="Todo" && item->mLastMoveXPos > 0 ) {
975 startDate = mSelectedDates[item->mLastMoveXPos]; 982 startDate = mSelectedDates[item->mLastMoveXPos];
976 } else { 983 } else {
977 if (item->cellX() < 0) { 984 if (item->cellX() < 0) {
978 startDate = (mSelectedDates.first()).addDays(item->cellX()); 985 startDate = (mSelectedDates.first()).addDays(item->cellX());
979 } else { 986 } else {
980 startDate = mSelectedDates[item->cellX()]; 987 startDate = mSelectedDates[item->cellX()];
981 } 988 }
982 } 989 }
983 startDt.setDate(startDate); 990 startDt.setDate(startDate);
984 991
985 if (item->incidence()->doesFloat()) { 992 if (item->incidence()->doesFloat()) {
986 endDt.setDate(startDate.addDays(item->cellWidth() - 1)); 993 endDt.setDate(startDate.addDays(item->cellWidth() - 1));
987 } else { 994 } else {
988 if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE ) 995 if ( type == KOAgenda::RESIZETOP || type == KOAgenda::MOVE )