summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-03-21 13:08:02 (UTC)
committer zautrix <zautrix>2005-03-21 13:08:02 (UTC)
commit098a3c6dd844a880beb2851be53314613c3a038d (patch) (unidiff)
treebac6a915e906760c48b1756c5b0564b04def0b63
parentad4ecbb0cbf79f37140041eb9a14e71e6fd393f1 (diff)
downloadkdepimpi-098a3c6dd844a880beb2851be53314613c3a038d.zip
kdepimpi-098a3c6dd844a880beb2851be53314613c3a038d.tar.gz
kdepimpi-098a3c6dd844a880beb2851be53314613c3a038d.tar.bz2
fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/datenavigatorcontainer.cpp3
-rw-r--r--korganizer/kdatenavigator.cpp2
-rw-r--r--korganizer/kodaymatrix.cpp6
3 files changed, 6 insertions, 5 deletions
diff --git a/korganizer/datenavigatorcontainer.cpp b/korganizer/datenavigatorcontainer.cpp
index 5941337..d4173e8 100644
--- a/korganizer/datenavigatorcontainer.cpp
+++ b/korganizer/datenavigatorcontainer.cpp
@@ -151,25 +151,26 @@ void DateNavigatorContainer::setBaseDates()
151 } 151 }
152} 152}
153 153
154void DateNavigatorContainer::resizeEvent( QResizeEvent * e ) 154void DateNavigatorContainer::resizeEvent( QResizeEvent * e )
155{ 155{
156#if 0 156#if 0
157 kdDebug(5850) << "DateNavigatorContainer::resizeEvent()" << endl; 157 kdDebug(5850) << "DateNavigatorContainer::resizeEvent()" << endl;
158 kdDebug(5850) << " CURRENT SIZE: " << size() << endl; 158 kdDebug(5850) << " CURRENT SIZE: " << size() << endl;
159 kdDebug(5850) << " MINIMUM SIZEHINT: " << minimumSizeHint() << endl; 159 kdDebug(5850) << " MINIMUM SIZEHINT: " << minimumSizeHint() << endl;
160 kdDebug(5850) << " SIZEHINT: " << sizeHint() << endl; 160 kdDebug(5850) << " SIZEHINT: " << sizeHint() << endl;
161 kdDebug(5850) << " MINIMUM SIZE: " << minimumSize() << endl; 161 kdDebug(5850) << " MINIMUM SIZE: " << minimumSize() << endl;
162#endif 162#endif
163 QSize minSize = mNavigatorView->sizeHintTwoButtons(); 163 //QSize minSize = mNavigatorView->sizeHintTwoButtons();
164 QSize minSize = mNavigatorView->yourSizeHint();
164 165
165// kdDebug(5850) << " NAVIGATORVIEW minimumSizeHint: " << minSize << endl; 166// kdDebug(5850) << " NAVIGATORVIEW minimumSizeHint: " << minSize << endl;
166 167
167 int verticalCount = size().height() / minSize.height(); 168 int verticalCount = size().height() / minSize.height();
168 int horizontalCount = size().width() / minSize.width(); 169 int horizontalCount = size().width() / minSize.width();
169 //qDebug(" wattdatt %d new %d %d ", size().width() ,e->size().width() , minSize.width() ); 170 //qDebug(" wattdatt %d new %d %d ", size().width() ,e->size().width() , minSize.width() );
170 //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount ); 171 //qDebug("COUNT %d %d %d %d ", verticalCount, horizontalCount , mVerticalCount, mHorizontalCount );
171 bool fontchange = false; 172 bool fontchange = false;
172 QFont fo; 173 QFont fo;
173 if ( horizontalCount != mHorizontalCount || 174 if ( horizontalCount != mHorizontalCount ||
174 verticalCount != mVerticalCount ) { 175 verticalCount != mVerticalCount ) {
175 uint count = horizontalCount * verticalCount; 176 uint count = horizontalCount * verticalCount;
diff --git a/korganizer/kdatenavigator.cpp b/korganizer/kdatenavigator.cpp
index a5dbc5d..4b50b5a 100644
--- a/korganizer/kdatenavigator.cpp
+++ b/korganizer/kdatenavigator.cpp
@@ -106,25 +106,25 @@ KDateNavigator::KDateNavigator( QWidget *parent, const char *name )
106 106
107 connect( daymatrix, SIGNAL( selected( const KCal::DateList & ) ), 107 connect( daymatrix, SIGNAL( selected( const KCal::DateList & ) ),
108 SIGNAL( datesSelected( const KCal::DateList & ) ) ); 108 SIGNAL( datesSelected( const KCal::DateList & ) ) );
109 109
110 connect( daymatrix, SIGNAL( eventDropped( Event * ) ), 110 connect( daymatrix, SIGNAL( eventDropped( Event * ) ),
111 SIGNAL( eventDropped( Event * ) ) ); 111 SIGNAL( eventDropped( Event * ) ) );
112 112
113 topLayout->addMultiCellWidget(daymatrix,2,7,1,7); 113 topLayout->addMultiCellWidget(daymatrix,2,7,1,7);
114 114
115 // read settings from configuration file. 115 // read settings from configuration file.
116 updateConfig(); 116 updateConfig();
117 enableRollover(FollowMonth); 117 enableRollover(FollowMonth);
118 mySizeHint = sizeHint(); 118 mySizeHint = sizeHintTwoButtons();
119 mFontChanged = false; 119 mFontChanged = false;
120} 120}
121void KDateNavigator::changeFont ( QFont fo ) 121void KDateNavigator::changeFont ( QFont fo )
122{ 122{
123 setFont( fo ); 123 setFont( fo );
124 mNavigatorBar->resetFont( fo ); 124 mNavigatorBar->resetFont( fo );
125} 125}
126QFont KDateNavigator::yourFontHint( QSize si , bool *b) 126QFont KDateNavigator::yourFontHint( QSize si , bool *b)
127{ 127{
128 QFont fo = KOPrefs::instance()->mDateNavigatorFont; 128 QFont fo = KOPrefs::instance()->mDateNavigatorFont;
129 *b = false; 129 *b = false;
130 int fontPoint = fo.pointSize(); 130 int fontPoint = fo.pointSize();
diff --git a/korganizer/kodaymatrix.cpp b/korganizer/kodaymatrix.cpp
index 582b2ef..9baff20 100644
--- a/korganizer/kodaymatrix.cpp
+++ b/korganizer/kodaymatrix.cpp
@@ -436,35 +436,35 @@ void KODayMatrix::updateEvents()
436 ( recurType == Recurrence::rWeekly && 436 ( recurType == Recurrence::rWeekly &&
437 !KOPrefs::instance()->mWeeklyRecur ) ) { 437 !KOPrefs::instance()->mWeeklyRecur ) ) {
438 numEvents--; 438 numEvents--;
439 } 439 }
440 } 440 }
441 events[ i ] = numEvents; 441 events[ i ] = numEvents;
442 } 442 }
443} 443}
444 444
445const QDate& KODayMatrix::getDate(int offset) 445const QDate& KODayMatrix::getDate(int offset)
446{ 446{
447 if (offset < 0 || offset > NUMDAYS-1) { 447 if (offset < 0 || offset > NUMDAYS-1) {
448 qDebug("Wrong offset2 "); 448 qDebug("Wrong offset2 %d", offset);
449 return days[0]; 449 return days[0];
450 } 450 }
451 return days[offset]; 451 return days[offset];
452} 452}
453 453
454QString KODayMatrix::getHolidayLabel(int offset) 454QString KODayMatrix::getHolidayLabel(int offset)
455{ 455{
456 if (offset < 0 || offset > NUMDAYS-1) { 456 if (offset < 0 || offset > NUMDAYS-1) {
457 qDebug("Wrong offset1 "); 457 qDebug("Wrong offset1 %d", offset);
458 return 0; 458 return QString();
459 } 459 }
460 return mHolidays[offset]; 460 return mHolidays[offset];
461} 461}
462 462
463int KODayMatrix::getDayIndexFrom(int x, int y) 463int KODayMatrix::getDayIndexFrom(int x, int y)
464{ 464{
465 int colModulo = (width()-2) % 7; 465 int colModulo = (width()-2) % 7;
466 int rowModulo = (height()-2) % 6; 466 int rowModulo = (height()-2) % 6;
467#if 0 467#if 0
468 return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ? 468 return 7*(y/daysize.height()) + (KOGlobals::self()->reverseLayout() ?
469 6 - x/daysize.width() : x/daysize.width()); 469 6 - x/daysize.width() : x/daysize.width());
470#endif 470#endif