summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/koagendaview.cpp2
-rw-r--r--korganizer/koagendaview.h1
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)
mAgenda = agenda;
}
void TimeLabels::contentsMousePressEvent ( QMouseEvent * e)
{
mMouseDownY = e->pos().y();
+ mOrgCap = topLevelWidget()->caption();
}
void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e )
{
int diff = mMouseDownY - e->pos().y();
if ( diff < 10 && diff > -10 )
@@ -220,12 +221,13 @@ void TimeLabels::contentsMouseMoveEvent ( QMouseEvent * e )
tSize = (tSize-2)/2;
topLevelWidget()->setCaption(i18n("New Agendasize: %1").arg(tSize));
}
void TimeLabels::contentsMouseReleaseEvent ( QMouseEvent * e )
{
+ topLevelWidget()->setCaption( mOrgCap );
int diff = mMouseDownY - e->pos().y();
if ( diff < 10 && diff > -10 )
return;
int tSize = KOPrefs::instance()->mHourSize + (diff/10);
if ( tSize < 4 )
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 {
void scaleChanged();
protected:
void drawContents(QPainter *p,int cx, int cy, int cw, int ch);
private:
int mMouseDownY;
+ QString mOrgCap;
int mRows;
int mCellHeight;
/** */
KOAgenda* mAgenda;
};