summaryrefslogtreecommitdiffabout
path: root/korganizer/komonthview.cpp
authorzautrix <zautrix>2005-02-07 13:03:38 (UTC)
committer zautrix <zautrix>2005-02-07 13:03:38 (UTC)
commit7de846e9f01ce27b622541493e6a02e26e37bf2c (patch) (side-by-side diff)
treedf59c7803b1e171b08d3c387f49b1239d1adc3b5 /korganizer/komonthview.cpp
parentafc19166fcdc09d3d5b757a84abfeb0b2746f35f (diff)
downloadkdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.zip
kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.tar.gz
kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.tar.bz2
fixxxx
Diffstat (limited to 'korganizer/komonthview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/komonthview.cpp47
1 files changed, 24 insertions, 23 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)
clPending = true;
+ mNavigatorBar = new NavigatorBar( QDate::currentDate(), this, "useBigPixmaps" );
mWidStack = new QWidgetStack( this );
- QHBoxLayout* hb = new QHBoxLayout( this );
+ QVBoxLayout* hb = new QVBoxLayout( this );
mMonthView = new QWidget( mWidStack );
@@ -806,2 +807,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
#endif
+ hb->addWidget( mNavigatorBar );
hb->addWidget( mWidStack );
@@ -812,2 +814,3 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
updatePossible = false;
+ //updatePossible = true;
mCells.setAutoDelete( true );
@@ -919,2 +922,6 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name)
emit incidenceSelected( 0 );
+#ifndef DESKTOP_VERSION
+ resize( QApplication::desktop()->size() );
+ computeLayout();
+#endif
}
@@ -945,3 +952,2 @@ void KOMonthView::switchView()
KOPrefs::instance()->mMonthViewWeek = mShowWeekView;
- //emit showNavigator( !mShowWeekView );
if ( clPending ) {
@@ -1262,8 +1268,3 @@ void KOMonthView::resizeEvent(QResizeEvent * e)
{
- qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height());
- if ( skipResize ) {
- skipResize = false;
- qDebug("skipResize ");
- return;
- }
+ //qDebug("KOMonthView::resizeEvent %d %d -- %d %d ", e->size().width(), e->size().height(), e->oldSize().width(), e->oldSize().height());
computeLayout();
@@ -1288,4 +1289,4 @@ void KOMonthView::computeLayoutWeek()
- int wid = size().width();//e
- int hei = size().height()-1;
+ int wid = width();//e
+ int hei = height()-1-mNavigatorBar->height();
@@ -1294,3 +1295,2 @@ void KOMonthView::computeLayoutWeek()
-
if ( lastWid == width() && lastHei ==height() )
@@ -1308,3 +1308,3 @@ void KOMonthView::computeLayoutWeek()
- qDebug("KOMonthView::computeLayout() WWW ------------------------------------ ");
+ //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ ");
QFontMetrics fm ( mWeekLabels[0]->font() );
@@ -1389,7 +1389,7 @@ void KOMonthView::computeLayoutWeek()
updateDayLabels();
- bool forceUpdate = !updatePossible;
+ //bool forceUpdate = !updatePossible;
updatePossible = true;
//mWeekLabels[mNumWeeks]->setText( i18n("M"));
- if ( forceUpdate )
- updateView();
+ //if ( forceUpdate )
+ // updateView();
}
@@ -1415,12 +1415,15 @@ void KOMonthView::computeLayout()
- int wid = size().width();//e
- int hei = size().height()-1;
+ int wid = width();//e
+ int hei = height()-1-mNavigatorBar->height();
- if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei )
+ if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) {
return;
- if ( lastWid == width() && lastHei ==height() )
+ }
+ if ( lastWid == width() && lastHei == height() ){
return;
+ }
+
lastWid =width();
lastHei = height();
- qDebug("KOMonthView::computeLayout() MMM ------------------------------------ ");
+ //qDebug("KOMonthView::computeLayout() MMM ------------------------------------ ");
QFontMetrics fm ( mWeekLabels[0]->font() );
@@ -1502,7 +1505,5 @@ void KOMonthView::computeLayout()
updateDayLabels();
- bool forceUpdate = !updatePossible;
+ //bool forceUpdate = !updatePossible;
updatePossible = true;
//mWeekLabels[mNumWeeks]->setText( i18n("W"));
- if ( forceUpdate )
- updateView();
}