BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Main class to coordinate all activity on user's request to create new project, open existing one, or choose one of recent projects on disk. More...
Public Slots | |
bool | canCloseProject () const |
Returns 'true' if current project can be closed. More... | |
void | clearRecentProjectsList () |
void | onCreateNewProject () |
void | onOpenExistingProject (const QString &dirname={}) |
void | onSaveCurrentProject () |
void | onSaveProjectAs () |
void | updateNames () |
Update names (name of the current project, recent project name list, notifies the world). More... | |
Signals | |
void | currentProjectModified (const QString &project_dir, bool is_modified) |
void | recentProjectsListModified (const QStringList &projects) |
Public Member Functions | |
ProjectHandler (ApplicationModels *models, QWidget *parent) | |
~ProjectHandler () override | |
Private Member Functions | |
void | initProjectManager () |
void | updateCurrentProjectName () |
Updates the name of the current project on main window, notifies the world. More... | |
void | updateRecentProjectNames () |
Update recent project list in settings, notifies the world. More... | |
Private Attributes | |
ApplicationModels * | m_models {nullptr} |
std::unique_ptr< ModelView::ProjectManagerInterface > | m_projectManager |
std::unique_ptr< RecentProjectSettings > | m_recentProjectSettings |
std::unique_ptr< UserInteractor > | m_userInteractor |
Main class to coordinate all activity on user's request to create new project, open existing one, or choose one of recent projects on disk.
Definition at line 39 of file projecthandler.h.
|
explicit |
Definition at line 29 of file projecthandler.cpp.
References initProjectManager(), and updateRecentProjectNames().
|
overridedefault |
|
slot |
Returns 'true' if current project can be closed.
Internally will perform check for unsaved data, and proceed via save/discard/cancel dialog.
Definition at line 52 of file projecthandler.cpp.
References m_projectManager.
Referenced by gui2::WelcomeView::canCloseProject().
|
slot |
Definition at line 81 of file projecthandler.cpp.
References m_recentProjectSettings, and updateNames().
Referenced by gui2::WelcomeView::onClearRecentProjectsList().
|
signal |
Referenced by gui2::WelcomeView::setup_connections(), and updateCurrentProjectName().
|
private |
Definition at line 87 of file projecthandler.cpp.
References ModelView::CreateProjectManager(), m_models, m_projectManager, m_userInteractor, gui2::ApplicationModels::persistent_models(), and updateCurrentProjectName().
Referenced by ProjectHandler().
|
slot |
Definition at line 57 of file projecthandler.cpp.
References m_projectManager, and updateNames().
Referenced by gui2::WelcomeView::onCreateNewProject().
|
slot |
Definition at line 63 of file projecthandler.cpp.
References m_projectManager, and updateNames().
Referenced by gui2::WelcomeView::onOpenExistingProject().
|
slot |
Definition at line 69 of file projecthandler.cpp.
References m_projectManager, and updateNames().
Referenced by gui2::WelcomeView::onSaveCurrentProject().
|
slot |
Definition at line 75 of file projecthandler.cpp.
References m_projectManager, and updateNames().
Referenced by gui2::WelcomeView::onSaveProjectAs().
|
signal |
Referenced by gui2::WelcomeView::setup_connections(), and updateRecentProjectNames().
|
private |
Updates the name of the current project on main window, notifies the world.
Definition at line 103 of file projecthandler.cpp.
References currentProjectModified(), ModelView::Utils::FindMainWindow(), m_projectManager, and ModelView::Utils::ProjectWindowTitle().
Referenced by initProjectManager(), and updateNames().
|
slot |
Update names (name of the current project, recent project name list, notifies the world).
Definition at line 43 of file projecthandler.cpp.
References updateCurrentProjectName(), and updateRecentProjectNames().
Referenced by clearRecentProjectsList(), onCreateNewProject(), onOpenExistingProject(), onSaveCurrentProject(), onSaveProjectAs(), and gui2::WelcomeView::updateNames().
|
private |
Update recent project list in settings, notifies the world.
Definition at line 118 of file projecthandler.cpp.
References m_projectManager, m_recentProjectSettings, and recentProjectsListModified().
Referenced by ProjectHandler(), and updateNames().
|
private |
Definition at line 68 of file projecthandler.h.
Referenced by initProjectManager().
|
private |
Definition at line 67 of file projecthandler.h.
Referenced by canCloseProject(), initProjectManager(), onCreateNewProject(), onOpenExistingProject(), onSaveCurrentProject(), onSaveProjectAs(), updateCurrentProjectName(), and updateRecentProjectNames().
|
private |
Definition at line 65 of file projecthandler.h.
Referenced by clearRecentProjectsList(), and updateRecentProjectNames().
|
private |
Definition at line 66 of file projecthandler.h.
Referenced by initProjectManager().