diff options
Diffstat (limited to 'rbutil/rbutilqt/progressloggergui.cpp')
-rw-r--r-- | rbutil/rbutilqt/progressloggergui.cpp | 24 |
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 | ||
22 | ProgressLoggerGui::ProgressLoggerGui(QObject* parent): ProgressloggerInterface(parent) | 22 | ProgressLoggerGui::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 | 31 | void ProgressLoggerGui::addItem(const QString &text) | |
32 | void ProgressLoggerGui::addItem(QString text) | ||
33 | { | 32 | { |
34 | dp.listProgress->addItem(text); | 33 | addItem(text, LOGNOICON); |
35 | } | 34 | } |
36 | 35 | ||
37 | void ProgressLoggerGui::addItem(QString text,int flag) | 36 | void 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 | ||
60 | void ProgressLoggerGui::setProgressValue(int value) | 62 | void ProgressLoggerGui::setProgressValue(int value) |
61 | { | 63 | { |
62 | dp.progressBar->setValue(value); | 64 | dp.progressBar->setValue(value); |
63 | } | 65 | } |
64 | 66 | ||
65 | void ProgressLoggerGui::setProgressMax(int max) | 67 | void ProgressLoggerGui::setProgressMax(int max) |
66 | { | 68 | { |
@@ -70,7 +72,7 @@ void ProgressLoggerGui::setProgressMax(int max) | |||
70 | int ProgressLoggerGui::getProgressMax() | 72 | int ProgressLoggerGui::getProgressMax() |
71 | { | 73 | { |
72 | return dp.progressBar->maximum(); | 74 | return dp.progressBar->maximum(); |
73 | } | 75 | } |
74 | 76 | ||
75 | void ProgressLoggerGui::abort() | 77 | void ProgressLoggerGui::abort() |
76 | { | 78 | { |