BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Public Types | |
enum | ViewId { WELCOME , INSTRUMENT , SAMPLE , IMPORT , SIMULATION , JOB , SESSIONMODEL } |
Public Slots | |
void | onFocusRequest (int index) |
void | onRunSimulationShortcut () |
void | onSessionModelViewActive (bool isActive) |
Inserts/removes developers SessionModelView on the left tabbar. More... | |
void | openRecentProject () |
Signals | |
void | currentViewChanged (ViewId newView) |
Public Member Functions | |
MainWindow () | |
~MainWindow () | |
QWidget * | currentView () const |
InstrumentModel * | instrumentModel () |
JobModel * | jobModel () |
LinkInstrumentManager * | linkInstrumentManager () |
MaterialModel * | materialModel () |
ApplicationModels * | models () |
QProgressBar * | progressBar () |
ProjectManager * | projectManager () |
RealDataModel * | realDataModel () |
SampleModel * | sampleModel () |
void | setCurrentView (int viewId) |
QStatusBar * | statusBar () |
UpdateNotifier * | updateNotifier () |
Static Public Member Functions | |
static MainWindow * | instance () |
Returns the one and only instance of this class. More... | |
Protected Member Functions | |
void | closeEvent (QCloseEvent *event) |
Private Member Functions | |
void | addView (ViewId id, const QIcon &icon, const QString &title, const QString &tooltip, QWidget *view) |
QToolButton * | createViewSelectionButton () const |
void | initApplication () |
void | initConnections () |
void | initProgressBar () |
void | initViews () |
void | readSettings () |
void | updateViewSelectionButtonsGeometry () const |
Recalculate the size of the view selection buttons to show complete button text. More... | |
void | writeSettings () |
Private Attributes | |
ActionManager * | m_actionManager |
ApplicationModels * | m_applicationModels |
ImportDataView * | m_importDataView |
InstrumentView * | m_instrumentView |
JobView * | m_jobView |
LinkInstrumentManager * | m_linkManager |
QProgressBar * | m_progressBar |
ProjectManager * | m_projectManager |
SampleView * | m_sampleView |
SessionModelView * | m_sessionModelView |
SimulationView * | m_simulationView |
QStatusBar * | m_statusBar |
ToolTipDataBase * | m_toolTipDataBase |
UpdateNotifier * | m_updateNotifier |
QButtonGroup * | m_viewSelectionButtons |
QVBoxLayout * | m_viewSelectionButtonsLayout |
QStackedLayout * | m_viewsStack |
WelcomeView * | m_welcomeView |
Static Private Attributes | |
static MainWindow * | s_instance = nullptr |
Holds the one and only instance of this class. More... | |
Definition at line 47 of file mainwindow.h.
enum MainWindow::ViewId |
Enumerator | |
---|---|
WELCOME | |
INSTRUMENT | |
SAMPLE | |
IMPORT | |
SIMULATION | |
JOB | |
SESSIONMODEL |
Definition at line 51 of file mainwindow.h.
|
explicit |
Definition at line 48 of file mainwindow.cpp.
References ASSERT, createViewSelectionButton(), initApplication(), initConnections(), initProgressBar(), initViews(), instrumentModel(), m_linkManager, m_statusBar, m_viewSelectionButtons, m_viewSelectionButtonsLayout, m_viewsStack, readSettings(), realDataModel(), s_instance, setCurrentView(), and LinkInstrumentManager::setModels().
MainWindow::~MainWindow | ( | ) |
Definition at line 124 of file mainwindow.cpp.
References s_instance.
|
private |
Definition at line 347 of file mainwindow.cpp.
References createViewSelectionButton(), m_viewSelectionButtons, m_viewSelectionButtonsLayout, m_viewsStack, and updateViewSelectionButtonsGeometry().
Referenced by initViews().
|
protected |
Definition at line 239 of file mainwindow.cpp.
References ProjectManager::closeCurrentProject(), jobModel(), m_projectManager, GUIHelpers::warning(), and writeSettings().
|
private |
QWidget * MainWindow::currentView | ( | ) | const |
Definition at line 189 of file mainwindow.cpp.
References m_viewsStack.
Referenced by ActionManager::onAboutToShowViewMenu().
|
signal |
Referenced by ActionManager::ActionManager(), and setCurrentView().
|
private |
Definition at line 256 of file mainwindow.cpp.
References Constants::APPLICATION_NAME, GUIHelpers::getBornAgainVersionString(), and GUI_OS_Utils::HostOsInfo::isMacHost().
Referenced by MainWindow().
|
private |
Definition at line 342 of file mainwindow.cpp.
References JobView::focusRequest(), m_jobView, and onFocusRequest().
Referenced by MainWindow().
|
private |
Definition at line 272 of file mainwindow.cpp.
References m_progressBar, and m_viewSelectionButtonsLayout.
Referenced by MainWindow().
|
private |
Definition at line 281 of file mainwindow.cpp.
References addView(), m_importDataView, m_instrumentView, m_jobView, m_sampleView, m_sessionModelView, m_simulationView, m_welcomeView, onSessionModelViewActive(), Constants::S_SESSIONMODELVIEW, and Constants::S_VIEWISACTIVE.
Referenced by MainWindow().
|
static |
Returns the one and only instance of this class.
Definition at line 129 of file mainwindow.cpp.
References s_instance.
Referenced by RealDataPropertiesWidget::RealDataPropertiesWidget(), LinkInstrumentManager::canLinkDataToInstrument(), GUIHelpers::information(), SampleView::models(), SpecularDataImportWidget::onFormatSelectionChanged(), RealDataPropertiesWidget::onInstrumentComboIndexChanged(), RealDataSelectorWidget::rotateCurrentItem(), MaterialItemUtils::selectMaterialProperty(), RealDataPropertiesWidget::updateInstrumentComboEntries(), and GUIHelpers::warning().
InstrumentModel * MainWindow::instrumentModel | ( | ) |
Definition at line 139 of file mainwindow.cpp.
References ApplicationModels::instrumentModel(), and models().
Referenced by MainWindow(), and SessionModelView::modelsForTabs().
JobModel * MainWindow::jobModel | ( | ) |
Definition at line 154 of file mainwindow.cpp.
References ApplicationModels::jobModel(), and models().
Referenced by JobProgressAssistant::JobProgressAssistant(), closeEvent(), JobView::connectJobRelated(), JobView::createSubWindows(), and SessionModelView::modelsForTabs().
LinkInstrumentManager * MainWindow::linkInstrumentManager | ( | ) |
Definition at line 164 of file mainwindow.cpp.
References m_linkManager.
MaterialModel * MainWindow::materialModel | ( | ) |
Definition at line 134 of file mainwindow.cpp.
References ApplicationModels::materialModel(), and models().
Referenced by SessionModelView::modelsForTabs(), PyImportAssistant::populateModels(), and TestView::test_MaterialEditor().
ApplicationModels * MainWindow::models | ( | ) |
Definition at line 159 of file mainwindow.cpp.
References m_applicationModels.
Referenced by SimulationView::SimulationView(), ProjectManager::createNewProject(), ProjectManager::deleteCurrentProject(), instrumentModel(), jobModel(), materialModel(), SampleView::models(), realDataModel(), and sampleModel().
|
slot |
Definition at line 202 of file mainwindow.cpp.
References m_viewSelectionButtons.
Referenced by initConnections().
|
slot |
Definition at line 215 of file mainwindow.cpp.
References m_simulationView, and SimulationView::onRunSimulationShortcut().
Referenced by ActionManager::createGlobalShortcuts().
|
slot |
Inserts/removes developers SessionModelView on the left tabbar.
Definition at line 225 of file mainwindow.cpp.
References ASSERT, m_viewSelectionButtons, m_viewsStack, and SESSIONMODEL.
Referenced by initViews(), and ActionManager::setSessionModelViewActive().
|
slot |
Definition at line 207 of file mainwindow.cpp.
References m_projectManager, and ProjectManager::openProject().
Referenced by ActionManager::onAboutToShowFileMenu().
QProgressBar * MainWindow::progressBar | ( | ) |
Definition at line 169 of file mainwindow.cpp.
References m_progressBar.
Referenced by JobProgressAssistant::onGlobalProgress().
ProjectManager * MainWindow::projectManager | ( | ) |
Definition at line 179 of file mainwindow.cpp.
References m_projectManager.
Referenced by ActionManager::createActions(), ActionManager::onAboutToShowFileMenu(), ActionManager::onAboutToShowSettingsMenu(), and WelcomeView::projectManager().
|
private |
Definition at line 319 of file mainwindow.cpp.
References m_projectManager, ProjectManager::readSettings(), Constants::S_MAINWINDOW, Constants::S_WINDOWPOSITION, and Constants::S_WINDOWSIZE.
Referenced by MainWindow().
RealDataModel * MainWindow::realDataModel | ( | ) |
Definition at line 149 of file mainwindow.cpp.
References models(), and ApplicationModels::realDataModel().
Referenced by ImportDataView::ImportDataView(), MainWindow(), and SessionModelView::modelsForTabs().
SampleModel * MainWindow::sampleModel | ( | ) |
Definition at line 144 of file mainwindow.cpp.
References models(), and ApplicationModels::sampleModel().
Referenced by SessionModelView::modelsForTabs(), PyImportAssistant::populateModels(), and TestView::test_ba3d().
void MainWindow::setCurrentView | ( | int | viewId | ) |
Definition at line 194 of file mainwindow.cpp.
References currentViewChanged(), and m_viewsStack.
Referenced by MainWindow().
QStatusBar * MainWindow::statusBar | ( | ) |
Definition at line 174 of file mainwindow.cpp.
References m_statusBar.
UpdateNotifier * MainWindow::updateNotifier | ( | ) |
Definition at line 184 of file mainwindow.cpp.
References m_updateNotifier.
Referenced by ActionManager::toggleCheckForUpdates().
|
private |
Recalculate the size of the view selection buttons to show complete button text.
Definition at line 363 of file mainwindow.cpp.
References m_progressBar, m_viewSelectionButtons, and m_viewSelectionButtonsLayout.
Referenced by addView().
|
private |
Definition at line 331 of file mainwindow.cpp.
References m_projectManager, Constants::S_MAINWINDOW, Constants::S_WINDOWPOSITION, Constants::S_WINDOWSIZE, and ProjectManager::writeSettings().
Referenced by closeEvent().
|
private |
Definition at line 112 of file mainwindow.h.
|
private |
Definition at line 109 of file mainwindow.h.
Referenced by models().
|
private |
Definition at line 119 of file mainwindow.h.
Referenced by initViews().
|
private |
Definition at line 117 of file mainwindow.h.
Referenced by initViews().
|
private |
Definition at line 121 of file mainwindow.h.
Referenced by initConnections(), and initViews().
|
private |
Definition at line 110 of file mainwindow.h.
Referenced by MainWindow(), and linkInstrumentManager().
|
private |
Definition at line 103 of file mainwindow.h.
Referenced by initProgressBar(), progressBar(), and updateViewSelectionButtonsGeometry().
|
private |
Definition at line 111 of file mainwindow.h.
Referenced by closeEvent(), openRecentProject(), projectManager(), readSettings(), and writeSettings().
|
private |
Definition at line 118 of file mainwindow.h.
Referenced by initViews().
|
private |
Definition at line 122 of file mainwindow.h.
Referenced by initViews().
|
private |
Definition at line 120 of file mainwindow.h.
Referenced by initViews(), and onRunSimulationShortcut().
|
private |
Definition at line 107 of file mainwindow.h.
Referenced by MainWindow(), and statusBar().
|
private |
Definition at line 113 of file mainwindow.h.
|
private |
Definition at line 114 of file mainwindow.h.
Referenced by updateNotifier().
|
private |
Definition at line 104 of file mainwindow.h.
Referenced by MainWindow(), addView(), onFocusRequest(), onSessionModelViewActive(), and updateViewSelectionButtonsGeometry().
|
private |
Definition at line 106 of file mainwindow.h.
Referenced by MainWindow(), addView(), initProgressBar(), and updateViewSelectionButtonsGeometry().
|
private |
Definition at line 105 of file mainwindow.h.
Referenced by MainWindow(), addView(), currentView(), onSessionModelViewActive(), and setCurrentView().
|
private |
Definition at line 116 of file mainwindow.h.
Referenced by initViews().
|
staticprivate |
Holds the one and only instance of this class.
Definition at line 125 of file mainwindow.h.
Referenced by MainWindow(), ~MainWindow(), and instance().