BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Class to handle MainWindow's menu and corresponding actions. More...
Public Member Functions | |
ActionManager (MainWindow *parent) | |
Private Slots | |
void | onAboutApplication () |
void | onAboutToShowFileMenu () |
void | onAboutToShowSettingsMenu () |
void | onAboutToShowViewMenu () |
void | onCurrentViewChanged () |
void | onImportFromPythonScript () |
void | setSessionModelViewActive (bool status) |
void | toggleCheckForUpdates (bool status) |
Private Member Functions | |
void | createActions () |
void | createGlobalShortcuts () |
void | createMenus () |
Private Attributes | |
QAction * | m_aboutAction |
QAction * | m_exitAction |
QMenu * | m_fileMenu |
QMenu * | m_helpMenu |
QMenu * | m_importMenu |
MainWindow * | m_mainWindow |
QMenuBar * | m_menuBar |
QAction * | m_newAction |
QAction * | m_openAction |
QMenu * | m_recentProjectsMenu |
QShortcut * | m_runSimulationShortcut |
QAction * | m_saveAction |
QAction * | m_saveAsAction |
QMenu * | m_settingsMenu |
QMenu * | m_viewMenu |
Class to handle MainWindow's menu and corresponding actions.
Definition at line 28 of file actionmanager.h.
ActionManager::ActionManager | ( | MainWindow * | parent | ) |
Definition at line 34 of file actionmanager.cpp.
References createActions(), createGlobalShortcuts(), createMenus(), MainWindow::currentViewChanged(), m_mainWindow, and onCurrentViewChanged().
|
private |
Definition at line 60 of file actionmanager.cpp.
References ASSERT, m_aboutAction, m_exitAction, m_mainWindow, m_newAction, m_openAction, m_saveAction, m_saveAsAction, ProjectManager::newProject(), onAboutApplication(), ProjectManager::openProject(), MainWindow::projectManager(), ProjectManager::saveProject(), and ProjectManager::saveProjectAs().
Referenced by ActionManager().
|
private |
Definition at line 162 of file actionmanager.cpp.
References m_mainWindow, m_runSimulationShortcut, and MainWindow::onRunSimulationShortcut().
Referenced by ActionManager().
|
private |
Definition at line 104 of file actionmanager.cpp.
References SysUtils::getenv(), GUI_OS_Utils::HostOsInfo::isMacHost(), m_aboutAction, m_exitAction, m_fileMenu, m_helpMenu, m_importMenu, m_mainWindow, m_menuBar, m_newAction, m_openAction, m_recentProjectsMenu, m_saveAction, m_saveAsAction, m_settingsMenu, m_viewMenu, onAboutToShowFileMenu(), onAboutToShowSettingsMenu(), onAboutToShowViewMenu(), onCurrentViewChanged(), and onImportFromPythonScript().
Referenced by ActionManager().
|
privateslot |
Definition at line 254 of file actionmanager.cpp.
References m_mainWindow.
Referenced by createActions().
|
privateslot |
Definition at line 170 of file actionmanager.cpp.
References ProjectManager::clearRecentProjects(), m_mainWindow, m_recentProjectsMenu, MainWindow::openRecentProject(), MainWindow::projectManager(), ProjectManager::recentProjects(), and GUI_StringUtils::withTildeHomePath().
Referenced by createMenus().
|
privateslot |
Definition at line 196 of file actionmanager.cpp.
References ProjectManager::isAutosaveEnabled(), m_mainWindow, m_settingsMenu, MainWindow::projectManager(), Constants::S_CHECKFORUPDATES, Constants::S_SESSIONMODELVIEW, Constants::S_UPDATES, Constants::S_VIEWISACTIVE, ProjectManager::setAutosaveEnabled(), setSessionModelViewActive(), and toggleCheckForUpdates().
Referenced by createMenus().
|
privateslot |
Definition at line 228 of file actionmanager.cpp.
References MainWindow::currentView(), m_mainWindow, and m_viewMenu.
Referenced by createMenus(), and onCurrentViewChanged().
|
privateslot |
Definition at line 260 of file actionmanager.cpp.
References m_viewMenu, and onAboutToShowViewMenu().
Referenced by ActionManager(), and createMenus().
|
privateslot |
Definition at line 268 of file actionmanager.cpp.
References PyImportAssistant::exec(), and m_mainWindow.
Referenced by createMenus().
|
privateslot |
Definition at line 245 of file actionmanager.cpp.
References m_mainWindow, MainWindow::onSessionModelViewActive(), Constants::S_SESSIONMODELVIEW, and Constants::S_VIEWISACTIVE.
Referenced by onAboutToShowSettingsMenu().
|
privateslot |
Definition at line 239 of file actionmanager.cpp.
References UpdateNotifier::checkForUpdates(), m_mainWindow, UpdateNotifier::setCheckUpdatesFlag(), and MainWindow::updateNotifier().
Referenced by onAboutToShowSettingsMenu().
|
private |
Definition at line 53 of file actionmanager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 52 of file actionmanager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 56 of file actionmanager.h.
Referenced by createMenus().
|
private |
Definition at line 60 of file actionmanager.h.
Referenced by createMenus().
|
private |
Definition at line 61 of file actionmanager.h.
Referenced by createMenus().
|
private |
Definition at line 46 of file actionmanager.h.
Referenced by ActionManager(), createActions(), createGlobalShortcuts(), createMenus(), onAboutApplication(), onAboutToShowFileMenu(), onAboutToShowSettingsMenu(), onAboutToShowViewMenu(), onImportFromPythonScript(), setSessionModelViewActive(), and toggleCheckForUpdates().
|
private |
Definition at line 55 of file actionmanager.h.
Referenced by createMenus().
|
private |
Definition at line 48 of file actionmanager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 49 of file actionmanager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 59 of file actionmanager.h.
Referenced by createMenus(), and onAboutToShowFileMenu().
|
private |
Definition at line 63 of file actionmanager.h.
Referenced by createGlobalShortcuts().
|
private |
Definition at line 50 of file actionmanager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 51 of file actionmanager.h.
Referenced by createActions(), and createMenus().
|
private |
Definition at line 57 of file actionmanager.h.
Referenced by createMenus(), and onAboutToShowSettingsMenu().
|
private |
Definition at line 58 of file actionmanager.h.
Referenced by createMenus(), onAboutToShowViewMenu(), and onCurrentViewChanged().