Commit 6f093152 authored by Sebastian Sauer's avatar Sebastian Sauer
Browse files

Display progressbar during export.

svn path=/trunk/koffice/; revision=599670
parent 16606142
......@@ -30,6 +30,7 @@
#include <QVBoxLayout>
#include <QSizePolicy>
#include <QApplication>
#include <QProgressDialog>
#include <QtDesigner/QFormBuilder>
#include <kdebug.h>
......@@ -413,6 +414,22 @@ QString FormModule::showMessageBox(const QString& dialogtype, const QString& cap
}
}
QWidget* FormModule::showProgressDialog(const QString& caption, const QString& labelText)
{
QProgressDialog* progress = new QProgressDialog();
//progress->setWindowModality(Qt::WindowModal);
progress->setModal(true);
progress->setWindowTitle(caption);
progress->setLabelText(labelText);
progress->setAutoClose(true);
progress->setAutoReset(true);
progress->setCancelButtonText(QString());
progress->setMinimumWidth(300);
progress->setSizePolicy(QSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding));
progress->show();
return progress;
}
QWidget* FormModule::createDialog(const QString& caption)
{
return new FormDialog(caption);
......
......@@ -231,6 +231,16 @@ namespace Kross {
*/
QString showMessageBox(const QString& dialogtype, const QString& caption, const QString& message);
/**
* Show a progressdialog to provide visible feedback on the progress
* of a slow operation.
*
* \param caption The caption the progressdialog displays.
* \param labelText The displayed label.
* \return The QProgressDialog widget instance.
*/
QWidget* showProgressDialog(const QString& caption, const QString& labelText);
/**
* Create and return a new \a FormDialog instance.
*
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment