BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Actions for MainWindow. More...
Public Slots | |
void | setRecentProjectsList (const QStringList &projects) |
Signals | |
void | clearResentProjectListRequest () |
void | createNewProjectRequest () |
void | openExistingProjectRequest (const QString &dirname) |
void | saveCurrentProjectRequest () |
void | saveProjectAsRequest () |
Public Member Functions | |
ActionManager (QMainWindow *mainwindow=nullptr) | |
Private Slots | |
void | aboutToShowFileMenu () |
Private Member Functions | |
void | createActions () |
Creates application-wise actions to create, open, save, and save-as projects. More... | |
void | setupMenus (QMenuBar *menubar) |
Equips menu with actions. More... | |
Private Attributes | |
QAction * | m_createNewProjectAction {nullptr} |
QAction * | m_exitAction {nullptr} |
QMainWindow * | m_mainWindow {nullptr} |
QAction * | m_openExistingProjectAction {nullptr} |
QMenu * | m_recentProjectMenu {nullptr} |
QStringList | m_recentProjects |
QAction * | m_saveCurrentProjectAction {nullptr} |
QAction * | m_saveProjectAsAction {nullptr} |
Actions for MainWindow.
Equips toolbar and menubar with actions to create, open, save, and save-as projects. It doesn't have logic and simply forwards requests further.
Definition at line 31 of file actionmanager.h.
ActionManager::ActionManager | ( | QMainWindow * | mainwindow = nullptr | ) |
Definition at line 24 of file actionmanager.cpp.
References createActions(), m_mainWindow, and setupMenus().
|
privateslot |
Definition at line 31 of file actionmanager.cpp.
References clearResentProjectListRequest(), m_recentProjectMenu, m_recentProjects, openExistingProjectRequest(), and ModelView::Utils::WithTildeHomePath().
Referenced by setupMenus().
|
signal |
Referenced by aboutToShowFileMenu(), and gui2::MainWindow::init_connections().
|
private |
Creates application-wise actions to create, open, save, and save-as projects.
Definition at line 60 of file actionmanager.cpp.
References createNewProjectRequest(), m_createNewProjectAction, m_exitAction, m_mainWindow, m_openExistingProjectAction, m_saveCurrentProjectAction, m_saveProjectAsAction, openExistingProjectRequest(), saveCurrentProjectRequest(), and saveProjectAsRequest().
Referenced by ActionManager().
|
signal |
Referenced by createActions(), and gui2::MainWindow::init_connections().
|
signal |
Referenced by aboutToShowFileMenu(), createActions(), and gui2::MainWindow::init_connections().
|
signal |
Referenced by createActions(), and gui2::MainWindow::init_connections().
|
signal |
Referenced by createActions(), and gui2::MainWindow::init_connections().
|
slot |
Definition at line 53 of file actionmanager.cpp.
References m_recentProjects.
Referenced by gui2::MainWindow::init_connections().
|
private |
Equips menu with actions.
Definition at line 94 of file actionmanager.cpp.
References aboutToShowFileMenu(), m_createNewProjectAction, m_exitAction, m_openExistingProjectAction, m_recentProjectMenu, m_saveCurrentProjectAction, and m_saveProjectAsAction.
Referenced by ActionManager().
|
private |
Definition at line 56 of file actionmanager.h.
Referenced by createActions(), and setupMenus().
|
private |
Definition at line 60 of file actionmanager.h.
Referenced by createActions(), and setupMenus().
|
private |
Definition at line 54 of file actionmanager.h.
Referenced by ActionManager(), and createActions().
|
private |
Definition at line 57 of file actionmanager.h.
Referenced by createActions(), and setupMenus().
|
private |
Definition at line 62 of file actionmanager.h.
Referenced by aboutToShowFileMenu(), and setupMenus().
|
private |
Definition at line 64 of file actionmanager.h.
Referenced by aboutToShowFileMenu(), and setRecentProjectsList().
|
private |
Definition at line 58 of file actionmanager.h.
Referenced by createActions(), and setupMenus().
|
private |
Definition at line 59 of file actionmanager.h.
Referenced by createActions(), and setupMenus().