BornAgain
1.19.79
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Class to handle MainWindow's menu and corresponding actions.
Definition at line 28 of file ActionManager.h.
Public Member Functions | |
ActionManager (MainWindow *parent) | |
Private Slots | |
void | onAboutApplication () |
void | onAboutToShowFileMenu () |
void | onAboutToShowSettingsMenu () |
void | onAboutToShowViewMenu () |
void | onCurrentViewChanged () |
void | setSessionModelViewActive (bool status) |
Private Member Functions | |
void | createActions () |
void | createGlobalShortcuts () |
void | createMenus () |
void | updateActionEnabling () |
Private Attributes | |
QAction * | m_aboutAction |
QAction * | m_closeProjectAction |
QAction * | m_exitAction |
QMenu * | m_fileMenu |
QMenu * | m_helpMenu |
MainWindow * | m_mainWindow |
QMenuBar * | m_menuBar |
QAction * | m_newAction |
QAction * | m_openAction |
QMenu * | m_recentProjectsMenu |
QAction * | m_saveAction |
QAction * | m_saveAsAction |
QMenu * | m_settingsMenu |
QShortcut * | m_simulateShortcut |
QMenu * | m_viewMenu |
QAction * | m_webdocAction |
ActionManager::ActionManager | ( | MainWindow * | parent | ) |
Definition at line 34 of file ActionManager.cpp.
References createActions(), createGlobalShortcuts(), createMenus(), MainWindow::currentViewChanged(), ProjectManager::documentOpenedOrClosed(), ProjectManager::instance(), m_mainWindow, onCurrentViewChanged(), and updateActionEnabling().
|
private |
Definition at line 72 of file ActionManager.cpp.
References ProjectManager::closeCurrentProject(), m_aboutAction, m_closeProjectAction, m_exitAction, m_mainWindow, m_newAction, m_openAction, m_saveAction, m_saveAsAction, m_webdocAction, ProjectManager::newProject(), onAboutApplication(), ProjectManager::openProject(), MainWindow::projectManager(), ProjectManager::saveProject(), and ProjectManager::saveProjectAs().
Referenced by ActionManager().
|
private |
Definition at line 174 of file ActionManager.cpp.
References m_mainWindow, m_simulateShortcut, and MainWindow::onRunSimulationShortcut().
Referenced by ActionManager().
|
private |
Definition at line 128 of file ActionManager.cpp.
References m_aboutAction, m_closeProjectAction, m_exitAction, m_fileMenu, m_helpMenu, m_mainWindow, m_menuBar, m_newAction, m_openAction, m_recentProjectsMenu, m_saveAction, m_saveAsAction, m_settingsMenu, m_viewMenu, m_webdocAction, onAboutToShowFileMenu(), onAboutToShowSettingsMenu(), onAboutToShowViewMenu(), and onCurrentViewChanged().
Referenced by ActionManager().
|
privateslot |
Definition at line 293 of file ActionManager.cpp.
References m_mainWindow.
Referenced by createActions().
|
privateslot |
Definition at line 182 of file ActionManager.cpp.
References ProjectManager::clearRecentProjects(), m_mainWindow, m_recentProjectsMenu, MainWindow::openRecentProject(), MainWindow::projectManager(), ProjectManager::recentProjects(), and GUI::Util::Path::withTildeHomePath().
Referenced by createMenus().
|
privateslot |
Definition at line 208 of file ActionManager.cpp.
References appSettings, ApplicationSettings::createNewProjectOnStartup(), ApplicationSettings::currentStyle(), ApplicationSettings::defaultUnitIsAngstrom(), ProjectManager::isAutosaveEnabled(), ApplicationSettings::light, ApplicationSettings::loadStyle(), m_mainWindow, m_settingsMenu, ApplicationSettings::native, MainWindow::projectManager(), GUI::Constants::S_SESSIONMODELVIEW, GUI::Constants::S_VIEWISACTIVE, ProjectManager::setAutosaveEnabled(), ApplicationSettings::setCreateNewProjectOnStartup(), ApplicationSettings::setDefaultUnitIsAngstrom(), setSessionModelViewActive(), and ApplicationSettings::setStyleToUse().
Referenced by createMenus().
|
privateslot |
Definition at line 273 of file ActionManager.cpp.
References MainWindow::currentView(), m_mainWindow, and m_viewMenu.
Referenced by createMenus(), and onCurrentViewChanged().
|
privateslot |
Definition at line 299 of file ActionManager.cpp.
References m_viewMenu, and onAboutToShowViewMenu().
Referenced by ActionManager(), and createMenus().
|
privateslot |
Definition at line 284 of file ActionManager.cpp.
References m_mainWindow, MainWindow::onSessionModelViewActive(), GUI::Constants::S_SESSIONMODELVIEW, and GUI::Constants::S_VIEWISACTIVE.
Referenced by onAboutToShowSettingsMenu().
|
private |
Definition at line 64 of file ActionManager.cpp.
References gSessionData, m_closeProjectAction, m_saveAction, m_saveAsAction, and SessionData::projectDocument.
Referenced by ActionManager().
|
private |
Definition at line 54 of file ActionManager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 51 of file ActionManager.h.
Referenced by createActions(), createMenus(), and updateActionEnabling().
|
private |
Definition at line 52 of file ActionManager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 57 of file ActionManager.h.
Referenced by createMenus().
|
private |
Definition at line 61 of file ActionManager.h.
Referenced by createMenus().
|
private |
Definition at line 45 of file ActionManager.h.
Referenced by ActionManager(), createActions(), createGlobalShortcuts(), createMenus(), onAboutApplication(), onAboutToShowFileMenu(), onAboutToShowSettingsMenu(), onAboutToShowViewMenu(), and setSessionModelViewActive().
|
private |
Definition at line 56 of file ActionManager.h.
Referenced by createMenus().
|
private |
Definition at line 47 of file ActionManager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 48 of file ActionManager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 60 of file ActionManager.h.
Referenced by createMenus(), and onAboutToShowFileMenu().
|
private |
Definition at line 49 of file ActionManager.h.
Referenced by createActions(), createMenus(), and updateActionEnabling().
|
private |
Definition at line 50 of file ActionManager.h.
Referenced by createActions(), createMenus(), and updateActionEnabling().
|
private |
Definition at line 58 of file ActionManager.h.
Referenced by createMenus(), and onAboutToShowSettingsMenu().
|
private |
Definition at line 63 of file ActionManager.h.
Referenced by createGlobalShortcuts().
|
private |
Definition at line 59 of file ActionManager.h.
Referenced by createMenus(), onAboutToShowViewMenu(), and onCurrentViewChanged().
|
private |
Definition at line 53 of file ActionManager.h.
Referenced by createActions(), and createMenus().