summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp4
-rw-r--r--korganizer/koagendaview.cpp37
-rw-r--r--korganizer/koagendaview.h7
-rw-r--r--korganizer/kodialogmanager.cpp7
4 files changed, 51 insertions, 4 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 06454c2..1d5a57e 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -2515,5 +2515,5 @@ void CalendarView::showEventEditor()
2515 mEventEditor = mDialogManager->getEventEditor(); 2515 mEventEditor = mDialogManager->getEventEditor();
2516 topLevelWidget()->setCaption( i18n("") );
2516 } 2517 }
2517 mEventEditor->showMaximized(); 2518 mEventEditor->showMaximized();
2518 topLevelWidget()->setCaption( i18n("") );
2519#endif 2519#endif
@@ -2530,5 +2530,5 @@ void CalendarView::showTodoEditor()
2530 mTodoEditor = mDialogManager->getTodoEditor(); 2530 mTodoEditor = mDialogManager->getTodoEditor();
2531 topLevelWidget()->setCaption( i18n("") );
2531 } 2532 }
2532 mTodoEditor->showMaximized(); 2533 mTodoEditor->showMaximized();
2533 topLevelWidget()->setCaption( i18n("") );
2534#endif 2534#endif
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp
index 6428757..b5596d9 100644
--- a/korganizer/koagendaview.cpp
+++ b/korganizer/koagendaview.cpp
@@ -203,3 +203,38 @@ void TimeLabels::setAgenda(KOAgenda* agenda)
203} 203}
204
205void TimeLabels::contentsMousePressEvent ( QMouseEvent * e)
206{
207 mMouseDownY = e->pos().y();
208}
209
210void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e )
211{
212 int diff = mMouseDownY - e->pos().y();
213 if ( diff < 10 && diff > -10 )
214 return;
215 int tSize = KOPrefs::instance()->mHourSize + (diff/10) ;
216 if ( tSize < 4 )
217 tSize = 4;
218 if ( tSize > 18 )
219 tSize = 18;
220 tSize = (tSize-2)/2;
221 topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize));
204 222
223}
224void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e )
225{
226 int diff = mMouseDownY - e->pos().y();
227 if ( diff < 10 && diff > -10 )
228 return;
229 int tSize = KOPrefs::instance()->mHourSize + (diff/10);
230 if ( tSize < 4 )
231 tSize = 4;
232 if ( tSize > 18 )
233 tSize = 18;
234 tSize = (tSize/2)*2;
235 if ( tSize == KOPrefs::instance()->mHourSize )
236 return;
237 KOPrefs::instance()->mHourSize = tSize;
238 emit scaleChanged();
239}
205 240
@@ -412,2 +447,4 @@ KOAgendaView::KOAgendaView(Calendar *cal,QWidget *parent,const char *name) :
412 agendaLayout->addWidget(mTimeLabels,1,0); 447 agendaLayout->addWidget(mTimeLabels,1,0);
448 connect(mTimeLabels,SIGNAL( scaleChanged()),
449 this,SLOT(updateConfig()));
413 450
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h
index 0079253..221b0ea 100644
--- a/korganizer/koagendaview.h
+++ b/korganizer/koagendaview.h
@@ -65,2 +65,5 @@ class TimeLabels : public QScrollView {
65 virtual void paintEvent(QPaintEvent* e); 65 virtual void paintEvent(QPaintEvent* e);
66 void contentsMousePressEvent ( QMouseEvent * ) ;
67 void contentsMouseReleaseEvent ( QMouseEvent * );
68 void contentsMouseMoveEvent ( QMouseEvent * );
66 69
@@ -69,3 +72,4 @@ class TimeLabels : public QScrollView {
69 void positionChanged(); 72 void positionChanged();
70 73 signals:
74 void scaleChanged();
71 protected: 75 protected:
@@ -74,2 +78,3 @@ class TimeLabels : public QScrollView {
74 private: 78 private:
79 int mMouseDownY;
75 int mRows; 80 int mRows;
diff --git a/korganizer/kodialogmanager.cpp b/korganizer/kodialogmanager.cpp
index c99c0cb..41a4dc1 100644
--- a/korganizer/kodialogmanager.cpp
+++ b/korganizer/kodialogmanager.cpp
@@ -295,2 +295,5 @@ KOEventEditor *KODialogManager::getEventEditor()
295 295
296#ifndef DESKTOP_VERSION
297 eventEditor->resize( QApplication::desktop()->width() -20, 100 );
298#endif
296 return eventEditor; 299 return eventEditor;
@@ -322,3 +325,5 @@ KOTodoEditor *KODialogManager::getTodoEditor()
322 //connect(mMainView,SIGNAL(closingDown()),todoEditor,SLOT(reject())); 325 //connect(mMainView,SIGNAL(closingDown()),todoEditor,SLOT(reject()));
323 326#ifndef DESKTOP_VERSION
327 todoEditor->resize( QApplication::desktop()->width() -20, 100 );
328#endif
324 return todoEditor; 329 return todoEditor;