author | zautrix <zautrix> | 2005-02-07 13:03:38 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-07 13:03:38 (UTC) |
commit | 7de846e9f01ce27b622541493e6a02e26e37bf2c (patch) (unidiff) | |
tree | df59c7803b1e171b08d3c387f49b1239d1adc3b5 /korganizer/komonthview.cpp | |
parent | afc19166fcdc09d3d5b757a84abfeb0b2746f35f (diff) | |
download | kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.zip kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.tar.gz kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.tar.bz2 |
fixxxx
-rw-r--r-- | korganizer/komonthview.cpp | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 234375b..7ba0b2f 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -795,4 +795,5 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
795 | clPending = true; | 795 | clPending = true; |
796 | mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" ); | ||
796 | mWidStack = new QWidgetStack( this ); | 797 | mWidStack = new QWidgetStack( this ); |
797 | QHBoxLayout* hb = new QHBoxLayout( this ); | 798 | QVBoxLayout* hb = new QVBoxLayout( this ); |
798 | mMonthView = new QWidget( mWidStack ); | 799 | mMonthView = new QWidget( mWidStack ); |
@@ -806,2 +807,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
806 | #endif | 807 | #endif |
808 | hb->addWidget( mNavigatorBar ); | ||
807 | hb->addWidget( mWidStack ); | 809 | hb->addWidget( mWidStack ); |
@@ -812,2 +814,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
812 | updatePossible = false; | 814 | updatePossible = false; |
815 | //updatePossible = true; | ||
813 | mCells.setAutoDelete( true ); | 816 | mCells.setAutoDelete( true ); |
@@ -919,2 +922,6 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
919 | emit incidenceSelected( 0 ); | 922 | emit incidenceSelected( 0 ); |
923 | #ifndef DESKTOP_VERSION | ||
924 | resize( QApplication::desktop()->size() ); | ||
925 | computeLayout(); | ||
926 | #endif | ||
920 | } | 927 | } |
@@ -945,3 +952,2 @@ void KOMonthView::switchView() | |||
945 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; | 952 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; |
946 | //emit showNavigator( !mShowWeekView ); | ||
947 | if ( clPending ) { | 953 | if ( clPending ) { |
@@ -1262,8 +1268,3 @@ void KOMonthView::resizeEvent(QResizeEvent * e) | |||
1262 | { | 1268 | { |
1263 | qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); | 1269 | //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height()); |
1264 | if ( skipResize ) { | ||
1265 | skipResize = false; | ||
1266 | qDebug("skipResize "); | ||
1267 | return; | ||
1268 | } | ||
1269 | computeLayout(); | 1270 | computeLayout(); |
@@ -1288,4 +1289,4 @@ void KOMonthView::computeLayoutWeek() | |||
1288 | 1289 | ||
1289 | int wid = size().width();//e | 1290 | int wid = width();//e |
1290 | int hei = size().height()-1; | 1291 | int hei = height()-1-mNavigatorBar->height(); |
1291 | 1292 | ||
@@ -1294,6 +1295,5 @@ void KOMonthView::computeLayoutWeek() | |||
1294 | 1295 | ||
1295 | 1296 | if ( lastWid == width() && lastHei == height() ) | |
1296 | if ( lastWid == width() && lastHei ==height() ) | ||
1297 | return; | 1297 | return; |
1298 | lastWid =width(); | 1298 | lastWid = width(); |
1299 | lastHei = height(); | 1299 | lastHei = height(); |
@@ -1308,3 +1308,3 @@ void KOMonthView::computeLayoutWeek() | |||
1308 | 1308 | ||
1309 | qDebug("KOMonthView::computeLayout() WWW ------------------------------------ "); | 1309 | //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ "); |
1310 | QFontMetrics fm ( mWeekLabels[0]->font() ); | 1310 | QFontMetrics fm ( mWeekLabels[0]->font() ); |
@@ -1389,7 +1389,7 @@ void KOMonthView::computeLayoutWeek() | |||
1389 | updateDayLabels(); | 1389 | updateDayLabels(); |
1390 | bool forceUpdate = !updatePossible; | 1390 | //bool forceUpdate = !updatePossible; |
1391 | updatePossible = true; | 1391 | updatePossible = true; |
1392 | //mWeekLabels[mNumWeeks]->setText( i18n("M")); | 1392 | //mWeekLabels[mNumWeeks]->setText( i18n("M")); |
1393 | if ( forceUpdate ) | 1393 | //if ( forceUpdate ) |
1394 | updateView(); | 1394 | // updateView(); |
1395 | } | 1395 | } |
@@ -1415,12 +1415,15 @@ void KOMonthView::computeLayout() | |||
1415 | 1415 | ||
1416 | int wid = size().width();//e | 1416 | int wid = width();//e |
1417 | int hei = size().height()-1; | 1417 | int hei = height()-1-mNavigatorBar->height(); |
1418 | 1418 | ||
1419 | if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) | 1419 | if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) { |
1420 | return; | 1420 | return; |
1421 | if ( lastWid == width() && lastHei ==height() ) | 1421 | } |
1422 | if ( lastWid == width() && lastHei == height() ){ | ||
1422 | return; | 1423 | return; |
1423 | lastWid =width(); | 1424 | } |
1424 | lastHei = height(); | 1425 | |
1425 | qDebug("KOMonthView::computeLayout() MMM ------------------------------------ "); | 1426 | lastWid = width(); |
1427 | lastHei = height(); | ||
1428 | //qDebug("KOMonthView::computeLayout() MMM ------------------------------------ "); | ||
1426 | QFontMetrics fm ( mWeekLabels[0]->font() ); | 1429 | QFontMetrics fm ( mWeekLabels[0]->font() ); |
@@ -1502,7 +1505,5 @@ void KOMonthView::computeLayout() | |||
1502 | updateDayLabels(); | 1505 | updateDayLabels(); |
1503 | bool forceUpdate = !updatePossible; | 1506 | //bool forceUpdate = !updatePossible; |
1504 | updatePossible = true; | 1507 | updatePossible = true; |
1505 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); | 1508 | //mWeekLabels[mNumWeeks]->setText( i18n("W")); |
1506 | if ( forceUpdate ) | ||
1507 | updateView(); | ||
1508 | } | 1509 | } |