#include <kvbox.h>
DolphinStatusBar::DolphinStatusBar(DolphinView* parent) :
- KHBox(parent),
- m_messageLabel(0),
- m_spaceInfo(0),
- m_progressBar(0),
- m_progress(100)
+ KHBox(parent),
+ m_messageLabel(0),
+ m_spaceInfo(0),
+ m_progressBar(0),
+ m_progress(100)
{
setSpacing(4);
DolphinStatusBar::~DolphinStatusBar()
-{
-}
+{}
void DolphinStatusBar::setMessage(const QString& msg,
Type type)
{
if (percent < 0) {
percent = 0;
- }
- else if (percent > 100) {
+ } else if (percent > 100) {
percent = 100;
}
const QString& defaultText = m_messageLabel->defaultText();
const QString msg(m_messageLabel->text());
if ((percent == 0) && !msg.isEmpty()) {
- setMessage(QString::null, Default);
- }
- else if ((percent == 100) && (msg != defaultText)) {
+ setMessage(QString(), Default);
+ } else if ((percent == 100) && (msg != defaultText)) {
setMessage(defaultText, Default);
}
}
m_progressText->show();
m_progressBar->show();
}
- }
- else {
+ } else {
// hide the progress information and show the space information
m_progressText->hide();
m_progressBar->hide();
if (isProgressBarVisible || (widthGap > 0)) {
m_spaceInfo->hide();
}
- }
- else if (widthGap + m_spaceInfo->width() <= 0) {
+ } else if (widthGap + m_spaceInfo->width() <= 0) {
m_spaceInfo->show();
}
}