GUI: Make Settings-dialog a parent of Add Application-dialog.

This commit is contained in:
Kimmo Varis 2009-06-06 12:57:16 +03:00
parent 13eb74173c
commit db17236000
3 changed files with 7 additions and 3 deletions

View File

@ -28,7 +28,9 @@
ApplicationDialog::ApplicationDialog(const QString &name, ApplicationDialog::ApplicationDialog(const QString &name,
const QString &path, const QString &path,
const QString &title) const QString &title,
QWidget *parent) :
QDialog(parent)
{ {
QVBoxLayout *layout = new QVBoxLayout(); QVBoxLayout *layout = new QVBoxLayout();
mName = new QLineEdit(name); mName = new QLineEdit(name);

View File

@ -38,10 +38,12 @@ public:
* @param name Default name for the application to start * @param name Default name for the application to start
* @param path Path for the application * @param path Path for the application
* @param title Title for the dialog * @param title Title for the dialog
* @param parent Parent widget
*/ */
ApplicationDialog(const QString &name, ApplicationDialog(const QString &name,
const QString &path, const QString &path,
const QString &title); const QString &title,
QWidget *parent = 0);
virtual ~ApplicationDialog(); virtual ~ApplicationDialog();
/** /**

View File

@ -214,7 +214,7 @@ void SettingsDialog::SaveCheckboxValue(QCheckBox *box, const QString &name)
void SettingsDialog::AddApplication() void SettingsDialog::AddApplication()
{ {
ApplicationDialog dialog("", "", tr("Add a new application")); ApplicationDialog dialog("", "", tr("Add a new application"), this);
if (dialog.exec() == QDialog::Accepted) if (dialog.exec() == QDialog::Accepted)
{ {