diff --git a/GUI/View/Import/RealDataPropertiesWidget.cpp b/GUI/View/Import/RealDataPropertiesWidget.cpp index 0937e8d3ff86cc382ebfdd8a1dde141c11e0f181..a808662ce9d17fa485213046e25ad4831714f369 100644 --- a/GUI/View/Import/RealDataPropertiesWidget.cpp +++ b/GUI/View/Import/RealDataPropertiesWidget.cpp @@ -18,7 +18,6 @@ #include "GUI/Model/Instrument/InstrumentModel.h" #include "GUI/Model/Instrument/LinkInstrumentManager.h" #include "GUI/Model/Project/ProjectDocument.h" -#include "GUI/View/Main/MainWindow.h" #include <QComboBox> #include <QLabel> #include <QVBoxLayout> diff --git a/GUI/View/Import/RealDataSelectorWidget.cpp b/GUI/View/Import/RealDataSelectorWidget.cpp index 849e3418cab911856fb171af1dfdca1488f961cf..57ce3be471e9ef793ba93d9f1f0c3d6c159ea5bd 100644 --- a/GUI/View/Import/RealDataSelectorWidget.cpp +++ b/GUI/View/Import/RealDataSelectorWidget.cpp @@ -25,7 +25,6 @@ #include "GUI/View/Import/ImportDataUtils.h" #include "GUI/View/Import/RealDataPropertiesWidget.h" #include "GUI/View/Import/RealDataTreeModel.h" -#include "GUI/View/Main/MainWindow.h" #include "GUI/View/Main/ProjectManager.h" #include "GUI/View/Tool/MessageBox.h" #include <QFileDialog> diff --git a/GUI/View/Instrument/InstrumentListView.cpp b/GUI/View/Instrument/InstrumentListView.cpp index d7c7f64a084d60de594cd9bb9dc6afc307305760..f9fb2b4bd29308da58587889a197c4a3d05c62d2 100644 --- a/GUI/View/Instrument/InstrumentListView.cpp +++ b/GUI/View/Instrument/InstrumentListView.cpp @@ -19,7 +19,6 @@ #include "GUI/Model/State/SessionData.h" #include "GUI/View/Instrument/InstrumentLibraryEditor.h" #include "GUI/View/Instrument/InstrumentListModel.h" -#include "GUI/View/Main/MainWindow.h" #include <QAction> #include <QListView> #include <QMessageBox> @@ -210,7 +209,7 @@ void InstrumentListView::onStoreInLibrary() QModelIndex idx = m_listView->selectionModel()->selectedIndexes().front(); InstrumentItem* instrument = m_model->instrumentForIndex(idx); - InstrumentLibraryEditor dlg(baWin); + InstrumentLibraryEditor dlg(parentWidget()); dlg.setGisasEnabled(m_document->functionalities().testFlag(ProjectDocument::Gisas)); dlg.setOffSpecEnabled(m_document->functionalities().testFlag(ProjectDocument::OffSpecular)); dlg.setSpecularEnabled(m_document->functionalities().testFlag(ProjectDocument::Specular)); @@ -221,12 +220,12 @@ void InstrumentListView::onStoreInLibrary() void InstrumentListView::onLoadFromLibrary() { if (gSessionData->instrumentLibrary.isEmpty()) { - QMessageBox::information(baWin, "Select from library", + QMessageBox::information(parentWidget(), "Select from library", "The library does not contain instruments so far."); return; } - InstrumentLibraryEditor dlg(baWin); + InstrumentLibraryEditor dlg(parentWidget()); dlg.setGisasEnabled(m_document->functionalities().testFlag(ProjectDocument::Gisas)); dlg.setOffSpecEnabled(m_document->functionalities().testFlag(ProjectDocument::OffSpecular)); dlg.setSpecularEnabled(m_document->functionalities().testFlag(ProjectDocument::Specular)); diff --git a/GUI/View/Intensity/IntensityDataCanvas.cpp b/GUI/View/Intensity/IntensityDataCanvas.cpp index 7ce92378ff9c0cdef59d56cb1c47e9a72e5dcc22..e98e15fb86ffdf73e37136780e6c1cc5af20b41d 100644 --- a/GUI/View/Intensity/IntensityDataCanvas.cpp +++ b/GUI/View/Intensity/IntensityDataCanvas.cpp @@ -19,7 +19,6 @@ #include "GUI/View/Intensity/ColorMap.h" #include "GUI/View/Intensity/ColorMapCanvas.h" #include "GUI/View/Intensity/SavePlotAssistant.h" -#include "GUI/View/Main/MainWindow.h" #include "GUI/View/Main/ProjectManager.h" #include "GUI/View/Tool/MessageBox.h" #include <QAction> @@ -119,7 +118,8 @@ void IntensityDataCanvas::rotateData() const QString title("Rotate data"); const QString message("Rotation will break the link between the data and the instrument. " "Detector masks or projections, if they exist, will be removed."); - if (!GUI::View::Helpers::question(baWin, title, message, "Do you wish to rotate the data?", + if (!GUI::View::Helpers::question(parentWidget(), + title, message, "Do you wish to rotate the data?", "Yes, please rotate", "No, cancel data rotation")) return; } diff --git a/GUI/View/SpecularDataWidgets/SpecularDataImportWidget.cpp b/GUI/View/SpecularDataWidgets/SpecularDataImportWidget.cpp index b8bdf79816ea95272a93caba42d31218609c43f0..8b5c122cfe0ad0e2786a18646d1c8b40ab95b044 100644 --- a/GUI/View/SpecularDataWidgets/SpecularDataImportWidget.cpp +++ b/GUI/View/SpecularDataWidgets/SpecularDataImportWidget.cpp @@ -20,7 +20,6 @@ #include "GUI/Model/IO/DataLoaders1D.h" #include "GUI/Model/Instrument/InstrumentItems.h" #include "GUI/View/Loaders/DataLoaderUtil.h" -#include "GUI/View/Main/MainWindow.h" #include "ui_SpecularDataImportWidget.h" #include <QAction> #include <QBoxLayout> @@ -199,7 +198,7 @@ void SpecularDataImportWidget::onFormatSelectionChanged() QSignalBlocker b(m_ui->formatSelectionComboBox); m_ui->formatSelectionComboBox->setCurrentText(m_loader->name()); - QMessageBox::information(MainWindow::instance(), "Information", + QMessageBox::information(parentWidget(), "Information", "Changing the loader is not possible because the original file " "contents are not available any more.");