┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dolphinstatusbar.cpp22
-rw-r--r--src/dolphinstatusbar.h17
2 files changed, 6 insertions, 33 deletions
diff --git a/src/dolphinstatusbar.cpp b/src/dolphinstatusbar.cpp
index 84e18d3b6..eabbc77b1 100644
--- a/src/dolphinstatusbar.cpp
+++ b/src/dolphinstatusbar.cpp
@@ -39,10 +39,8 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) :
m_messageLabel(0),
m_spaceInfo(0),
m_zoomSlider(0),
- m_zoomTimer(0),
m_progressBar(0),
- m_progress(100),
- m_requestedZoomLevel(0)
+ m_progress(100)
{
setSpacing(4);
@@ -67,16 +65,10 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) :
m_zoomSlider->setValue(view->zoomLevel());
connect(m_zoomSlider, SIGNAL(sliderMoved(int)),
- this, SLOT(requestZoomLevel(int)));
+ this, SLOT(setZoomLevel(int)));
connect(m_view, SIGNAL(zoomLevelChanged(int)),
m_zoomSlider, SLOT(setValue(int)));
- m_zoomTimer = new QTimer(this);
- m_zoomTimer->setSingleShot(true);
- m_zoomTimer->setInterval(50);
- connect(m_zoomTimer, SIGNAL(timeout()),
- this, SLOT(updateZoomLevel()));
-
// initialize progress informatino
m_progressText = new QLabel(this);
m_progressText->hide();
@@ -210,15 +202,9 @@ void DolphinStatusBar::updateSpaceInfoContent(const KUrl& url)
assureVisibleText();
}
-void DolphinStatusBar::requestZoomLevel(int zoomLevel)
-{
- m_requestedZoomLevel = zoomLevel;
- m_zoomTimer->start();
-}
-
-void DolphinStatusBar::updateZoomLevel()
+void DolphinStatusBar::setZoomLevel(int zoomLevel)
{
- m_view->setZoomLevel(m_requestedZoomLevel);
+ m_view->setZoomLevel(zoomLevel);
}
void DolphinStatusBar::assureVisibleText()
diff --git a/src/dolphinstatusbar.h b/src/dolphinstatusbar.h
index 49f14357d..3cee1ed53 100644
--- a/src/dolphinstatusbar.h
+++ b/src/dolphinstatusbar.h
@@ -131,19 +131,9 @@ private slots:
void updateSpaceInfoContent(const KUrl& url);
/**
- * Requests setting the zoom level to \a zoomLevel by applying it
- * to m_requestedZoomLevel and triggering a short timer, which will
- * invoke DolphinStatusBar::updateZoomLevel(). This assures no blocking
- * of the zoom slider when zooming views having a huge number of
- * items.
+ * Sets the zoom level of the item view to \a zoomLevel.
*/
- void requestZoomLevel(int zoomLevel);
-
- /**
- * Updates the zoom level to m_requestedZoomLevel (see also
- * DolphinStatusBar::requestZoomLevel().
- */
- void updateZoomLevel();
+ void setZoomLevel(int zoomLevel);
/**
* Assures that the text of the statusbar stays visible by hiding
@@ -166,13 +156,10 @@ private:
StatusBarMessageLabel* m_messageLabel;
StatusBarSpaceInfo* m_spaceInfo;
QSlider* m_zoomSlider;
- QTimer* m_zoomTimer;
QLabel* m_progressText;
QProgressBar* m_progressBar;
int m_progress;
-
- int m_requestedZoomLevel;
};
#endif