#include <QDebug>
-XdxfCachingDialog::XdxfCachingDialog(XdxfPlugin *parent) //:
-// QDialog((QWidget*)parent)
-{
+XdxfCachingDialog::XdxfCachingDialog(XdxfPlugin *parent) {
verticalLayout = new QVBoxLayout(this);
setLayout(verticalLayout);
connect(cancelButton, SIGNAL(clicked()),
this, SIGNAL(cancelCaching()));
- connect(parent, SIGNAL(updateCachingProgress(int, int)),
- this, SLOT(updateCachingProgress(int, int)));
+ connect(parent, SIGNAL(updateCachingProgress(int, int)),
+ this, SLOT(updateCachingProgress(int, int)));
time.start();
+
+ setModal(true);
+}
+
+
+void XdxfCachingDialog::reject() {
+ return;
}
void XdxfCachingDialog::updateCachingProgress(int progress, int time) {
int seconds = float((100 - progress)*time) / (5*1000);
cachingLabel->setText(tr("Estimated time left: ") +
- /*QString::number(seconds)*/ tr("%n second(s)", "", seconds));
+ tr("%n second(s)", "", seconds));
if(progress >= 100)
- this->hide();
-
-
-}
-
-void XdxfCachingDialog::reject() {
- return;
-}
-
-void XdxfCachingDialog::cancelButtonClicked(){
- return;
+ this->accept();
}