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 | |
parent | afc19166fcdc09d3d5b757a84abfeb0b2746f35f (diff) | |
download | kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.zip kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.tar.gz kdepimpi-7de846e9f01ce27b622541493e6a02e26e37bf2c.tar.bz2 |
fixxxx
-rw-r--r-- | korganizer/calendarview.cpp | 33 | ||||
-rw-r--r-- | korganizer/calendarview.h | 4 | ||||
-rw-r--r-- | korganizer/komonthview.cpp | 55 | ||||
-rw-r--r-- | korganizer/komonthview.h | 6 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 41 | ||||
-rw-r--r-- | korganizer/navigatorbar.cpp | 1 |
6 files changed, 55 insertions, 85 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 77de94f..0fbaa9a 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -285,9 +285,6 @@ void CalendarView::init() | |||
285 | QWidget *rightBox = new QWidget( mPanner ); | 285 | QWidget *rightBox = new QWidget( mPanner ); |
286 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 286 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
287 | 287 | ||
288 | mNavigatorBar = new NavigatorBar( QDate::currentDate(), rightBox, "useBigPixmaps" ); | ||
289 | rightLayout->addWidget( mNavigatorBar ); | ||
290 | |||
291 | mRightFrame = new QWidgetStack( rightBox ); | 288 | mRightFrame = new QWidgetStack( rightBox ); |
292 | rightLayout->addWidget( mRightFrame, 1 ); | 289 | rightLayout->addWidget( mRightFrame, 1 ); |
293 | 290 | ||
@@ -327,9 +324,7 @@ void CalendarView::init() | |||
327 | QWidget *rightBox = new QWidget( mainBox ); | 324 | QWidget *rightBox = new QWidget( mainBox ); |
328 | mainBoxLayout->addWidget ( rightBox, 10 ); | 325 | mainBoxLayout->addWidget ( rightBox, 10 ); |
329 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); | 326 | QBoxLayout *rightLayout = new QVBoxLayout( rightBox ); |
330 | mNavigatorBar = new NavigatorBar( QDate::currentDate(), rightBox, "useBigPixmaps" ); | ||
331 | mRightFrame = new QWidgetStack( rightBox ); | 327 | mRightFrame = new QWidgetStack( rightBox ); |
332 | rightLayout->addWidget( mNavigatorBar ); | ||
333 | rightLayout->addWidget( mRightFrame, 10 ); | 328 | rightLayout->addWidget( mRightFrame, 10 ); |
334 | 329 | ||
335 | mLeftFrame = leftFrame; | 330 | mLeftFrame = leftFrame; |
@@ -350,19 +345,7 @@ void CalendarView::init() | |||
350 | 345 | ||
351 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 346 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
352 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 347 | mDateNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
353 | connect( mNavigatorBar, SIGNAL( goPrevYear() ), | 348 | |
354 | mNavigator, SLOT( selectPreviousYear() ) ); | ||
355 | connect( mNavigatorBar, SIGNAL( goNextYear() ), | ||
356 | mNavigator, SLOT( selectNextYear() ) ); | ||
357 | connect( mNavigatorBar, SIGNAL( goPrevMonth() ), | ||
358 | mNavigator, SLOT( selectPreviousMonth() ) ); | ||
359 | connect( mNavigatorBar, SIGNAL( goNextMonth() ), | ||
360 | mNavigator, SLOT( selectNextMonth() ) ); | ||
361 | connect( mNavigatorBar, SIGNAL( selectWeek( int ) ), | ||
362 | mNavigator, SLOT( selectWeek( int ) ) ); | ||
363 | |||
364 | connect( mNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | ||
365 | mNavigatorBar, SLOT( selectDates( const KCal::DateList & ) ) ); | ||
366 | 349 | ||
367 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), | 350 | connect( mDateNavigator, SIGNAL( weekClicked( const QDate & ) ), |
368 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); | 351 | mNavigator, SLOT( selectWeek( const QDate & ) ) ); |
@@ -382,8 +365,6 @@ void CalendarView::init() | |||
382 | mNavigator, SLOT( selectNext() ) ); | 365 | mNavigator, SLOT( selectNext() ) ); |
383 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), | 366 | connect( mDateNavigator, SIGNAL( monthSelected ( int ) ), |
384 | mNavigator, SLOT( slotMonthSelect( int ) ) ); | 367 | mNavigator, SLOT( slotMonthSelect( int ) ) ); |
385 | connect( mNavigatorBar, SIGNAL( monthSelected ( int ) ), | ||
386 | mNavigator, SLOT( slotMonthSelect( int ) ) ); | ||
387 | 368 | ||
388 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), | 369 | connect( mDateNavigator, SIGNAL( datesSelected( const KCal::DateList & ) ), |
389 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); | 370 | mNavigator, SLOT( selectDates( const KCal::DateList & ) ) ); |
@@ -3868,18 +3849,6 @@ void CalendarView::slotCalendarChanged() | |||
3868 | ; | 3849 | ; |
3869 | } | 3850 | } |
3870 | 3851 | ||
3871 | NavigatorBar *CalendarView::navigatorBar() | ||
3872 | { | ||
3873 | return mNavigatorBar; | ||
3874 | } | ||
3875 | void CalendarView::showNavigatorBar( bool b) | ||
3876 | { | ||
3877 | if ( b ) mNavigatorBar->show(); | ||
3878 | else mNavigatorBar->hide(); | ||
3879 | } | ||
3880 | |||
3881 | |||
3882 | |||
3883 | void CalendarView::keyPressEvent ( QKeyEvent *e) | 3852 | void CalendarView::keyPressEvent ( QKeyEvent *e) |
3884 | { | 3853 | { |
3885 | //qDebug(" alendarView::keyPressEvent "); | 3854 | //qDebug(" alendarView::keyPressEvent "); |
diff --git a/korganizer/calendarview.h b/korganizer/calendarview.h index 8d7ff36..731298d 100644 --- a/korganizer/calendarview.h +++ b/korganizer/calendarview.h | |||
@@ -57,7 +57,6 @@ class DateNavigator; | |||
57 | class KOIncidenceEditor; | 57 | class KOIncidenceEditor; |
58 | class KDatePicker; | 58 | class KDatePicker; |
59 | class ResourceView; | 59 | class ResourceView; |
60 | class NavigatorBar; | ||
61 | class KOEventEditor; | 60 | class KOEventEditor; |
62 | class KOTodoEditor ; | 61 | class KOTodoEditor ; |
63 | class KOEventViewerDialog; | 62 | class KOEventViewerDialog; |
@@ -106,7 +105,6 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
106 | 105 | ||
107 | QWidgetStack *viewStack(); | 106 | QWidgetStack *viewStack(); |
108 | QWidget *leftFrame(); | 107 | QWidget *leftFrame(); |
109 | NavigatorBar *navigatorBar(); | ||
110 | 108 | ||
111 | DateNavigator *dateNavigator(); | 109 | DateNavigator *dateNavigator(); |
112 | KDateNavigator *dateNavigatorWidget(); | 110 | KDateNavigator *dateNavigatorWidget(); |
@@ -176,7 +174,6 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
176 | 174 | ||
177 | 175 | ||
178 | public slots: | 176 | public slots: |
179 | void showNavigatorBar(bool); | ||
180 | void showOpenError(); | 177 | void showOpenError(); |
181 | void watchSavedFile(); | 178 | void watchSavedFile(); |
182 | void recheckTimerAlarm(); | 179 | void recheckTimerAlarm(); |
@@ -533,7 +530,6 @@ class CalendarView : public KOrg::CalendarViewBase, public KCal::Calendar::Obser | |||
533 | 530 | ||
534 | KDatePicker* mDatePicker; | 531 | KDatePicker* mDatePicker; |
535 | QVBox* mDateFrame; | 532 | QVBox* mDateFrame; |
536 | NavigatorBar *mNavigatorBar; | ||
537 | 533 | ||
538 | KDateNavigator *mDateNavigator; // widget showing small month view. | 534 | KDateNavigator *mDateNavigator; // widget showing small month view. |
539 | 535 | ||
diff --git a/korganizer/komonthview.cpp b/korganizer/komonthview.cpp index 234375b..7ba0b2f 100644 --- a/korganizer/komonthview.cpp +++ b/korganizer/komonthview.cpp | |||
@@ -793,8 +793,9 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
793 | { | 793 | { |
794 | skipResize = false; | 794 | skipResize = false; |
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 ); |
799 | mWeekView = new QWidget( mWidStack ); | 800 | mWeekView = new QWidget( mWidStack ); |
800 | #if QT_VERSION >= 0x030000 | 801 | #if QT_VERSION >= 0x030000 |
@@ -804,12 +805,14 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
804 | mWidStack->addWidget( mMonthView, 1 ); | 805 | mWidStack->addWidget( mMonthView, 1 ); |
805 | mWidStack->addWidget( mWeekView , 1 ); | 806 | mWidStack->addWidget( mWeekView , 1 ); |
806 | #endif | 807 | #endif |
808 | hb->addWidget( mNavigatorBar ); | ||
807 | hb->addWidget( mWidStack ); | 809 | hb->addWidget( mWidStack ); |
808 | mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); | 810 | mWeekStartsMonday = KGlobal::locale()->weekStartsMonday(); |
809 | mShowWeekView = KOPrefs::instance()->mMonthViewWeek; | 811 | mShowWeekView = KOPrefs::instance()->mMonthViewWeek; |
810 | if ( mShowWeekView ) | 812 | if ( mShowWeekView ) |
811 | mWeekStartsMonday = true; | 813 | mWeekStartsMonday = true; |
812 | updatePossible = false; | 814 | updatePossible = false; |
815 | //updatePossible = true; | ||
813 | mCells.setAutoDelete( true ); | 816 | mCells.setAutoDelete( true ); |
814 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; | 817 | mShowSatSunComp = KOPrefs::instance()->mMonthViewSatSunTog ; |
815 | mDayLabels.resize( mDaysPerWeek ); | 818 | mDayLabels.resize( mDaysPerWeek ); |
@@ -917,6 +920,10 @@ KOMonthView::KOMonthView(Calendar *calendar, QWidget *parent, const char *name) | |||
917 | mWidStack->raiseWidget( mMonthView ); | 920 | mWidStack->raiseWidget( mMonthView ); |
918 | 921 | ||
919 | emit incidenceSelected( 0 ); | 922 | emit incidenceSelected( 0 ); |
923 | #ifndef DESKTOP_VERSION | ||
924 | resize( QApplication::desktop()->size() ); | ||
925 | computeLayout(); | ||
926 | #endif | ||
920 | } | 927 | } |
921 | 928 | ||
922 | KOMonthView::~KOMonthView() | 929 | KOMonthView::~KOMonthView() |
@@ -943,7 +950,6 @@ void KOMonthView::switchView() | |||
943 | selectedCell()->deselect(); | 950 | selectedCell()->deselect(); |
944 | mShowWeekView = !mShowWeekView; | 951 | mShowWeekView = !mShowWeekView; |
945 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; | 952 | KOPrefs::instance()->mMonthViewWeek = mShowWeekView; |
946 | //emit showNavigator( !mShowWeekView ); | ||
947 | if ( clPending ) { | 953 | if ( clPending ) { |
948 | computeLayout(); | 954 | computeLayout(); |
949 | updateConfig(); | 955 | updateConfig(); |
@@ -1260,12 +1266,7 @@ void KOMonthView::updateView() | |||
1260 | 1266 | ||
1261 | void KOMonthView::resizeEvent(QResizeEvent * e) | 1267 | 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(); |
1270 | clPending = true; | 1271 | clPending = true; |
1271 | if ( mShowWeekView ) | 1272 | if ( mShowWeekView ) |
@@ -1286,16 +1287,15 @@ void KOMonthView::computeLayoutWeek() | |||
1286 | int tWid = topLevelWidget()->size().width(); | 1287 | int tWid = topLevelWidget()->size().width(); |
1287 | int tHei = topLevelWidget()->size().height(); | 1288 | int tHei = topLevelWidget()->size().height(); |
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 | ||
1292 | if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) | 1293 | if ( ((wid *3)/2) < tWid && (( hei *3) /2) < tHei ) |
1293 | return; | 1294 | return; |
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(); |
1300 | 1300 | ||
1301 | 1301 | ||
@@ -1306,7 +1306,7 @@ void KOMonthView::computeLayoutWeek() | |||
1306 | mShowSatSunComp = true; | 1306 | mShowSatSunComp = true; |
1307 | combinedSatSun = true; | 1307 | combinedSatSun = true; |
1308 | 1308 | ||
1309 | qDebug("KOMonthView::computeLayout() WWW ------------------------------------ "); | 1309 | //qDebug("KOMonthView::computeLayout() WWW ------------------------------------ "); |
1310 | QFontMetrics fm ( mWeekLabels[0]->font() ); | 1310 | QFontMetrics fm ( mWeekLabels[0]->font() ); |
1311 | int weeklabelwid = fm.width( "888" ); | 1311 | int weeklabelwid = fm.width( "888" ); |
1312 | wid -= weeklabelwid; | 1312 | wid -= weeklabelwid; |
@@ -1387,11 +1387,11 @@ void KOMonthView::computeLayoutWeek() | |||
1387 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); | 1387 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); |
1388 | mShortDayLabels = mDayLabelsW[0]->width() < mWidthLongDayLabel ; | 1388 | mShortDayLabels = mDayLabelsW[0]->width() < mWidthLongDayLabel ; |
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 | } |
1396 | void KOMonthView::computeLayout() | 1396 | void KOMonthView::computeLayout() |
1397 | { | 1397 | { |
@@ -1413,16 +1413,19 @@ void KOMonthView::computeLayout() | |||
1413 | int tWid = topLevelWidget()->size().width(); | 1413 | int tWid = topLevelWidget()->size().width(); |
1414 | int tHei = topLevelWidget()->size().height(); | 1414 | int tHei = topLevelWidget()->size().height(); |
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() ); |
1427 | int weeklabelwid = fm.width( "888" ); | 1430 | int weeklabelwid = fm.width( "888" ); |
1428 | wid -= weeklabelwid; | 1431 | wid -= weeklabelwid; |
@@ -1500,11 +1503,9 @@ void KOMonthView::computeLayout() | |||
1500 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); | 1503 | //qDebug("parent %d %d ", topLevelWidget()->size().width(), topLevelWidget()->size().height()); |
1501 | mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; | 1504 | mShortDayLabels = mDayLabels[0]->width() < mWidthLongDayLabel ; |
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 | } |
1509 | 1510 | ||
1510 | void KOMonthView::showContextMenu( Incidence *incidence ) | 1511 | void KOMonthView::showContextMenu( Incidence *incidence ) |
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index a29a1a8..bf861ef 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h | |||
@@ -36,6 +36,7 @@ | |||
36 | #include <libkcal/event.h> | 36 | #include <libkcal/event.h> |
37 | 37 | ||
38 | #include "koeventview.h" | 38 | #include "koeventview.h" |
39 | #include "navigatorbar.h" | ||
39 | 40 | ||
40 | #ifdef DESKTOP_VERSION | 41 | #ifdef DESKTOP_VERSION |
41 | class QToolTipGroup; | 42 | class QToolTipGroup; |
@@ -227,7 +228,8 @@ class KOMonthView: public KOEventView | |||
227 | bool isUpdatePossible() { return updatePossible; } | 228 | bool isUpdatePossible() { return updatePossible; } |
228 | 229 | ||
229 | MonthViewCell * selectedCell(); | 230 | MonthViewCell * selectedCell(); |
230 | bool skipResize; | 231 | bool skipResize; |
232 | NavigatorBar* navigatorBar() { return mNavigatorBar ;} | ||
231 | public slots: | 233 | public slots: |
232 | virtual void updateView(); | 234 | virtual void updateView(); |
233 | virtual void updateConfig(); | 235 | virtual void updateConfig(); |
@@ -249,7 +251,6 @@ class KOMonthView: public KOEventView | |||
249 | signals: | 251 | signals: |
250 | void nextMonth(); | 252 | void nextMonth(); |
251 | void prevMonth(); | 253 | void prevMonth(); |
252 | void showNavigator( bool ); | ||
253 | void selectWeekNum ( int ); | 254 | void selectWeekNum ( int ); |
254 | void showDaySignal( QDate ); | 255 | void showDaySignal( QDate ); |
255 | protected: | 256 | protected: |
@@ -258,6 +259,7 @@ class KOMonthView: public KOEventView | |||
258 | void updateDayLabels(); | 259 | void updateDayLabels(); |
259 | 260 | ||
260 | private: | 261 | private: |
262 | NavigatorBar* mNavigatorBar; | ||
261 | int currentWeek(); | 263 | int currentWeek(); |
262 | bool clPending; | 264 | bool clPending; |
263 | QWidgetStack * mWidStack; | 265 | QWidgetStack * mWidStack; |
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index ba15f7f..b551e2a 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -201,7 +201,7 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | |||
201 | full = mMainView->leftFrame()->isVisible(); | 201 | full = mMainView->leftFrame()->isVisible(); |
202 | } else { | 202 | } else { |
203 | if ( view == mMonthView && mMonthView) | 203 | if ( view == mMonthView && mMonthView) |
204 | mMonthView->skipResize = true ; | 204 | ;//mMonthView->skipResize = true ; |
205 | mCurrentView = view; | 205 | mCurrentView = view; |
206 | // bool full = fullScreen; | 206 | // bool full = fullScreen; |
207 | bool isFull = !mMainView->leftFrame()->isVisible(); | 207 | bool isFull = !mMainView->leftFrame()->isVisible(); |
@@ -221,25 +221,10 @@ void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | |||
221 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) | 221 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) |
222 | { | 222 | { |
223 | mCurrentAgendaView = 0; | 223 | mCurrentAgendaView = 0; |
224 | int wid = mMainView->width() ; | ||
225 | int hei = mMainView->height(); | ||
226 | if ( mCurrentView == mMonthView ) { | ||
227 | if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { | ||
228 | mMainView->navigatorBar()->show(); | ||
229 | hei -= mMainView->navigatorBar()->sizeHint().height(); | ||
230 | } | ||
231 | //mMainView->navigatorBar()->hide(); | ||
232 | } else { | ||
233 | mMainView->navigatorBar()->hide(); | ||
234 | } | ||
235 | if ( fullScreen ) { | 224 | if ( fullScreen ) { |
236 | mMainView->leftFrame()->hide(); | 225 | mMainView->leftFrame()->hide(); |
237 | } else { | 226 | } else { |
238 | mMainView->leftFrame()->show(); | 227 | mMainView->leftFrame()->show(); |
239 | if ( KOPrefs::instance()->mVerticalScreen ) | ||
240 | hei -= mMainView->leftFrame()->height(); | ||
241 | else | ||
242 | wid -= mMainView->leftFrame()->width(); | ||
243 | } | 228 | } |
244 | emit signalFullScreen( !fullScreen ); | 229 | emit signalFullScreen( !fullScreen ); |
245 | if ( callUpdateView ) | 230 | if ( callUpdateView ) |
@@ -527,11 +512,27 @@ void KOViewManager::showMonthView() | |||
527 | mMainView, SLOT ( showDay( QDate ) ) ); | 512 | mMainView, SLOT ( showDay( QDate ) ) ); |
528 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); | 513 | connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); |
529 | connect( mMonthView, SIGNAL(nextMonth() ), | 514 | connect( mMonthView, SIGNAL(nextMonth() ), |
530 | mMainView->navigatorBar(), SIGNAL(goNextMonth() ) ); | 515 | mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); |
531 | connect( mMonthView, SIGNAL(prevMonth() ), | 516 | connect( mMonthView, SIGNAL(prevMonth() ), |
532 | mMainView->navigatorBar(), SIGNAL(goPrevMonth() ) ); | 517 | mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); |
533 | connect( mMonthView, SIGNAL( showNavigator(bool) ), | 518 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), |
534 | mMainView, SLOT ( showNavigatorBar(bool) ) ); | 519 | mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); |
520 | connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), | ||
521 | mMainView->dateNavigator(), SLOT( selectNextYear() ) ); | ||
522 | connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), | ||
523 | mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); | ||
524 | connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), | ||
525 | mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); | ||
526 | connect( mMonthView->navigatorBar(), SIGNAL( selectWeek( int ) ), | ||
527 | mMainView->dateNavigator(), SLOT( selectWeek( int ) ) ); | ||
528 | |||
529 | connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), | ||
530 | mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); | ||
531 | |||
532 | |||
533 | connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), | ||
534 | mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); | ||
535 | |||
535 | } | 536 | } |
536 | 537 | ||
537 | globalFlagBlockAgenda = 1; | 538 | globalFlagBlockAgenda = 1; |
diff --git a/korganizer/navigatorbar.cpp b/korganizer/navigatorbar.cpp index 657f98d..f05e6f6 100644 --- a/korganizer/navigatorbar.cpp +++ b/korganizer/navigatorbar.cpp | |||
@@ -154,6 +154,7 @@ NavigatorBar::NavigatorBar( const QDate & date, QWidget *parent, const char *nam | |||
154 | mNextMonth->setFocusPolicy(NoFocus); | 154 | mNextMonth->setFocusPolicy(NoFocus); |
155 | mNextYear->setFocusPolicy(NoFocus); | 155 | mNextYear->setFocusPolicy(NoFocus); |
156 | mSelectMonth->setFocusPolicy(NoFocus); | 156 | mSelectMonth->setFocusPolicy(NoFocus); |
157 | setSizePolicy( QSizePolicy ( QSizePolicy::Expanding ,QSizePolicy::Fixed ) ); | ||
157 | 158 | ||
158 | } | 159 | } |
159 | 160 | ||