From 6ec1a1eb364f70d33922a6936f01d981e9e7f620 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 20 Nov 2010 17:17:35 +0000 Subject: Allow to cancel the loading of search results. BUG: 257421 FIXED-IN: 4.6.0 svn path=/trunk/KDE/kdebase/apps/; revision=1199112 --- src/statusbar/dolphinstatusbar.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/statusbar/dolphinstatusbar.cpp') diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp index 687c00935..4cfa3aeae 100644 --- a/src/statusbar/dolphinstatusbar.cpp +++ b/src/statusbar/dolphinstatusbar.cpp @@ -52,6 +52,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) : m_zoomSlider(0), m_zoomIn(0), m_progressBar(0), + m_stopButton(0), m_progress(100), m_messageTimeStamp() { @@ -100,6 +101,13 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) : m_spaceInfo->setUrl(m_view->url()); // Initialize progress information + m_stopButton = new QToolButton(this); + m_stopButton->setIcon(KIcon("process-stop")); + // TODO: Add tooltip for KDE SC 4.7.0, if new strings are allowed again + m_stopButton->setAutoRaise(true); + m_stopButton->hide(); + connect(m_stopButton, SIGNAL(clicked()), this, SIGNAL(stopPressed())); + m_progressText = new QLabel(this); m_progressText->hide(); @@ -126,6 +134,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) : topLayout->addWidget(m_messageLabel); topLayout->addWidget(m_zoomWidget); topLayout->addWidget(m_spaceInfo); + topLayout->addWidget(m_stopButton); topLayout->addWidget(m_progressText); topLayout->addWidget(m_progressBar); @@ -341,11 +350,13 @@ void DolphinStatusBar::updateProgressInfo() // Show the progress information and hide the extensions setExtensionsVisible(false); if (!isErrorShown) { + m_stopButton->show(); m_progressText->show(); m_progressBar->show(); } } else { // Hide the progress information and show the extensions + m_stopButton->hide(); m_progressText->hide(); m_progressBar->hide(); setExtensionsVisible(true); -- cgit v1.3