summaryrefslogtreecommitdiff
path: root/rbutil/rbutilqt/progressloggergui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'rbutil/rbutilqt/progressloggergui.cpp')
-rw-r--r--rbutil/rbutilqt/progressloggergui.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/rbutil/rbutilqt/progressloggergui.cpp b/rbutil/rbutilqt/progressloggergui.cpp
index 5bf7b92aaa..0d3fcb4187 100644
--- a/rbutil/rbutilqt/progressloggergui.cpp
+++ b/rbutil/rbutilqt/progressloggergui.cpp
@@ -16,7 +16,7 @@
16 * KIND, either express or implied. 16 * KIND, either express or implied.
17 * 17 *
18 ****************************************************************************/ 18 ****************************************************************************/
19 19
20#include "progressloggergui.h" 20#include "progressloggergui.h"
21 21
22ProgressLoggerGui::ProgressLoggerGui(QObject* parent): ProgressloggerInterface(parent) 22ProgressLoggerGui::ProgressLoggerGui(QObject* parent): ProgressloggerInterface(parent)
@@ -28,18 +28,19 @@ ProgressLoggerGui::ProgressLoggerGui(QObject* parent): ProgressloggerInterface(p
28 connect(dp.buttonAbort, SIGNAL(clicked()), this, SLOT(abort())); 28 connect(dp.buttonAbort, SIGNAL(clicked()), this, SLOT(abort()));
29} 29}
30 30
31 31void ProgressLoggerGui::addItem(const QString &text)
32void ProgressLoggerGui::addItem(QString text)
33{ 32{
34 dp.listProgress->addItem(text); 33 addItem(text, LOGNOICON);
35} 34}
36 35
37void ProgressLoggerGui::addItem(QString text,int flag) 36void ProgressLoggerGui::addItem(const QString &text, int flag)
38{ 37{
39 QListWidgetItem* item = new QListWidgetItem(text); 38 QListWidgetItem* item = new QListWidgetItem(text);
40 39
41 switch(flag) 40 switch(flag)
42 { 41 {
42 case LOGNOICON:
43 break;
43 case LOGOK: 44 case LOGOK:
44 item->setIcon(QIcon(":/icons/icons/go-next.png")); 45 item->setIcon(QIcon(":/icons/icons/go-next.png"));
45 break; 46 break;
@@ -53,14 +54,15 @@ void ProgressLoggerGui::addItem(QString text,int flag)
53 item->setIcon(QIcon(":/icons/icons/dialog-error.png")); 54 item->setIcon(QIcon(":/icons/icons/dialog-error.png"));
54 break; 55 break;
55 } 56 }
56 57
57 dp.listProgress->addItem(item); 58 dp.listProgress->addItem(item);
58} 59 dp.listProgress->scrollToItem(item);
60}
59 61
60void ProgressLoggerGui::setProgressValue(int value) 62void ProgressLoggerGui::setProgressValue(int value)
61{ 63{
62 dp.progressBar->setValue(value); 64 dp.progressBar->setValue(value);
63} 65}
64 66
65void ProgressLoggerGui::setProgressMax(int max) 67void ProgressLoggerGui::setProgressMax(int max)
66{ 68{
@@ -70,7 +72,7 @@ void ProgressLoggerGui::setProgressMax(int max)
70int ProgressLoggerGui::getProgressMax() 72int ProgressLoggerGui::getProgressMax()
71{ 73{
72 return dp.progressBar->maximum(); 74 return dp.progressBar->maximum();
73} 75}
74 76
75void ProgressLoggerGui::abort() 77void ProgressLoggerGui::abort()
76{ 78{