author | zautrix <zautrix> | 2005-01-26 23:12:59 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-01-26 23:12:59 (UTC) |
commit | f20b5e71f9ae61b18f0ced792508b40432ad50b6 (patch) (unidiff) | |
tree | 3dde48c6dcecf2e5c19d3e7a62aba57c385e92df | |
parent | 15351333eff09beadb6e691e9f0aab2aaf0a95a0 (diff) | |
download | kdepimpi-f20b5e71f9ae61b18f0ced792508b40432ad50b6.zip kdepimpi-f20b5e71f9ae61b18f0ced792508b40432ad50b6.tar.gz kdepimpi-f20b5e71f9ae61b18f0ced792508b40432ad50b6.tar.bz2 |
fixes
-rw-r--r-- | korganizer/koagendaview.cpp | 2 | ||||
-rw-r--r-- | korganizer/koagendaview.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/korganizer/koagendaview.cpp b/korganizer/koagendaview.cpp index b5596d9..05216a7 100644 --- a/korganizer/koagendaview.cpp +++ b/korganizer/koagendaview.cpp | |||
@@ -202,12 +202,13 @@ void TimeLabels::setAgenda(KOAgenda* agenda) | |||
202 | mAgenda = agenda; | 202 | mAgenda = agenda; |
203 | } | 203 | } |
204 | 204 | ||
205 | void TimeLabels::contentsMousePressEvent ( QMouseEvent * e) | 205 | void TimeLabels::contentsMousePressEvent ( QMouseEvent * e) |
206 | { | 206 | { |
207 | mMouseDownY = e->pos().y(); | 207 | mMouseDownY = e->pos().y(); |
208 | mOrgCap = topLevelWidget()->caption(); | ||
208 | } | 209 | } |
209 | 210 | ||
210 | void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e ) | 211 | void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e ) |
211 | { | 212 | { |
212 | int diff = mMouseDownY - e->pos().y(); | 213 | int diff = mMouseDownY - e->pos().y(); |
213 | if ( diff < 10 && diff > -10 ) | 214 | if ( diff < 10 && diff > -10 ) |
@@ -220,12 +221,13 @@ void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e ) | |||
220 | tSize = (tSize-2)/2; | 221 | tSize = (tSize-2)/2; |
221 | topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize)); | 222 | topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize)); |
222 | 223 | ||
223 | } | 224 | } |
224 | void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e ) | 225 | void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e ) |
225 | { | 226 | { |
227 | topLevelWidget()->setCaption( mOrgCap ); | ||
226 | int diff = mMouseDownY - e->pos().y(); | 228 | int diff = mMouseDownY - e->pos().y(); |
227 | if ( diff < 10 && diff > -10 ) | 229 | if ( diff < 10 && diff > -10 ) |
228 | return; | 230 | return; |
229 | int tSize = KOPrefs::instance()->mHourSize + (diff/10); | 231 | int tSize = KOPrefs::instance()->mHourSize + (diff/10); |
230 | if ( tSize < 4 ) | 232 | if ( tSize < 4 ) |
231 | tSize = 4; | 233 | tSize = 4; |
diff --git a/korganizer/koagendaview.h b/korganizer/koagendaview.h index 221b0ea..3cf938f 100644 --- a/korganizer/koagendaview.h +++ b/korganizer/koagendaview.h | |||
@@ -74,12 +74,13 @@ class TimeLabels : public QScrollView { | |||
74 | void scaleChanged(); | 74 | void scaleChanged(); |
75 | protected: | 75 | protected: |
76 | void drawContents(QPainter *p,int cx, int cy, int cw, int ch); | 76 | void drawContents(QPainter *p,int cx, int cy, int cw, int ch); |
77 | 77 | ||
78 | private: | 78 | private: |
79 | int mMouseDownY; | 79 | int mMouseDownY; |
80 | QString mOrgCap; | ||
80 | int mRows; | 81 | int mRows; |
81 | int mCellHeight; | 82 | int mCellHeight; |
82 | 83 | ||
83 | /** */ | 84 | /** */ |
84 | KOAgenda* mAgenda; | 85 | KOAgenda* mAgenda; |
85 | }; | 86 | }; |