Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koviewmanager.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index db23882..30f5fb1 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -90,73 +90,80 @@ void KOViewManager::readSettings(KConfig *config) | |||
90 | if (view == "WhatsNext") showWhatsNextView(); | 90 | if (view == "WhatsNext") showWhatsNextView(); |
91 | else if (view == "Month") showMonthView(); | 91 | else if (view == "Month") showMonthView(); |
92 | else if (view == "List") showListView(); | 92 | else if (view == "List") showListView(); |
93 | else if (view == "Journal") showJournalView(); | 93 | else if (view == "Journal") showJournalView(); |
94 | else if (view == "TimeSpan") showTimeSpanView(); | 94 | else if (view == "TimeSpan") showTimeSpanView(); |
95 | else if (view == "Todo") showTodoView(); | 95 | else if (view == "Todo") showTodoView(); |
96 | else { | 96 | else { |
97 | showAgendaView(); | 97 | showAgendaView(); |
98 | } | 98 | } |
99 | } | 99 | } |
100 | 100 | ||
101 | 101 | ||
102 | void KOViewManager::showDateView( int view, QDate date) | 102 | void KOViewManager::showDateView( int view, QDate date) |
103 | { | 103 | { |
104 | 104 | ||
105 | //qDebug("date %d %s", view, date.toString().latin1()); | 105 | //qDebug("date %d %s", view, date.toString().latin1()); |
106 | #if 0 | 106 | #if 0 |
107 | mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); | 107 | mNewItemPopup->insertItem ( SmallIcon( pathString +"day" ), i18n("Day view"),3 ); |
108 | mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next Week"),4 ); | 108 | mNewItemPopup->insertItem ( SmallIcon( pathString +"week" ), i18n("Next Week"),4 ); |
109 | mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Two Weeks"),5 ); | 109 | mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Two Weeks"),5 ); |
110 | mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Month"),6 ); | 110 | mNewItemPopup->insertItem ( SmallIcon( pathString +"month" ), i18n("Next Month"),6 ); |
111 | mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); | 111 | mNewItemPopup->insertItem ( SmallIcon( pathString +"journal" ), i18n("Journal view"),7 ); |
112 | #endif | 112 | #endif |
113 | if ( view == 3 ) { | 113 | if ( view == 3 ) { |
114 | //mCurrentAgendaView = 1 ; | ||
114 | mMainView->showDay( date ); | 115 | mMainView->showDay( date ); |
115 | } else if (view == 4 ) { | 116 | } else if (view == 4 ) { |
117 | mCurrentAgendaView = 7 ; | ||
116 | mMainView->dateNavigator()->selectDates( date, 7 ); | 118 | mMainView->dateNavigator()->selectDates( date, 7 ); |
117 | } else if (view == 5 ) { | 119 | } else if (view == 5 ) { |
120 | mCurrentAgendaView = 14 ; | ||
118 | mMainView->dateNavigator()->selectDates( date, 14); | 121 | mMainView->dateNavigator()->selectDates( date, 14); |
119 | } else if (view == 6 ) { | 122 | } else if (view == 6 ) { |
120 | mMainView->dateNavigator()->blockSignals( true ); | 123 | mMainView->dateNavigator()->blockSignals( true ); |
121 | showMonthView(); | 124 | showMonthView(); |
122 | mMainView->dateNavigator()->selectMonthByDate( date ); | 125 | mMainView->dateNavigator()->selectMonthByDate( date ); |
123 | mMainView->dateNavigator()->blockSignals( false ); | 126 | mMainView->dateNavigator()->blockSignals( false ); |
124 | mMainView->dateNavigator()->selectDate( date ); | 127 | mMainView->dateNavigator()->selectDate( date ); |
125 | } else if (view == 7 ) { | 128 | } else if (view == 7 ) { |
126 | mMainView->dateNavigator()->selectDate( date ); | 129 | mMainView->dateNavigator()->selectDate( date ); |
127 | showJournalView(); | 130 | showJournalView(); |
128 | } else if (view == 8 ) { | 131 | } else if (view == 8 ) { |
129 | globalFlagBlockAgenda = 1; | 132 | globalFlagBlockAgenda = 1; |
130 | if ( mCurrentAgendaView != 3 ) | 133 | if ( mCurrentAgendaView != 3 ) |
131 | mCurrentAgendaView = -1; | 134 | mCurrentAgendaView = -1; |
132 | showAgendaView(KOPrefs::instance()->mFullViewMonth); | 135 | showAgendaView(KOPrefs::instance()->mFullViewMonth); |
133 | globalFlagBlockAgenda = 2; | 136 | globalFlagBlockAgenda = 2; |
134 | mMainView->dateNavigator()->selectDates( date , | 137 | mMainView->dateNavigator()->selectDates( date , |
135 | KOPrefs::instance()->mNextXDays ); | 138 | KOPrefs::instance()->mNextXDays ); |
136 | mFlagShowNextxDays = true; | 139 | mFlagShowNextxDays = true; |
137 | mCurrentAgendaView = 3 ; | 140 | mCurrentAgendaView = 3 ; |
138 | } | 141 | } if (view == 9) { |
142 | showWeekView(); | ||
143 | } else if (view == 10) { | ||
144 | mMainView->dateNavigator()->selectDates( date,mMainView->dateNavigator()->selectedDates().count() ); | ||
145 | } | ||
139 | 146 | ||
140 | #if 0 | 147 | #if 0 |
141 | dateNavigator()->blockSignals( true ); | 148 | dateNavigator()->blockSignals( true ); |
142 | dateNavigator()->selectDate( d ); | 149 | dateNavigator()->selectDate( d ); |
143 | dateNavigator()->blockSignals( false ); | 150 | dateNavigator()->blockSignals( false ); |
144 | mViewManager->showDayView(); | 151 | mViewManager->showDayView(); |
145 | #endif | 152 | #endif |
146 | 153 | ||
147 | } | 154 | } |
148 | 155 | ||
149 | 156 | ||
150 | 157 | ||
151 | void KOViewManager::writeSettings(KConfig *config) | 158 | void KOViewManager::writeSettings(KConfig *config) |
152 | { | 159 | { |
153 | config->setGroup("General"); | 160 | config->setGroup("General"); |
154 | 161 | ||
155 | QString view; | 162 | QString view; |
156 | if (mCurrentView == mWhatsNextView) view = "WhatsNext"; | 163 | if (mCurrentView == mWhatsNextView) view = "WhatsNext"; |
157 | else if (mCurrentView == mMonthView) view = "Month"; | 164 | else if (mCurrentView == mMonthView) view = "Month"; |
158 | else if (mCurrentView == mListView) view = "List"; | 165 | else if (mCurrentView == mListView) view = "List"; |
159 | else if (mCurrentView == mJournalView) view = "Journal"; | 166 | else if (mCurrentView == mJournalView) view = "Journal"; |
160 | else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; | 167 | else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; |
161 | else if (mCurrentView == mTodoView) view = "Todo"; | 168 | else if (mCurrentView == mTodoView) view = "Todo"; |
162 | else view = "Agenda"; | 169 | else view = "Agenda"; |