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
This commit is contained in:
Dominik Riebeling 2008-05-23 21:07:58 +00:00
parent 9c3bbc3bf9
commit 64e7705e68
2 changed files with 15 additions and 0 deletions

View file

@ -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"));

View file

@ -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();