author | zautrix <zautrix> | 2005-02-06 20:09:33 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-06 20:09:33 (UTC) |
commit | 961fc44f4092c1f981eb3be4284715e6829f885c (patch) (unidiff) | |
tree | 005e999ddbf07af42c7da4f9193874ba0ba3870c /korganizer/koviewmanager.cpp | |
parent | 536a16498de6b9c10b3f5b147ca18c5e4421401c (diff) | |
download | kdepimpi-961fc44f4092c1f981eb3be4284715e6829f885c.zip kdepimpi-961fc44f4092c1f981eb3be4284715e6829f885c.tar.gz kdepimpi-961fc44f4092c1f981eb3be4284715e6829f885c.tar.bz2 |
fixesss
Diffstat (limited to 'korganizer/koviewmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | korganizer/koviewmanager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/korganizer/koviewmanager.cpp b/korganizer/koviewmanager.cpp index c35de0a..62d3e7f 100644 --- a/korganizer/koviewmanager.cpp +++ b/korganizer/koviewmanager.cpp | |||
@@ -155,121 +155,121 @@ void KOViewManager::showDateView( int view, QDate date) | |||
155 | 155 | ||
156 | 156 | ||
157 | 157 | ||
158 | void KOViewManager::writeSettings(KConfig *config) | 158 | void KOViewManager::writeSettings(KConfig *config) |
159 | { | 159 | { |
160 | config->setGroup("General"); | 160 | config->setGroup("General"); |
161 | 161 | ||
162 | QString view; | 162 | QString view; |
163 | if (mCurrentView == mWhatsNextView) view = "WhatsNext"; | 163 | if (mCurrentView == mWhatsNextView) view = "WhatsNext"; |
164 | else if (mCurrentView == mMonthView) view = "Month"; | 164 | else if (mCurrentView == mMonthView) view = "Month"; |
165 | else if (mCurrentView == mListView) view = "List"; | 165 | else if (mCurrentView == mListView) view = "List"; |
166 | else if (mCurrentView == mJournalView) view = "Journal"; | 166 | else if (mCurrentView == mJournalView) view = "Journal"; |
167 | else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; | 167 | else if (mCurrentView == mTimeSpanView) view = "TimeSpan"; |
168 | else if (mCurrentView == mTodoView) view = "Todo"; | 168 | else if (mCurrentView == mTodoView) view = "Todo"; |
169 | else view = "Agenda"; | 169 | else view = "Agenda"; |
170 | 170 | ||
171 | config->writeEntry("Current View",view); | 171 | config->writeEntry("Current View",view); |
172 | 172 | ||
173 | if (mAgendaView) { | 173 | if (mAgendaView) { |
174 | mAgendaView->writeSettings(config); | 174 | mAgendaView->writeSettings(config); |
175 | } | 175 | } |
176 | if (mTimeSpanView) { | 176 | if (mTimeSpanView) { |
177 | mTimeSpanView->writeSettings(config); | 177 | mTimeSpanView->writeSettings(config); |
178 | } | 178 | } |
179 | if (mListView) { | 179 | if (mListView) { |
180 | mListView->writeSettings(config); | 180 | mListView->writeSettings(config); |
181 | } | 181 | } |
182 | if (mTodoView) { | 182 | if (mTodoView) { |
183 | mTodoView->saveLayout(config,"Todo View"); | 183 | mTodoView->saveLayout(config,"Todo View"); |
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) | 187 | void KOViewManager::showView(KOrg::BaseView *view, bool fullScreen ) |
188 | { | 188 | { |
189 | 189 | ||
190 | //mFlagShowNextxDays = false; | 190 | //mFlagShowNextxDays = false; |
191 | //if(view == mCurrentView) return; | 191 | //if(view == mCurrentView) return; |
192 | if ( view == 0 ) { | 192 | if ( view == 0 ) { |
193 | view = mCurrentView; | 193 | view = mCurrentView; |
194 | if ( view == 0 ) | 194 | if ( view == 0 ) |
195 | return; | 195 | return; |
196 | } | 196 | } |
197 | bool full = fullScreen; | 197 | bool full = fullScreen; |
198 | if(view == mCurrentView && view != mWhatsNextView ) { | 198 | if(view == mCurrentView && view != mWhatsNextView ) { |
199 | if ( mCurrentAgendaView < 0 ) | 199 | if ( mCurrentAgendaView < 0 ) |
200 | return; | 200 | return; |
201 | full = mMainView->leftFrame()->isVisible(); | 201 | full = mMainView->leftFrame()->isVisible(); |
202 | } else { | 202 | } else { |
203 | if ( view == mMonthView && mMonthView) | ||
204 | mMonthView->setIgnoreResizeEvent( 1 ); | ||
203 | mCurrentView = view; | 205 | mCurrentView = view; |
204 | // bool full = fullScreen; | 206 | // bool full = fullScreen; |
205 | bool isFull = !mMainView->leftFrame()->isVisible(); | 207 | bool isFull = !mMainView->leftFrame()->isVisible(); |
206 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) | 208 | if ( isFull && KOPrefs::instance()->mViewChangeHoldFullscreen ) |
207 | full = true; | 209 | full = true; |
208 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) | 210 | if ( !isFull && KOPrefs::instance()->mViewChangeHoldNonFullscreen ) |
209 | full = false; | 211 | full = false; |
210 | } | 212 | } |
211 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); | 213 | if ( mAgendaView ) mAgendaView->deleteSelectedDateTime(); |
212 | //raiseCurrentView( full ); | 214 | //raiseCurrentView( full ); |
213 | mMainView->processIncidenceSelection( 0 ); | 215 | mMainView->processIncidenceSelection( 0 ); |
214 | //mMainView->updateView(); | 216 | //mMainView->updateView(); |
215 | raiseCurrentView( full, true ); | 217 | raiseCurrentView( full, true ); |
216 | mMainView->adaptNavigationUnits(); | 218 | mMainView->adaptNavigationUnits(); |
217 | } | 219 | } |
218 | 220 | ||
219 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) | 221 | void KOViewManager::raiseCurrentView( bool fullScreen, bool callUpdateView ) |
220 | { | 222 | { |
221 | mCurrentAgendaView = 0; | 223 | mCurrentAgendaView = 0; |
222 | int wid = mMainView->width() ; | 224 | int wid = mMainView->width() ; |
223 | int hei = mMainView->height(); | 225 | int hei = mMainView->height(); |
224 | if ( mCurrentView == mMonthView ) { | 226 | if ( mCurrentView == mMonthView ) { |
225 | if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { | 227 | if ( true /* !KOPrefs::instance()->mMonthViewWeek*/ ) { |
226 | |||
227 | mMonthView->setIgnoreResizeEvent( 2 ,mMainView->navigatorBar()->height()); | ||
228 | mMainView->navigatorBar()->show(); | 228 | mMainView->navigatorBar()->show(); |
229 | hei -= mMainView->navigatorBar()->sizeHint().height(); | 229 | hei -= mMainView->navigatorBar()->sizeHint().height(); |
230 | } | 230 | } |
231 | //mMainView->navigatorBar()->hide(); | 231 | //mMainView->navigatorBar()->hide(); |
232 | } else { | 232 | } else { |
233 | mMainView->navigatorBar()->hide(); | 233 | mMainView->navigatorBar()->hide(); |
234 | } | 234 | } |
235 | if ( fullScreen ) { | 235 | if ( fullScreen ) { |
236 | mMainView->leftFrame()->hide(); | 236 | mMainView->leftFrame()->hide(); |
237 | } else { | 237 | } else { |
238 | mMainView->leftFrame()->show(); | 238 | mMainView->leftFrame()->show(); |
239 | if ( KOPrefs::instance()->mVerticalScreen ) | 239 | if ( KOPrefs::instance()->mVerticalScreen ) |
240 | hei -= mMainView->leftFrame()->height(); | 240 | hei -= mMainView->leftFrame()->height(); |
241 | else | 241 | else |
242 | wid -= mMainView->leftFrame()->width(); | 242 | wid -= mMainView->leftFrame()->width(); |
243 | } | 243 | } |
244 | emit signalFullScreen( !fullScreen ); | 244 | emit signalFullScreen( !fullScreen ); |
245 | if ( callUpdateView ) | 245 | if ( callUpdateView ) |
246 | mMainView->updateView(); | 246 | mMainView->updateView(); |
247 | 247 | ||
248 | if ( globalFlagBlockAgenda == 5 ) { | 248 | if ( globalFlagBlockAgenda == 5 ) { |
249 | globalFlagBlockAgenda = 4; | 249 | globalFlagBlockAgenda = 4; |
250 | globalFlagBlockAgendaItemPaint = 1; | 250 | globalFlagBlockAgendaItemPaint = 1; |
251 | } | 251 | } |
252 | mMainView->viewStack()->raiseWidget(mCurrentView); | 252 | mMainView->viewStack()->raiseWidget(mCurrentView); |
253 | if ( globalFlagBlockAgenda == 4 ) { | 253 | if ( globalFlagBlockAgenda == 4 ) { |
254 | if ( mCurrentView == mAgendaView ) { | 254 | if ( mCurrentView == mAgendaView ) { |
255 | //globalFlagBlockAgenda =1 ; | 255 | //globalFlagBlockAgenda =1 ; |
256 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) | 256 | if ( KOPrefs::instance()->mSetTimeToDayStartAt ) |
257 | mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); | 257 | mAgendaView->setStartHour( KOPrefs::instance()->mDayBegins ); |
258 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) | 258 | else if ( KOPrefs::instance()->mCenterOnCurrentTime ) |
259 | mAgendaView->setStartHour( QTime::currentTime ().hour() ); | 259 | mAgendaView->setStartHour( QTime::currentTime ().hour() ); |
260 | qApp->processEvents(); | 260 | qApp->processEvents(); |
261 | //qDebug("qApp->processEvents() "); | 261 | //qDebug("qApp->processEvents() "); |
262 | globalFlagBlockAgenda = 0; | 262 | globalFlagBlockAgenda = 0; |
263 | mAgendaView->repaintAgenda(); | 263 | mAgendaView->repaintAgenda(); |
264 | 264 | ||
265 | } | 265 | } |
266 | globalFlagBlockAgenda = 0; | 266 | globalFlagBlockAgenda = 0; |
267 | } | 267 | } |
268 | emit signalAgendaView( mCurrentView == mAgendaView ); | 268 | emit signalAgendaView( mCurrentView == mAgendaView ); |
269 | //qDebug("raiseCurrentView ende "); | 269 | //qDebug("raiseCurrentView ende "); |
270 | 270 | ||
271 | } | 271 | } |
272 | 272 | ||
273 | void KOViewManager::updateView() | 273 | void KOViewManager::updateView() |
274 | { | 274 | { |
275 | // qDebug("KOViewManager::updateView() "); | 275 | // qDebug("KOViewManager::updateView() "); |