summaryrefslogtreecommitdiffstats
path: root/rbutil
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2008-05-23 21:07:58 +0000
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2008-05-23 21:07:58 +0000
commit64e7705e68cc5d67c0af1a7a375fa03a65c30ad0 (patch)
tree527ca407ee0607ded9ea82bc693337c6188d4ca3 /rbutil
parent9c3bbc3bf9685db4887dc5fa1ffc558811ce78b9 (diff)
downloadrockbox-64e7705e68cc5d67c0af1a7a375fa03a65c30ad0.tar.gz
rockbox-64e7705e68cc5d67c0af1a7a375fa03a65c30ad0.tar.bz2
rockbox-64e7705e68cc5d67c0af1a7a375fa03a65c30ad0.zip
Add a slot to set the progress bar value and a member to hide it.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17615 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'rbutil')
-rw-r--r--rbutil/rbutilqt/progressloggergui.cpp13
-rw-r--r--rbutil/rbutilqt/progressloggergui.h2
2 files changed, 15 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/progressloggergui.cpp b/rbutil/rbutilqt/progressloggergui.cpp
index 15ddc18663..a96778bc11 100644
--- a/rbutil/rbutilqt/progressloggergui.cpp
+++ b/rbutil/rbutilqt/progressloggergui.cpp
@@ -59,6 +59,13 @@ void ProgressLoggerGui::addItem(const QString &text, int flag)
dp.listProgress->scrollToItem(item);
}
+void ProgressLoggerGui::setProgress(int value, int max)
+{
+ setProgressValue(value);
+ setProgressMax(max);
+}
+
+
void ProgressLoggerGui::setProgressValue(int value)
{
dp.progressBar->setValue(value);
@@ -74,6 +81,12 @@ int ProgressLoggerGui::getProgressMax()
return dp.progressBar->maximum();
}
+void ProgressLoggerGui::setProgressVisible(bool b)
+{
+ dp.progressBar->setVisible(b);
+}
+
+
void ProgressLoggerGui::abort()
{
dp.buttonAbort->setText(tr("&Ok"));
diff --git a/rbutil/rbutilqt/progressloggergui.h b/rbutil/rbutilqt/progressloggergui.h
index 41e7012df0..231e6d82c9 100644
--- a/rbutil/rbutilqt/progressloggergui.h
+++ b/rbutil/rbutilqt/progressloggergui.h
@@ -33,6 +33,7 @@ public:
virtual void setProgressValue(int value);
virtual void setProgressMax(int max);
virtual int getProgressMax();
+ virtual void setProgressVisible(bool);
signals:
virtual void aborted();
@@ -41,6 +42,7 @@ signals:
public slots:
virtual void addItem(const QString &text); //! add a string to the progress list
virtual void addItem(const QString &text, int flag); //! add a string to the list
+ virtual void setProgress(int, int); //! set progress bar
virtual void abort();
virtual void undoAbort();