summaryrefslogtreecommitdiffabout
path: root/korganizer/koagendaview.cpp
Unidiff
Diffstat (limited to 'korganizer/koagendaview.cpp') (more/less context) (show whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 05216a7..f54f7bc 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -207,41 +207,41 @@ void TimeLabels::contentsMousePressEvent ( QMouseEvent * e)
207 mMouseDownY = e->pos().y(); 207 mMouseDownY = e->pos().y();
208 mOrgCap = topLevelWidget()->caption(); 208 mOrgCap = topLevelWidget()->caption();
209} 209}
210 210
211void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e ) 211void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e )
212{ 212{
213 int diff = mMouseDownY - e->pos().y(); 213 int diff = mMouseDownY - e->pos().y();
214 if ( diff < 10 && diff > -10 ) 214 if ( diff < 10 && diff > -10 )
215 return; 215 return;
216 int tSize = KOPrefs::instance()->mHourSize + (diff/10) ; 216 int tSize = KOPrefs::instance()->mHourSize + (diff/10) ;
217 if ( tSize < 4 ) 217 if ( tSize < 4 )
218 tSize = 4; 218 tSize = 4;
219 if ( tSize > 18 ) 219 if ( tSize > 22 )
220 tSize = 18; 220 tSize = 22;
221 tSize = (tSize-2)/2; 221 tSize = (tSize-2)/2;
222 topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize)); 222 topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize));
223 223
224} 224}
225void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e ) 225void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e )
226{ 226{
227 topLevelWidget()->setCaption( mOrgCap ); 227 topLevelWidget()->setCaption( mOrgCap );
228 int diff = mMouseDownY - e->pos().y(); 228 int diff = mMouseDownY - e->pos().y();
229 if ( diff < 10 && diff > -10 ) 229 if ( diff < 10 && diff > -10 )
230 return; 230 return;
231 int tSize = KOPrefs::instance()->mHourSize + (diff/10); 231 int tSize = KOPrefs::instance()->mHourSize + (diff/10);
232 if ( tSize < 4 ) 232 if ( tSize < 4 )
233 tSize = 4; 233 tSize = 4;
234 if ( tSize > 18 ) 234 if ( tSize > 22 )
235 tSize = 18; 235 tSize = 22;
236 tSize = (tSize/2)*2; 236 tSize = (tSize/2)*2;
237 if ( tSize == KOPrefs::instance()->mHourSize ) 237 if ( tSize == KOPrefs::instance()->mHourSize )
238 return; 238 return;
239 KOPrefs::instance()->mHourSize = tSize; 239 KOPrefs::instance()->mHourSize = tSize;
240 emit scaleChanged(); 240 emit scaleChanged();
241} 241}
242 242
243/** This is called in response to repaint() */ 243/** This is called in response to repaint() */
244void TimeLabels::paintEvent(QPaintEvent*) 244void TimeLabels::paintEvent(QPaintEvent*)
245{ 245{
246 246
247 // kdDebug() << "paintevent..." << endl; 247 // kdDebug() << "paintevent..." << endl;