-rw-r--r-- | korganizer/datenavigatorcontainer.cpp | 6 | ||||
-rw-r--r-- | korganizer/kdatenavigator.cpp | 0 | ||||
-rw-r--r-- | korganizer/kodaymatrix.cpp | 26 | ||||
-rw-r--r-- | korganizer/kodaymatrix.h | 1 |
4 files changed, 29 insertions, 4 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp index 92abae6..e57daa4 100644 --- a/korganizer/datenavigatorcontainer.cpp +++ b/korganizer/datenavigatorcontainer.cpp | |||
@@ -402,38 +402,42 @@ void DateNavigatorContainer::setBaseDates() | |||
402 | QDate baseDate = mNavigatorView->baseDate(); | 402 | QDate baseDate = mNavigatorView->baseDate(); |
403 | bool doRepaint = true; | 403 | bool doRepaint = true; |
404 | for( uint i = 0; i < mLastDisplayedDN; ++i ) { | 404 | for( uint i = 0; i < mLastDisplayedDN; ++i ) { |
405 | KDateNavigator *n = mExtraViews.at( i ); | 405 | KDateNavigator *n = mExtraViews.at( i ); |
406 | baseDate = baseDate.addDays( baseDate.daysInMonth () - baseDate.day() +1 ); | 406 | baseDate = baseDate.addDays( baseDate.daysInMonth () - baseDate.day() +1 ); |
407 | n->setBaseDate( baseDate, doRepaint ); | 407 | n->setBaseDate( baseDate, doRepaint ); |
408 | } | 408 | } |
409 | } | 409 | } |
410 | void DateNavigatorContainer::setResizeEnabled() | 410 | void DateNavigatorContainer::setResizeEnabled() |
411 | { | 411 | { |
412 | mResizeEnabled = true; | 412 | mResizeEnabled = true; |
413 | //qDebug("DateNavigatorContainer::setResizeEnabled "); | 413 | //qDebug("DateNavigatorContainer::setResizeEnabled "); |
414 | checkUpdateDayMatrixDates(); | 414 | checkUpdateDayMatrixDates(); |
415 | } | 415 | } |
416 | void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) | 416 | void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) |
417 | { | 417 | { |
418 | 418 | ||
419 | //qDebug("DateNavigatorContainer::resizeEvent %d %d ", width(), height()); | 419 | //qDebug("DateNavigatorContainer::resizeEvent %d %d ", width(), height()); |
420 | //qDebug("COUNT %d ", mExtraViews.count()); | 420 | //qDebug("COUNT %d ", mExtraViews.count()); |
421 | if ( ! mResizeEnabled ) { | 421 | if ( ! mResizeEnabled ) { |
422 | //qDebug("NOT ResizeEnabled"); | 422 | //qDebug("NOT ResizeEnabled"); |
423 | return; | 423 | return; |
424 | } | 424 | } |
425 | else | 425 | else |
426 | mUpdateTimer->start( 250 ); | 426 | #ifdef DESKTOP_VERSION |
427 | mUpdateTimer->start( 100 ); | ||
428 | #else | ||
429 | mUpdateTimer->start( 50 ); | ||
430 | #endif | ||
427 | 431 | ||
428 | //updateDayMatrixDates(); | 432 | //updateDayMatrixDates(); |
429 | } | 433 | } |
430 | 434 | ||
431 | QSize DateNavigatorContainer::minimumSizeHint() const | 435 | QSize DateNavigatorContainer::minimumSizeHint() const |
432 | { | 436 | { |
433 | return mNavigatorView->minimumSizeHint(); | 437 | return mNavigatorView->minimumSizeHint(); |
434 | } | 438 | } |
435 | 439 | ||
436 | QSize DateNavigatorContainer::sizeHint() const | 440 | QSize DateNavigatorContainer::sizeHint() const |
437 | { | 441 | { |
438 | return mNavigatorView->yourSizeHint(); | 442 | return mNavigatorView->yourSizeHint(); |
439 | } | 443 | } |
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp index 1d09f40..5aa1c9b 100644 --- a/korganizer/kdatenavigator.cpp +++ b/korganizer/kdatenavigator.cpp | |||
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp index 8affe50..c7e1b45 100644 --- a/korganizer/kodaymatrix.cpp +++ b/korganizer/kodaymatrix.cpp | |||
@@ -89,56 +89,59 @@ void DynamicTip::maybeTip( const QPoint &pos ) | |||
89 | // col << "][" << row << "] => " <<(col+row*7) << endl; | 89 | // col << "][" << row << "] => " <<(col+row*7) << endl; |
90 | 90 | ||
91 | //show holiday names only | 91 | //show holiday names only |
92 | QString str = matrix->getHolidayLabel(col+row*7); | 92 | QString str = matrix->getHolidayLabel(col+row*7); |
93 | if (str.isEmpty()) return; | 93 | if (str.isEmpty()) return; |
94 | tip(rct, str); | 94 | tip(rct, str); |
95 | } | 95 | } |
96 | 96 | ||
97 | 97 | ||
98 | // ============================================================================ | 98 | // ============================================================================ |
99 | // K O D A Y M A T R I X | 99 | // K O D A Y M A T R I X |
100 | // ============================================================================ | 100 | // ============================================================================ |
101 | 101 | ||
102 | const int KODayMatrix::NOSELECTION = -1000; | 102 | const int KODayMatrix::NOSELECTION = -1000; |
103 | const int KODayMatrix::NUMDAYS = 42; | 103 | const int KODayMatrix::NUMDAYS = 42; |
104 | 104 | ||
105 | KODayMatrix::KODayMatrix( QWidget *parent, const char *name ) | 105 | KODayMatrix::KODayMatrix( QWidget *parent, const char *name ) |
106 | : QFrame( parent, name , Qt::WRepaintNoErase ), mCalendar( 0 ) | 106 | : QFrame( parent, name , Qt::WRepaintNoErase ), mCalendar( 0 ) |
107 | 107 | ||
108 | #if 0 | 108 | #if 0 |
109 | KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) : | 109 | KODayMatrix::KODayMatrix(QWidget *parent, Calendar* calendar, QDate date, const char *name) : |
110 | QFrame(parent, name) | 110 | QFrame(parent, name) |
111 | #endif | 111 | #endif |
112 | { | 112 | { |
113 | oldW = 0; | ||
114 | oldH = 0; | ||
115 | myPix.resize( 150, 120 ); | ||
113 | mRedrawNeeded = true; | 116 | mRedrawNeeded = true; |
114 | mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); | 117 | mKODaymatrixWhatsThis = new KODaymatrixWhatsThis(this); |
115 | mPendingUpdateBeforeRepaint = false; | 118 | mPendingUpdateBeforeRepaint = false; |
116 | mouseDown = false; | 119 | mouseDown = false; |
117 | // initialize dynamic arrays | 120 | // initialize dynamic arrays |
118 | bDays.resize ( NUMDAYS ); | 121 | bDays.resize ( NUMDAYS ); |
119 | hDays.resize ( NUMDAYS );; | 122 | hDays.resize ( NUMDAYS ); |
120 | eDays.resize ( NUMDAYS );; | 123 | eDays.resize ( NUMDAYS ); |
121 | days = new QDate[NUMDAYS]; | 124 | days = new QDate[NUMDAYS]; |
122 | daylbls = new QString[NUMDAYS]; | 125 | daylbls = new QString[NUMDAYS]; |
123 | //events = new int[NUMDAYS]; | 126 | //events = new int[NUMDAYS]; |
124 | mToolTip = new DynamicTip(this); | 127 | mToolTip = new DynamicTip(this); |
125 | 128 | ||
126 | // set default values used for drawing the matrix | 129 | // set default values used for drawing the matrix |
127 | mDefaultBackColor = palette().active().base(); | 130 | mDefaultBackColor = palette().active().base(); |
128 | mDefaultTextColor = palette().active().foreground(); | 131 | mDefaultTextColor = palette().active().foreground(); |
129 | mDefaultTextColorShaded = getShadedColor(mDefaultTextColor); | 132 | mDefaultTextColorShaded = getShadedColor(mDefaultTextColor); |
130 | mHolidayColorShaded = getShadedColor(KOPrefs::instance()->mHolidayColor); | 133 | mHolidayColorShaded = getShadedColor(KOPrefs::instance()->mHolidayColor); |
131 | mSelectedDaysColor = QColor("white"); | 134 | mSelectedDaysColor = QColor("white"); |
132 | mTodayMarginWidth = 2; | 135 | mTodayMarginWidth = 2; |
133 | mSelEnd = mSelStart = NOSELECTION; | 136 | mSelEnd = mSelStart = NOSELECTION; |
134 | 137 | ||
135 | setAcceptDrops(true); | 138 | setAcceptDrops(true); |
136 | //setFont( QFont("Arial", 10) ); | 139 | //setFont( QFont("Arial", 10) ); |
137 | 140 | ||
138 | mUpdateTimer = new QTimer( this ); | 141 | mUpdateTimer = new QTimer( this ); |
139 | connect (mUpdateTimer ,SIGNAL(timeout()), this, SLOT ( updateViewTimed() )); | 142 | connect (mUpdateTimer ,SIGNAL(timeout()), this, SLOT ( updateViewTimed() )); |
140 | mRepaintTimer = new QTimer( this ); | 143 | mRepaintTimer = new QTimer( this ); |
141 | connect (mRepaintTimer ,SIGNAL(timeout()), this, SLOT ( repaintViewTimed() )); | 144 | connect (mRepaintTimer ,SIGNAL(timeout()), this, SLOT ( repaintViewTimed() )); |
142 | mDayChanged = false; | 145 | mDayChanged = false; |
143 | updateView(); | 146 | updateView(); |
144 | } | 147 | } |
@@ -314,48 +317,52 @@ void KODayMatrix::clearSelection() | |||
314 | void KODayMatrix::recalculateToday() | 317 | void KODayMatrix::recalculateToday() |
315 | { | 318 | { |
316 | today = -1; | 319 | today = -1; |
317 | for (int i=0; i<NUMDAYS; i++) { | 320 | for (int i=0; i<NUMDAYS; i++) { |
318 | //events[i] = 0; | 321 | //events[i] = 0; |
319 | days[i] = startdate.addDays(i); | 322 | days[i] = startdate.addDays(i); |
320 | daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] )); | 323 | daylbls[i] = QString::number( KOGlobals::self()->calendarSystem()->day( days[i] )); |
321 | 324 | ||
322 | // if today is in the currently displayed month, hilight today | 325 | // if today is in the currently displayed month, hilight today |
323 | if (days[i].year() == QDate::currentDate().year() && | 326 | if (days[i].year() == QDate::currentDate().year() && |
324 | days[i].month() == QDate::currentDate().month() && | 327 | days[i].month() == QDate::currentDate().month() && |
325 | days[i].day() == QDate::currentDate().day()) { | 328 | days[i].day() == QDate::currentDate().day()) { |
326 | today = i; | 329 | today = i; |
327 | } | 330 | } |
328 | } | 331 | } |
329 | // qDebug(QString("Today is visible at %1.").arg(today)); | 332 | // qDebug(QString("Today is visible at %1.").arg(today)); |
330 | } | 333 | } |
331 | 334 | ||
332 | void KODayMatrix::updateView() | 335 | void KODayMatrix::updateView() |
333 | { | 336 | { |
334 | updateView(startdate); | 337 | updateView(startdate); |
335 | } | 338 | } |
336 | void KODayMatrix::repaintViewTimed() | 339 | void KODayMatrix::repaintViewTimed() |
337 | { | 340 | { |
341 | mRedrawNeeded = true; | ||
342 | bDays.fill( false); | ||
343 | hDays.fill( false); | ||
344 | eDays.fill( false); | ||
338 | mRepaintTimer->stop(); | 345 | mRepaintTimer->stop(); |
339 | repaint(false); | 346 | repaint(false); |
340 | } | 347 | } |
341 | void KODayMatrix::updateViewTimed() | 348 | void KODayMatrix::updateViewTimed() |
342 | { | 349 | { |
343 | mUpdateTimer->stop(); | 350 | mUpdateTimer->stop(); |
344 | if ( !mCalendar ) { | 351 | if ( !mCalendar ) { |
345 | qDebug("NOT CAL "); | 352 | qDebug("NOT CAL "); |
346 | return; | 353 | return; |
347 | } | 354 | } |
348 | //qDebug("KODayMatrix::updateViewTimed "); | 355 | //qDebug("KODayMatrix::updateViewTimed "); |
349 | for(int i = 0; i < NUMDAYS; i++) { | 356 | for(int i = 0; i < NUMDAYS; i++) { |
350 | // if events are set for the day then remember to draw it bold | 357 | // if events are set for the day then remember to draw it bold |
351 | QPtrList<Event> eventlist = mCalendar->events(days[i]); | 358 | QPtrList<Event> eventlist = mCalendar->events(days[i]); |
352 | Event *event; | 359 | Event *event; |
353 | int numEvents = eventlist.count(); | 360 | int numEvents = eventlist.count(); |
354 | QString holiStr = ""; | 361 | QString holiStr = ""; |
355 | bDays.clearBit(i); | 362 | bDays.clearBit(i); |
356 | hDays.clearBit(i); | 363 | hDays.clearBit(i); |
357 | eDays.clearBit(i); | 364 | eDays.clearBit(i); |
358 | for(event=eventlist.first();event != 0;event=eventlist.next()) { | 365 | for(event=eventlist.first();event != 0;event=eventlist.next()) { |
359 | ushort recurType = event->recurrence()->doesRecur(); | 366 | ushort recurType = event->recurrence()->doesRecur(); |
360 | if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || | 367 | if ((recurType == Recurrence::rDaily && !KOPrefs::instance()->mDailyRecur) || |
361 | (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { | 368 | (recurType == Recurrence::rWeekly && !KOPrefs::instance()->mWeeklyRecur)) { |
@@ -662,52 +669,64 @@ void KODayMatrix::dropEvent(QDropEvent *e) | |||
662 | event->setDtEnd(end); | 669 | event->setDtEnd(end); |
663 | mCalendar->addEvent(event); | 670 | mCalendar->addEvent(event); |
664 | 671 | ||
665 | emit eventDropped(event); | 672 | emit eventDropped(event); |
666 | } else { | 673 | } else { |
667 | // kdDebug() << "KODayMatrix::dropEvent(): Event from drop not decodable" << endl; | 674 | // kdDebug() << "KODayMatrix::dropEvent(): Event from drop not decodable" << endl; |
668 | e->ignore(); | 675 | e->ignore(); |
669 | } | 676 | } |
670 | #endif | 677 | #endif |
671 | } | 678 | } |
672 | 679 | ||
673 | // ---------------------------------------------------------------------------- | 680 | // ---------------------------------------------------------------------------- |
674 | // P A I N T E V E N T H A N D L I N G | 681 | // P A I N T E V E N T H A N D L I N G |
675 | // ---------------------------------------------------------------------------- | 682 | // ---------------------------------------------------------------------------- |
676 | 683 | ||
677 | void KODayMatrix::paintEvent(QPaintEvent * pevent) | 684 | void KODayMatrix::paintEvent(QPaintEvent * pevent) |
678 | { | 685 | { |
679 | 686 | ||
680 | if ( width() <= 0 || height() <= 0 ) | 687 | if ( width() <= 0 || height() <= 0 ) |
681 | return; | 688 | return; |
682 | if ( mPendingUpdateBeforeRepaint ) { | 689 | if ( mPendingUpdateBeforeRepaint ) { |
683 | updateViewTimed(); | 690 | updateViewTimed(); |
684 | mPendingUpdateBeforeRepaint = false; | 691 | mPendingUpdateBeforeRepaint = false; |
685 | } | 692 | } |
693 | #if 0 | ||
686 | if ( myPix.width() != width() || myPix.height()!=height() ) { | 694 | if ( myPix.width() != width() || myPix.height()!=height() ) { |
687 | myPix.resize(size() ); | 695 | myPix.resize(size() ); |
688 | mRedrawNeeded = true; | 696 | mRedrawNeeded = true; |
689 | } | 697 | } |
698 | #endif | ||
699 | if ( oldW != width() || oldH !=height() ) | ||
700 | mRedrawNeeded = true; | ||
701 | |||
702 | oldH = height() ; | ||
703 | oldW = width(); | ||
704 | if ( myPix.width() < width() || myPix.height() < height() ) { | ||
705 | myPix.resize(size() ); | ||
706 | mRedrawNeeded = true; | ||
707 | |||
708 | } | ||
690 | 709 | ||
691 | if ( mRedrawNeeded ) { | 710 | if ( mRedrawNeeded ) { |
692 | //qDebug("REDRAW "); | 711 | //qDebug("REDRAW "); |
693 | QPainter p(&myPix); | 712 | QPainter p(&myPix); |
694 | p.setFont(font()); | 713 | p.setFont(font()); |
695 | 714 | ||
696 | 715 | ||
697 | int dheight = daysize.height(); | 716 | int dheight = daysize.height(); |
698 | int dwidth = daysize.width(); | 717 | int dwidth = daysize.width(); |
699 | int row,col; | 718 | int row,col; |
700 | int selw, selh; | 719 | int selw, selh; |
701 | int xyOff = frameWidth(); | 720 | int xyOff = frameWidth(); |
702 | int colModulo = (width()-2) % 7; | 721 | int colModulo = (width()-2) % 7; |
703 | int rowModulo = (height()-2) % 6; | 722 | int rowModulo = (height()-2) % 6; |
704 | //qDebug("col %d row %d ",colModulo,rowModulo ); | 723 | //qDebug("col %d row %d ",colModulo,rowModulo ); |
705 | 724 | ||
706 | bool isRTL = KOGlobals::self()->reverseLayout(); | 725 | bool isRTL = KOGlobals::self()->reverseLayout(); |
707 | 726 | ||
708 | // draw background and topleft frame | 727 | // draw background and topleft frame |
709 | p.fillRect(0,0,width(),height(), mDefaultBackColor); | 728 | p.fillRect(0,0,width(),height(), mDefaultBackColor); |
710 | p.setPen(mDefaultTextColor); | 729 | p.setPen(mDefaultTextColor); |
711 | p.drawRect(0, 0, width(), height()); | 730 | p.drawRect(0, 0, width(), height()); |
712 | int mSelStartT = mSelStart; | 731 | int mSelStartT = mSelStart; |
713 | int mSelEndT = mSelEnd; | 732 | int mSelEndT = mSelEnd; |
@@ -926,49 +945,50 @@ void KODayMatrix::paintEvent(QPaintEvent * pevent) | |||
926 | if ( row >= 6 - rowModulo ) | 945 | if ( row >= 6 - rowModulo ) |
927 | addRow = row - 5 + rowModulo; | 946 | addRow = row - 5 + rowModulo; |
928 | } | 947 | } |
929 | //qDebug("add %d %d -- %d %d ", col, addCol, row, addRow); | 948 | //qDebug("add %d %d -- %d %d ", col, addCol, row, addRow); |
930 | ++addCol;//++addCol; | 949 | ++addCol;//++addCol; |
931 | if ( row == 0) | 950 | if ( row == 0) |
932 | addRow = 1; | 951 | addRow = 1; |
933 | p.drawText(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight, | 952 | p.drawText(col*dwidth+addCol, row*dheight+addRow, dwidth, dheight, |
934 | Qt::AlignHCenter | Qt::AlignVCenter, daylbls[i]); | 953 | Qt::AlignHCenter | Qt::AlignVCenter, daylbls[i]); |
935 | 954 | ||
936 | // reset color to actual color | 955 | // reset color to actual color |
937 | if (!mHolidays[i].isNull()) { | 956 | if (!mHolidays[i].isNull()) { |
938 | p.setPen(actcol); | 957 | p.setPen(actcol); |
939 | } | 958 | } |
940 | // reset bold font to plain font | 959 | // reset bold font to plain font |
941 | if ( eDays.testBit(i)) { | 960 | if ( eDays.testBit(i)) { |
942 | QFont myFont = font(); | 961 | QFont myFont = font(); |
943 | myFont.setBold(false); | 962 | myFont.setBold(false); |
944 | p.setFont(myFont); | 963 | p.setFont(myFont); |
945 | } | 964 | } |
946 | } | 965 | } |
947 | } else { | 966 | } else { |
948 | //qDebug("NO redraw "); | 967 | //qDebug("NO redraw "); |
949 | } | 968 | } |
950 | bitBlt (this, 0, 0, &myPix, 0 ,0,width(), height() ,CopyROP); | 969 | |
970 | bitBlt (this, pevent->rect().topLeft(), &myPix , pevent->rect() ,CopyROP); | ||
951 | mRedrawNeeded = false; | 971 | mRedrawNeeded = false; |
952 | } | 972 | } |
953 | 973 | ||
954 | // ---------------------------------------------------------------------------- | 974 | // ---------------------------------------------------------------------------- |
955 | // R E SI Z E E V E N T H A N D L I N G | 975 | // R E SI Z E E V E N T H A N D L I N G |
956 | // ---------------------------------------------------------------------------- | 976 | // ---------------------------------------------------------------------------- |
957 | 977 | ||
958 | void KODayMatrix::resizeEvent(QResizeEvent *) | 978 | void KODayMatrix::resizeEvent(QResizeEvent *) |
959 | { | 979 | { |
960 | QRect sz = frameRect(); | 980 | QRect sz = frameRect(); |
961 | daysize.setHeight(sz.height()*7 / NUMDAYS); | 981 | daysize.setHeight(sz.height()*7 / NUMDAYS); |
962 | daysize.setWidth(sz.width() / 7); | 982 | daysize.setWidth(sz.width() / 7); |
963 | } | 983 | } |
964 | 984 | ||
965 | QSize KODayMatrix::sizeHint() const | 985 | QSize KODayMatrix::sizeHint() const |
966 | { | 986 | { |
967 | 987 | ||
968 | QFontMetrics fm ( font() ); | 988 | QFontMetrics fm ( font() ); |
969 | int wid = fm.width( "30") *7+3; | 989 | int wid = fm.width( "30") *7+3; |
970 | int hei = fm.height() * 6+3; | 990 | int hei = fm.height() * 6+3; |
971 | //qDebug("KODayMatrix::sizeHint()********************* %d %d", wid , hei); | 991 | //qDebug("KODayMatrix::sizeHint()********************* %d %d", wid , hei); |
972 | return QSize ( wid, hei ); | 992 | return QSize ( wid, hei ); |
973 | 993 | ||
974 | } | 994 | } |
diff --git a/korganizer/kodaymatrix.h b/korganizer/kodaymatrix.h index 731117c..d725ead 100644 --- a/korganizer/kodaymatrix.h +++ b/korganizer/kodaymatrix.h | |||
@@ -206,48 +206,49 @@ signals: | |||
206 | */ | 206 | */ |
207 | void eventDropped(Event *event); | 207 | void eventDropped(Event *event); |
208 | 208 | ||
209 | protected: | 209 | protected: |
210 | 210 | ||
211 | void paintEvent(QPaintEvent *ev); | 211 | void paintEvent(QPaintEvent *ev); |
212 | 212 | ||
213 | void mousePressEvent (QMouseEvent* e); | 213 | void mousePressEvent (QMouseEvent* e); |
214 | 214 | ||
215 | void mouseReleaseEvent (QMouseEvent* e); | 215 | void mouseReleaseEvent (QMouseEvent* e); |
216 | 216 | ||
217 | void mouseMoveEvent (QMouseEvent* e); | 217 | void mouseMoveEvent (QMouseEvent* e); |
218 | 218 | ||
219 | void dragEnterEvent(QDragEnterEvent *); | 219 | void dragEnterEvent(QDragEnterEvent *); |
220 | 220 | ||
221 | void dragMoveEvent(QDragMoveEvent *); | 221 | void dragMoveEvent(QDragMoveEvent *); |
222 | 222 | ||
223 | void dragLeaveEvent(QDragLeaveEvent *); | 223 | void dragLeaveEvent(QDragLeaveEvent *); |
224 | 224 | ||
225 | void dropEvent(QDropEvent *); | 225 | void dropEvent(QDropEvent *); |
226 | 226 | ||
227 | void resizeEvent(QResizeEvent *); | 227 | void resizeEvent(QResizeEvent *); |
228 | 228 | ||
229 | private: | 229 | private: |
230 | int oldW, oldH; | ||
230 | bool mRedrawNeeded; | 231 | bool mRedrawNeeded; |
231 | KODaymatrixWhatsThis* mKODaymatrixWhatsThis; | 232 | KODaymatrixWhatsThis* mKODaymatrixWhatsThis; |
232 | bool mouseDown; | 233 | bool mouseDown; |
233 | QBitArray bDays; | 234 | QBitArray bDays; |
234 | QBitArray hDays; | 235 | QBitArray hDays; |
235 | QBitArray eDays; | 236 | QBitArray eDays; |
236 | QPixmap myPix; | 237 | QPixmap myPix; |
237 | QTimer* mUpdateTimer; | 238 | QTimer* mUpdateTimer; |
238 | QTimer* mRepaintTimer; | 239 | QTimer* mRepaintTimer; |
239 | bool mDayChanged; | 240 | bool mDayChanged; |
240 | bool mPendingUpdateBeforeRepaint; | 241 | bool mPendingUpdateBeforeRepaint; |
241 | 242 | ||
242 | /** returns the index of the day located at the matrix's widget (x,y) position. | 243 | /** returns the index of the day located at the matrix's widget (x,y) position. |
243 | * | 244 | * |
244 | * @param x horizontal coordinate | 245 | * @param x horizontal coordinate |
245 | * @param y vertical coordinate | 246 | * @param y vertical coordinate |
246 | */ | 247 | */ |
247 | int getDayIndexFrom(int x, int y); | 248 | int getDayIndexFrom(int x, int y); |
248 | 249 | ||
249 | /** calculates a "shaded" color from the supplied color object. | 250 | /** calculates a "shaded" color from the supplied color object. |
250 | * (Copied from Cornelius's kdpdatebutton.cpp) | 251 | * (Copied from Cornelius's kdpdatebutton.cpp) |
251 | * | 252 | * |
252 | * @param color source based on which a shaded color should be calculated. | 253 | * @param color source based on which a shaded color should be calculated. |
253 | */ | 254 | */ |