[SCM] Kaboom - Debian KDE 3->4 migration tool branch, master, updated. a4a97fed60950f74bc67e80a21b8c52851260a4a
David Palacio
dpalacio-guest at alioth.debian.org
Sun Mar 1 00:40:43 UTC 2009
The following commit has been merged in the master branch:
commit a4a97fed60950f74bc67e80a21b8c52851260a4a
Author: David Palacio <dpalacio at uninorte.edu.co>
Date: Sat Feb 28 19:44:05 2009 -0500
modal dialog for space check
diff --git a/choicepage.cpp b/choicepage.cpp
index b1aaea9..39a5651 100644
--- a/choicepage.cpp
+++ b/choicepage.cpp
@@ -17,6 +17,7 @@
#include "choicepage.h"
#include "diroperations/diroperations.h"
#include "richradiobutton.h"
+#include "diroperations/progresswidget.h"
class ChoicePagePrivate
{
@@ -93,10 +94,14 @@ ChoicePage::ChoicePage(QWidget *parent) : QWizardPage(parent)
blay->addWidget(recheck);
lay->addWidget(d->backupinformation);
connect(recheck,SIGNAL(clicked()),this,SLOT(checkSpaceForBackup()));
- QTimer::singleShot(0, this, SLOT(checkSpaceForBackup()));
}
}
+void ChoicePage::initializePage()
+{
+ checkSpaceForBackup();
+}
+
bool ChoicePage::backupSelected() const
{
if(0)
@@ -106,10 +111,17 @@ bool ChoicePage::backupSelected() const
void ChoicePage::checkSpaceForBackup()
{
+ QDialog dialog(this);
+ QVBoxLayout *play = new QVBoxLayout(&dialog);
+ ProgressWidget *progress = new ProgressWidget;
+ play->addWidget(progress);
+ dialog.setWindowModality(Qt::WindowModal);
+ dialog.setWindowTitle(tr("Checking disk space..."));
+ dialog.show();
quint64 dirsize = -1;
try
{
- dirsize = DirOperations::calculateDirSize(QDir::homePath()+KDEDIR);
+ dirsize = DirOperations::calculateDirSize(QDir::homePath()+KDEDIR,progress);
}
catch (const DirOperations::Exception&)
{
@@ -122,6 +134,7 @@ void ChoicePage::checkSpaceForBackup()
d->spacebar->setValue(round(static_cast<double>(partsize-freespace)/static_cast<double>(partsize)*100));
d->freeinfo->setText(tr("The current KDE settings and data directory takes up %1 bytes").arg(dirsize));
d->backupinformation->setVisible(true);
+ d->backup->hide();
}
else
{
diff --git a/choicepage.h b/choicepage.h
index b299d76..ae98e8f 100644
--- a/choicepage.h
+++ b/choicepage.h
@@ -27,6 +27,7 @@ class ChoicePage : public QWizardPage
ChoicePage(QWidget *parent=0);
bool backupSelected() const;
MigrationTool::Selection selected() const;
+ void initializePage();
private slots:
void checkSpaceForBackup();
private:
--
Kaboom - Debian KDE 3->4 migration tool
More information about the pkg-kde-commits
mailing list