BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Definition at line 39 of file MainWindow.h.
Public Types | |
enum | ViewId { WELCOME , PROJECT , 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 () override | |
QWidget * | currentView () const |
QProgressBar * | progressBar () |
ProjectManager * | projectManager () |
void | setCurrentView (int viewId) |
UpdateNotifier * | updateNotifier () |
void | updateTitle () |
Protected Member Functions | |
void | closeEvent (QCloseEvent *event) override |
Private Member Functions | |
void | addView (ViewId id, const QIcon &icon, const QString &title, const QString &tooltip, QWidget *view) |
QToolButton * | createViewSelectionButton () const |
void | initApplication () |
void | initProgressBar () |
void | initViews () |
void | onAboutToCloseDocument () |
void | onDocumentModified () |
void | onDocumentOpenedOrClosed (bool open) |
void | raiseView (int viewId) |
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 |
ImportDataView * | m_importDataView |
InstrumentView * | m_instrumentView |
JobView * | m_jobView |
QProgressBar * | m_progressBar |
ProjectManager * | m_projectManager |
ProjectSettingsView * | m_projectSettingsView |
SampleView * | m_sampleView |
SessionModelView * | m_sessionModelView |
SimulationView * | m_simulationView |
UpdateNotifier * | m_updateNotifier |
QButtonGroup * | m_viewSelectionButtons |
QVBoxLayout * | m_viewSelectionButtonsLayout |
QStackedLayout * | m_viewsStack |
WelcomeView * | m_welcomeView |
enum MainWindow::ViewId |
Enumerator | |
---|---|
WELCOME | |
PROJECT | |
INSTRUMENT | |
SAMPLE | |
IMPORT | |
SIMULATION | |
JOB | |
SESSIONMODEL |
Definition at line 43 of file MainWindow.h.
|
explicit |
Definition at line 44 of file MainWindow.cpp.
References ProjectManager::aboutToCloseDocument(), appSettings, ApplicationSettings::createNewProjectOnStartup(), createViewSelectionButton(), ProjectManager::documentModified(), ProjectManager::documentOpenedOrClosed(), initApplication(), initProgressBar(), initViews(), m_projectManager, m_viewSelectionButtons, m_viewSelectionButtonsLayout, m_viewsStack, ProjectManager::newProject(), onAboutToCloseDocument(), onDocumentModified(), onDocumentOpenedOrClosed(), raiseView(), readSettings(), updateTitle(), and GUI::ID::WELCOME.
|
overridedefault |
|
private |
Definition at line 302 of file MainWindow.cpp.
References createViewSelectionButton(), m_viewSelectionButtons, m_viewSelectionButtonsLayout, m_viewsStack, and updateViewSelectionButtonsGeometry().
Referenced by initViews().
|
overrideprotected |
Definition at line 194 of file MainWindow.cpp.
References ProjectManager::closeCurrentProject(), gSessionData, m_projectManager, SessionData::projectDocument, GUI::View::Helpers::warning(), and writeSettings().
|
private |
QWidget * MainWindow::currentView | ( | ) | const |
Definition at line 127 of file MainWindow.cpp.
References m_viewsStack.
Referenced by ActionManager::onAboutToShowViewMenu().
|
signal |
Referenced by ActionManager::ActionManager(), and raiseView().
|
private |
|
private |
Definition at line 221 of file MainWindow.cpp.
References m_progressBar, and m_viewSelectionButtonsLayout.
Referenced by MainWindow().
|
private |
Definition at line 230 of file MainWindow.cpp.
References addView(), JobView::focusRequest(), gSessionData, GUI::ID::IMPORT, GUI::ID::INSTRUMENT, GUI::ID::JOB, JobView, m_importDataView, m_instrumentView, m_jobView, m_projectSettingsView, m_sampleView, m_sessionModelView, m_simulationView, m_welcomeView, onFocusRequest(), onSessionModelViewActive(), GUI::ID::PROJECT, SessionData::projectDocument, GUI::Constants::S_SESSIONMODELVIEW, GUI::Constants::S_VIEWISACTIVE, GUI::ID::SAMPLE, GUI::ID::SESSIONMODEL, GUI::ID::SIMULATION, and GUI::ID::WELCOME.
Referenced by MainWindow(), and onDocumentOpenedOrClosed().
|
private |
Definition at line 369 of file MainWindow.cpp.
References m_importDataView, m_instrumentView, m_jobView, m_sampleView, m_sessionModelView, m_simulationView, m_viewSelectionButtons, setCurrentView(), updateViewSelectionButtonsGeometry(), and WELCOME.
Referenced by MainWindow().
|
private |
Definition at line 364 of file MainWindow.cpp.
References updateTitle().
Referenced by MainWindow().
|
private |
Definition at line 356 of file MainWindow.cpp.
References initViews(), PROJECT, setCurrentView(), and updateTitle().
Referenced by MainWindow().
|
slot |
Definition at line 157 of file MainWindow.cpp.
References m_viewSelectionButtons.
Referenced by initViews().
|
slot |
Definition at line 170 of file MainWindow.cpp.
References m_simulationView, and SimulationView::simulate().
Referenced by ActionManager::createGlobalShortcuts().
|
slot |
Inserts/removes developers SessionModelView on the left tabbar.
Definition at line 180 of file MainWindow.cpp.
References m_viewSelectionButtons, m_viewsStack, SESSIONMODEL, and GUI::ID::SESSIONMODEL.
Referenced by initViews(), and ActionManager::setSessionModelViewActive().
|
slot |
Definition at line 162 of file MainWindow.cpp.
References m_projectManager, and ProjectManager::openProject().
Referenced by ActionManager::onAboutToShowFileMenu().
QProgressBar * MainWindow::progressBar | ( | ) |
Definition at line 117 of file MainWindow.cpp.
References m_progressBar.
Referenced by JobProgressAssistant::onGlobalProgress().
ProjectManager * MainWindow::projectManager | ( | ) |
Definition at line 122 of file MainWindow.cpp.
References m_projectManager.
Referenced by ActionManager::createActions(), ActionManager::onAboutToShowFileMenu(), and ActionManager::onAboutToShowSettingsMenu().
|
private |
Definition at line 138 of file MainWindow.cpp.
References currentViewChanged(), and m_viewsStack.
Referenced by MainWindow().
|
private |
Definition at line 279 of file MainWindow.cpp.
References m_projectManager, ProjectManager::readSettings(), GUI::Constants::S_MAINWINDOW, GUI::Constants::S_WINDOWPOSITION, and GUI::Constants::S_WINDOWSIZE.
Referenced by MainWindow().
void MainWindow::setCurrentView | ( | int | viewId | ) |
Definition at line 132 of file MainWindow.cpp.
References m_viewSelectionButtons.
Referenced by onAboutToCloseDocument(), and onDocumentOpenedOrClosed().
UpdateNotifier* MainWindow::updateNotifier | ( | ) |
void MainWindow::updateTitle | ( | ) |
Definition at line 146 of file MainWindow.cpp.
References gSessionData, and SessionData::projectDocument.
Referenced by MainWindow(), onDocumentModified(), and onDocumentOpenedOrClosed().
|
private |
Recalculate the size of the view selection buttons to show complete button text.
Definition at line 318 of file MainWindow.cpp.
References m_progressBar, m_viewSelectionButtons, and m_viewSelectionButtonsLayout.
Referenced by addView(), and onAboutToCloseDocument().
|
private |
Definition at line 291 of file MainWindow.cpp.
References m_projectManager, GUI::Constants::S_MAINWINDOW, GUI::Constants::S_WINDOWPOSITION, GUI::Constants::S_WINDOWSIZE, and ProjectManager::writeSettings().
Referenced by closeEvent().
|
private |
Definition at line 95 of file MainWindow.h.
|
private |
Definition at line 101 of file MainWindow.h.
Referenced by initViews(), and onAboutToCloseDocument().
|
private |
Definition at line 99 of file MainWindow.h.
Referenced by initViews(), and onAboutToCloseDocument().
|
private |
Definition at line 104 of file MainWindow.h.
Referenced by initViews(), and onAboutToCloseDocument().
|
private |
Definition at line 89 of file MainWindow.h.
Referenced by initProgressBar(), progressBar(), and updateViewSelectionButtonsGeometry().
|
private |
Definition at line 94 of file MainWindow.h.
Referenced by MainWindow(), closeEvent(), openRecentProject(), projectManager(), readSettings(), and writeSettings().
|
private |
Definition at line 103 of file MainWindow.h.
Referenced by initViews().
|
private |
Definition at line 100 of file MainWindow.h.
Referenced by initViews(), and onAboutToCloseDocument().
|
private |
Definition at line 105 of file MainWindow.h.
Referenced by initViews(), and onAboutToCloseDocument().
|
private |
Definition at line 102 of file MainWindow.h.
Referenced by initViews(), onAboutToCloseDocument(), and onRunSimulationShortcut().
|
private |
Definition at line 96 of file MainWindow.h.
|
private |
Definition at line 90 of file MainWindow.h.
Referenced by MainWindow(), addView(), onAboutToCloseDocument(), onFocusRequest(), onSessionModelViewActive(), setCurrentView(), and updateViewSelectionButtonsGeometry().
|
private |
Definition at line 92 of file MainWindow.h.
Referenced by MainWindow(), addView(), initProgressBar(), and updateViewSelectionButtonsGeometry().
|
private |
Definition at line 91 of file MainWindow.h.
Referenced by MainWindow(), addView(), currentView(), onSessionModelViewActive(), and raiseView().
|
private |
Definition at line 98 of file MainWindow.h.
Referenced by initViews().