Copyright 2010 Comarch S.A.
*******************************************************************************/
-
/*!
- \file XdxfDictDownloadProgressDialog.cpp
- \author Mateusz Półrola <mateusz.polrola@comarch.com>
- */
+ \file XdxfDictDownloadProgressDialog.cpp
+ \brief Shows downloading progress bar.
+
+ \author Mateusz Półrola <mateusz.polrola@comarch.com>
+*/
#include "XdxfDictDownloadProgressDialog.h"
connect(cancelButton, SIGNAL(clicked()),
this, SIGNAL(cancelDownloading()));
-
#ifndef Q_WS_MAEMO_5
downloadLabel = new QLabel(this);
verticalLayout->addWidget(downloadLabel, 0, Qt::AlignCenter);
verticalLayout->addWidget(downloadProgressBar);
verticalLayout->addWidget(cancelButton);
-
setModal(true);
#ifndef Q_WS_MAEMO_5
}
+void XdxfDictDownloadProgressDialog::show() {
+ downloadProgressBar->setMaximum(0);
+ QDialog::show();
+}
+
+
void XdxfDictDownloadProgressDialog::setText(QString text) {
setWindowTitle(text);
#ifndef Q_WS_MAEMO_5
#endif
}
+
+void XdxfDictDownloadProgressDialog::updateProgress(float progress) {
+ if(downloadProgressBar->maximum() == 0) {
+ downloadProgressBar->setMaximum(100);
+ }
+ downloadProgressBar->setValue(progress*100);
+}
+
+
void XdxfDictDownloadProgressDialog::reject() {
#ifndef Q_WS_MAEMO_5
Q_EMIT cancelDownloading();