diff --git a/sources/diagramprintdialog.cpp b/sources/diagramprintdialog.cpp index bd37d6c49..0c535c7dc 100644 --- a/sources/diagramprintdialog.cpp +++ b/sources/diagramprintdialog.cpp @@ -78,7 +78,7 @@ QString DiagramPrintDialog::docName() const { void DiagramPrintDialog::exec() { // affichage du dialogue d'impression standard - QPrintDialog print_dialog(printer); + QPrintDialog print_dialog(printer, parentWidget()); print_dialog.setEnabledOptions(QAbstractPrintDialog::PrintToFile | QAbstractPrintDialog::PrintShowPageSize); #ifndef Q_OS_WIN32 if (!pdf_name.isEmpty()) printer -> setOutputFileName(pdf_name); @@ -142,7 +142,7 @@ int DiagramPrintDialog::verticalPagesCount(bool fullpage) const { Construit un dialogue non standard pour demander les pages a imprimer a l'utilisateur */ void DiagramPrintDialog::buildDialog() { - dialog = new QDialog(); + dialog = new QDialog(parentWidget()); dialog -> setWindowTitle(tr("Options d'impression")); options_label = new QLabel(); use_full_page = new QCheckBox(tr("Utiliser toute la feuille")); diff --git a/sources/diagramview.cpp b/sources/diagramview.cpp index ba02afd00..c057d72c1 100644 --- a/sources/diagramview.cpp +++ b/sources/diagramview.cpp @@ -340,7 +340,7 @@ bool DiagramView::open(QString n_fichier, int *erreur) { qreal diagram_version = root.attribute("version").toDouble(&conv_ok); if (conv_ok && QET::version.toDouble() < diagram_version) { QMessageBox::warning( - 0, + this, tr("Avertissement"), tr("Ce document semble avoir \351t\351 enregistr\351 avec une " "version ult\351rieure de QElectroTech. Il est possible que " @@ -521,7 +521,7 @@ bool DiagramView::saveDiagramToFile(QString &n_fichier) { Exporte le schema. */ void DiagramView::dialogExport() { - ExportDialog ed(scene, this); + ExportDialog ed(scene, diagramEditor()); ed.exec(); } @@ -558,7 +558,7 @@ void DiagramView::dialogEditInfos() { BorderProperties border = scene -> border_and_inset.exportBorder(); // construit le dialogue - QDialog popup; + QDialog popup(diagramEditor()); popup.setMinimumWidth(400); popup.setWindowTitle(tr("Propri\351t\351s du sch\351ma")); @@ -725,7 +725,7 @@ void DiagramView::editConductor(Conductor *edited_conductor) { ConductorPropertiesWidget *cpw = new ConductorPropertiesWidget(old_properties); // l'insere dans un dialogue - QDialog conductor_dialog; + QDialog conductor_dialog(diagramEditor()); conductor_dialog.setWindowTitle(tr("\311diter les propri\351t\351s d'un conducteur")); QVBoxLayout *dialog_layout = new QVBoxLayout(&conductor_dialog); dialog_layout -> addWidget(cpw); @@ -784,7 +784,7 @@ void DiagramView::editDefaultConductorProperties() { ConductorPropertiesWidget *cpw = new ConductorPropertiesWidget(scene -> defaultConductorProperties); // l'insere dans un dialogue - QDialog conductor_dialog; + QDialog conductor_dialog(diagramEditor()); conductor_dialog.setWindowTitle(tr("\311diter les propri\351t\351s par d\351faut des conducteurs")); QVBoxLayout *dialog_layout = new QVBoxLayout(&conductor_dialog); dialog_layout -> addWidget(cpw); diff --git a/sources/editor/elementscene.cpp b/sources/editor/elementscene.cpp index 057510b9b..f6096aad8 100644 --- a/sources/editor/elementscene.cpp +++ b/sources/editor/elementscene.cpp @@ -536,7 +536,7 @@ void ElementScene::slot_delete() { */ void ElementScene::slot_editSizeHotSpot() { // cree un dialogue - QDialog dialog_sh; + QDialog dialog_sh(element_editor); dialog_sh.setModal(true); dialog_sh.setWindowTitle(tr("\311diter la taille et le point de saisie")); QVBoxLayout *dialog_layout = new QVBoxLayout(&dialog_sh); @@ -575,7 +575,7 @@ void ElementScene::slot_editSizeHotSpot() { void ElementScene::slot_editOrientations() { // cree un dialogue - QDialog dialog_ori; + QDialog dialog_ori(element_editor); dialog_ori.setModal(true); dialog_ori.setMinimumSize(400, 260); dialog_ori.setWindowTitle(tr("\311diter les orientations")); @@ -621,7 +621,7 @@ void ElementScene::slot_editOrientations() { void ElementScene::slot_editNames() { // cree un dialogue - QDialog dialog; + QDialog dialog(element_editor); dialog.setModal(true); dialog.setMinimumSize(400, 330); dialog.setWindowTitle(tr("\311diter les noms")); diff --git a/sources/editor/qetelementeditor.cpp b/sources/editor/qetelementeditor.cpp index 5759adf63..3913d64b3 100644 --- a/sources/editor/qetelementeditor.cpp +++ b/sources/editor/qetelementeditor.cpp @@ -582,7 +582,7 @@ bool QETElementEditor::isReadOnly() const { Lance l'assistant de creation d'un nouvel element. */ void QETElementEditor::slot_new() { - NewElementWizard new_element_wizard; + NewElementWizard new_element_wizard(this); new_element_wizard.exec(); } diff --git a/sources/elementspanel.cpp b/sources/elementspanel.cpp index 3d4e99f40..f8d75d622 100644 --- a/sources/elementspanel.cpp +++ b/sources/elementspanel.cpp @@ -317,7 +317,7 @@ void ElementsPanel::launchElementEditor(const QString &filename) { @param filename Chemin du dossier representant la categorie */ void ElementsPanel::launchCategoryEditor(const QString &filename) { - ElementsCategoryEditor ece(filename, true); + ElementsCategoryEditor ece(filename, true, this); if (ece.exec() == QDialog::Accepted) reload(); } diff --git a/sources/elementspanelwidget.cpp b/sources/elementspanelwidget.cpp index 0a61e3c7a..4bfce2355 100644 --- a/sources/elementspanelwidget.cpp +++ b/sources/elementspanelwidget.cpp @@ -107,7 +107,7 @@ void ElementsPanelWidget::reloadAndFilter() { Appelle l'assistant de creation de nouvel element */ void ElementsPanelWidget::newElement() { - NewElementWizard new_element_wizard; + NewElementWizard new_element_wizard(this); new_element_wizard.exec(); } @@ -115,7 +115,7 @@ void ElementsPanelWidget::newElement() { Lance le gestionnaire de categories */ void ElementsPanelWidget::newCategory() { - QDialog new_category_dialog; + QDialog new_category_dialog(this); new_category_dialog.setMinimumSize(480, 280); new_category_dialog.setWindowTitle(tr("Gestionnaire de cat\351gories")); diff --git a/sources/qetdiagrameditor.cpp b/sources/qetdiagrameditor.cpp index 15384f202..ae33b7b71 100644 --- a/sources/qetdiagrameditor.cpp +++ b/sources/qetdiagrameditor.cpp @@ -1060,7 +1060,7 @@ void QETDiagramEditor::writeSettings() { @see ConfigDialog */ void QETDiagramEditor::configureQET() { - ConfigDialog cd; + ConfigDialog cd(this); cd.exec(); }