author | zautrix <zautrix> | 2005-02-20 11:14:04 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-20 11:14:04 (UTC) |
commit | bb74ffa01010ca364e101e05a6b3e090ae363a0e (patch) (side-by-side diff) | |
tree | 573f3b5244f064996c9cb4c73cc0ad04816bda9b /korganizer | |
parent | ce9aa88149547443452a2077f5c3832fbea34f63 (diff) | |
download | kdepimpi-bb74ffa01010ca364e101e05a6b3e090ae363a0e.zip kdepimpi-bb74ffa01010ca364e101e05a6b3e090ae363a0e.tar.gz kdepimpi-bb74ffa01010ca364e101e05a6b3e090ae363a0e.tar.bz2 |
minor month-weekview fixes
-rw-r--r-- | korganizer/komonthview.h | 2 | ||||
-rw-r--r-- | korganizer/koviewmanager.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/korganizer/komonthview.h b/korganizer/komonthview.h index b79a41f..f92a69a 100644 --- a/korganizer/komonthview.h +++ b/korganizer/komonthview.h @@ -181,97 +181,97 @@ class MonthViewCell : public QWidget private: KOMonthView *mMonthView; QDate mDate; bool mPrimary; bool mHoliday; QString mHolidayString; //QLabel *mLabel; QPushButton *mLabel; QListBox *mItemList; #ifdef DESKTOP_VERSION static QToolTipGroup *mToolTipGroup; #endif QSize mLabelSize; QSize mLabelBigSize; QPalette mHolidayPalette; QPalette mStandardPalette; QPalette mPrimaryPalette; QPalette mNonPrimaryPalette; void setMyPalette(); QPalette getPalette (); void keyPressEvent ( QKeyEvent * ) ; }; class KOMonthView: public KOEventView { Q_OBJECT public: KOMonthView(Calendar *cal, QWidget *parent = 0, const char *name = 0 ); ~KOMonthView(); /** Returns maximum number of days supported by the komonthview */ virtual int maxDatesHint(); /** Returns number of currently shown dates. */ virtual int currentDateCount(); /** returns the currently selected events */ virtual QPtrList<Incidence> selectedIncidences(); /** returns dates of the currently selected events */ virtual DateList selectedDates(); virtual void printPreview(CalPrinter *calPrinter, const QDate &, const QDate &); - bool isMonthView() { return true; } + bool isMonthView() { return !mShowWeekView; } bool isUpdatePossible() { return updatePossible; } MonthViewCell * selectedCell(); bool skipResize; NavigatorBar* navigatorBar() { return mNavigatorBar ;} public slots: virtual void updateView(); virtual void updateConfig(); virtual void showDates(const QDate &start, const QDate &end); virtual void showEvents(QPtrList<Event> eventList); void changeEventDisplay(Event *, int); void clearSelection(); void showContextMenu( Incidence * ); void setSelectedCell( MonthViewCell * ); void switchView(); protected slots: void selectInternalWeekNum ( int ); void processSelectionChange(); signals: void nextMonth(); void prevMonth(); void selectWeekNum ( int ); void selectMonth (); void showDaySignal( QDate ); protected: void resizeEvent(QResizeEvent *); void viewChanged(); void updateDayLabels(); private: NavigatorBar* mNavigatorBar; int currentWeek(); bool clPending; QWidgetStack * mWidStack; QWidget* mMonthView; QWidget* mWeekView; bool mShowWeekView; bool updatePossible; int mDaysPerWeek; int mNumWeeks; int mNumCells; bool mWeekStartsMonday; bool mShowSatSunComp; diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index ac67b58..a9f5a41 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp @@ -512,96 +512,97 @@ if (!mMonthView) { connect( mMonthView, SIGNAL( incidenceSelected( Incidence * ) ), mMainView, SLOT( processMainViewSelection( Incidence * ) ) ); connect( mMonthView, SIGNAL( cloneIncidenceSignal( Incidence * ) ), mMainView, SLOT ( cloneIncidence( Incidence * ) ) ); connect( mMonthView, SIGNAL( cancelIncidenceSignal( Incidence * ) ), mMainView, SLOT ( cancelIncidence( Incidence * ) ) ); connect( mMonthView, SIGNAL( moveIncidenceSignal( Incidence * ) ), mMainView, SLOT ( moveIncidence( Incidence * ) ) ); connect( mMonthView, SIGNAL( beamIncidenceSignal( Incidence * ) ), mMainView, SLOT ( beamIncidence( Incidence * ) ) ); connect( mMonthView, SIGNAL( selectWeekNum( int ) ), mMainView->dateNavigator(), SLOT ( selectWeekFromMonthView( int ) ) ); connect( mMonthView, SIGNAL( selectMonth() ), mMainView->dateNavigator(), SLOT ( selectMonthFromMonthview() ) ); connect( mMonthView, SIGNAL( showDaySignal( QDate ) ), mMainView, SLOT ( showDay( QDate ) ) ); connect(mMainView, SIGNAL(configChanged()), mMonthView, SLOT(updateConfig())); connect( mMonthView, SIGNAL(nextMonth() ), mMonthView->navigatorBar(), SIGNAL(goNextMonth() ) ); connect( mMonthView, SIGNAL(prevMonth() ), mMonthView->navigatorBar(), SIGNAL(goPrevMonth() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goPrevYear() ), mMainView->dateNavigator(), SLOT( selectPreviousYear() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goNextYear() ), mMainView->dateNavigator(), SLOT( selectNextYear() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goPrevMonth() ), mMainView->dateNavigator(), SLOT( selectPreviousMonth() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goNextMonth() ), mMainView->dateNavigator(), SLOT( selectNextMonth() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goPrevWeek() ), mMainView->dateNavigator(), SLOT( selectPreviousWeek() ) ); connect( mMonthView->navigatorBar(), SIGNAL( goNextWeek() ), mMainView->dateNavigator(), SLOT( selectNextWeek() ) ); connect( mMainView->dateNavigator(), SIGNAL( datesSelected( const KCal::DateList & ) ), mMonthView->navigatorBar(), SLOT( selectDates( const KCal::DateList & ) ) ); connect( mMonthView->navigatorBar(), SIGNAL( monthSelected ( int ) ), mMainView->dateNavigator(), SLOT( slotMonthSelect( int ) ) ); } } void KOViewManager::showMonthViewWeek() { createMonthView(); + globalFlagBlockAgenda = 1; bool full = true; if ( mCurrentView == mMonthView) full = mMainView->leftFrame()->isVisible(); if ( !KOPrefs::instance()->mMonthViewWeek ) { mMonthView->switchView(); if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) full = false; else full = true; } mMainView->dateNavigator()->selectWeek(); showView(mMonthView, full ); } void KOViewManager::showMonthView() { createMonthView(); globalFlagBlockAgenda = 1; //mFlagShowNextxDays = false; bool full = true; if ( mCurrentView == mMonthView) full = mMainView->leftFrame()->isVisible(); // if(mMonthView == mCurrentView) return; if ( KOPrefs::instance()->mMonthViewWeek ) { mMonthView->switchView(); if ( KOPrefs::instance()->mViewChangeHoldNonFullscreen && mMainView->leftFrame()->isVisible() ) full = false; else full = true; } mMainView->dateNavigator()->selectMonth(); showView(mMonthView, full ); } void KOViewManager::showTodoView() { //mFlagShowNextxDays = false; if ( !mTodoView ) { mTodoView = new KOTodoView( mMainView->calendar(), mMainView->viewStack(), "KOViewManager::TodoView" ); addView( mTodoView ); // QPEApplication::setStylusOperation( mTodoView, QPEApplication::RightOnHold ); // SIGNALS/SLOTS FOR TODO VIEW |