X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/7ae94915f72857ed4825ef6b78e4753896be28f9..39f89141b06c:/src/statusbar/dolphinstatusbar.cpp diff --git a/src/statusbar/dolphinstatusbar.cpp b/src/statusbar/dolphinstatusbar.cpp index 48fd876ab..687c00935 100644 --- a/src/statusbar/dolphinstatusbar.cpp +++ b/src/statusbar/dolphinstatusbar.cpp @@ -20,7 +20,6 @@ #include "dolphinstatusbar.h" -#include "dolphinview.h" #include "dolphin_generalsettings.h" #include @@ -30,7 +29,6 @@ #include #include "settings/dolphinsettings.h" -#include "statusbarmessagelabel.h" #include "statusbarspaceinfo.h" #include @@ -41,7 +39,8 @@ #include #include -#include "zoomlevelinfo.h" +#include +#include DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) : QWidget(parent), @@ -60,7 +59,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) : this, SLOT(updateSpaceInfoContent(const KUrl&))); // Initialize message label - m_messageLabel = new StatusBarMessageLabel(this); + m_messageLabel = new KonqStatusBarMessageLabel(this); // Initialize zoom slider m_zoomWidget = new QWidget(this); @@ -112,9 +111,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) : const int zoomWidgetHeight = m_zoomWidget->minimumSizeHint().height(); const int contentHeight = qMax(fontHeight, zoomWidgetHeight); - m_messageLabel->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); m_messageLabel->setMinimumTextHeight(contentHeight); - m_messageLabel->setMinimumWidth(100); m_spaceInfo->setMaximumSize(200, contentHeight - 5); m_spaceInfo->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); @@ -129,6 +126,7 @@ DolphinStatusBar::DolphinStatusBar(QWidget* parent, DolphinView* view) : topLayout->addWidget(m_messageLabel); topLayout->addWidget(m_zoomWidget); topLayout->addWidget(m_spaceInfo); + topLayout->addWidget(m_progressText); topLayout->addWidget(m_progressBar); setExtensionsVisible(true); @@ -156,7 +154,8 @@ void DolphinStatusBar::setMessage(const QString& msg, timeout = 0; } - if ((message == m_messageLabel->text()) && (type == m_messageLabel->type())) { + KonqStatusBarMessageLabel::Type konqType = static_cast(type); + if ((message == m_messageLabel->text()) && (konqType == m_messageLabel->type())) { // the message is already shown return; } @@ -172,7 +171,7 @@ void DolphinStatusBar::setMessage(const QString& msg, return; } - m_messageLabel->setMessage(message, type); + m_messageLabel->setMessage(message, konqType); if (type != Default) { m_messageTimeStamp = currentTime; } @@ -180,7 +179,7 @@ void DolphinStatusBar::setMessage(const QString& msg, DolphinStatusBar::Type DolphinStatusBar::type() const { - return m_messageLabel->type(); + return static_cast(m_messageLabel->type()); } QString DolphinStatusBar::message() const @@ -215,7 +214,7 @@ void DolphinStatusBar::setProgress(int percent) } m_progress = percent; - if (m_messageLabel->type() == Error) { + if (m_messageLabel->type() == KonqStatusBarMessageLabel::Error) { // Don't update any widget or status bar text if an // error message is shown return; @@ -291,7 +290,7 @@ void DolphinStatusBar::contextMenuEvent(QContextMenuEvent* event) QApplication::clipboard()->setMimeData(mimeData); } else if (action == showZoomSliderAction) { const bool visible = showZoomSliderAction->isChecked(); - settings->setShowZoomSlider(visible); + settings->setShowZoomSlider(visible); m_zoomWidget->setVisible(visible); } else if (action == showSpaceInfoAction) { const bool visible = showSpaceInfoAction->isChecked(); @@ -337,7 +336,7 @@ void DolphinStatusBar::showZoomSliderToolTip(int zoomLevel) void DolphinStatusBar::updateProgressInfo() { - const bool isErrorShown = (m_messageLabel->type() == Error); + const bool isErrorShown = (m_messageLabel->type() == KonqStatusBarMessageLabel::Error); if (m_progress < 100) { // Show the progress information and hide the extensions setExtensionsVisible(false);