SessionManager Class
(ProjectExplorer::SessionManager)The SessionManager class manages sessions. More...
Header: | #include <SessionManager> |
Public Functions
SessionManager(QObject *parent = nullptr) | |
~SessionManager() override |
Signals
void | aboutToLoadSession(QString sessionName) |
void | aboutToRemoveProject(ProjectExplorer::Project *project) |
void | aboutToSaveSession() |
void | aboutToUnloadSession(QString sessionName) |
void | dependencyChanged(ProjectExplorer::Project *a, ProjectExplorer::Project *b) |
void | projectAdded(ProjectExplorer::Project *project) |
void | projectDisplayNameChanged(ProjectExplorer::Project *project) |
void | projectFinishedParsing(ProjectExplorer::Project *project) |
void | projectRemoved(ProjectExplorer::Project *project) |
void | sessionLoaded(QString sessionName) |
void | startupProjectChanged(ProjectExplorer::Project *project) |
Static Public Members
QString | activeSession() |
bool | addDependency(Project *project, Project *depProject) |
void | addProject(Project *project) |
bool | canAddDependency(const Project *project, const Project *depProject) |
bool | cloneSession(const QString &original, const QString &clone) |
void | closeAllProjects() |
bool | confirmSessionDelete(const QString &session) |
bool | createSession(const QString &session) |
bool | deleteSession(const QString &session) |
QList<Project *> | dependencies(const Project *project) |
bool | hasDependency(const Project *project, const Project *depProject) |
bool | hasProject(Project *p) |
bool | hasProjects() |
SessionManager * | instance() |
bool | isDefaultSession(const QString &session) |
bool | isDefaultVirgin() |
bool | isProjectConfigurationCascading() |
QString | lastSession() |
bool | loadSession(const QString &session) |
bool | loadingSession() |
Node * | nodeForFile(const Utils::FileName &fileName) |
bool | projectContainsFile(Project *p, const Utils::FileName &fileName) |
Project * | projectForFile(const Utils::FileName &fileName) |
Project * | projectForNode(Node *node) |
QList<Project *> | projectOrder(const Project *project = 0) |
const QList<Project *> | projects() |
QStringList | projectsForSessionName(const QString &session) |
void | removeDependency(Project *project, Project *depProject) |
void | removeProject(Project *project) |
void | removeProjects(const QList<Project *> &remove) |
bool | renameSession(const QString &original, const QString &newName) |
void | reportProjectLoadingProgress() |
bool | save() |
QDateTime | sessionDateTime(const QString &session) |
Utils::FileName | sessionNameToFileName(const QString &session) |
QStringList | sessions() |
void | setActiveBuildConfiguration(Target *t, BuildConfiguration *bc, SetActive cascade) |
void | setActiveDeployConfiguration(Target *t, DeployConfiguration *dc, SetActive cascade) |
void | setActiveTarget(Project *p, Target *t, SetActive cascade) |
void | setProjectConfigurationCascading(bool b) |
void | setStartupProject(Project *startupProject) |
void | setValue(const QString &name, const QVariant &value) |
Project * | startupProject() |
QVariant | value(const QString &name) |
Detailed Description
The SessionManager class manages sessions.
TODO the interface of this class is not really great. The implementation suffers from that all the functions from the public interface just wrap around functions which do the actual work. This could be improved.
Member Function Documentation
SessionManager::SessionManager(QObject *parent = nullptr)
Default constructs an instance of SessionManager.
SessionManager::~SessionManager()
Destroys the instance of SessionManager.
[signal]
void SessionManager::aboutToLoadSession(QString sessionName)
[signal]
void SessionManager::aboutToRemoveProject(ProjectExplorer::Project *project)
[signal]
void SessionManager::aboutToSaveSession()
[signal]
void SessionManager::aboutToUnloadSession(QString sessionName)
[static]
QString SessionManager::activeSession()
[static]
bool SessionManager::addDependency(Project *project, Project *depProject)
[static]
void SessionManager::addProject(Project *project)
[static]
bool SessionManager::canAddDependency(const Project *project, const Project *depProject)
[static]
bool SessionManager::cloneSession(const QString &original, const QString &clone)
[static]
void SessionManager::closeAllProjects()
Closes all projects
[static]
bool SessionManager::confirmSessionDelete(const QString &session)
Shows a dialog asking the user to confirm deleting the session \p
session
[static]
bool SessionManager::createSession(const QString &session)
Creates session, but does not actually create the file.
[static]
bool SessionManager::deleteSession(const QString &session)
Deletes session name from session list and the file from disk.
[static]
QList<Project *> SessionManager::dependencies(const Project *project)
[signal]
void SessionManager::dependencyChanged(ProjectExplorer::Project *a, ProjectExplorer::Project *b)
[static]
bool SessionManager::hasDependency(const Project *project, const Project *depProject)
[static]
bool SessionManager::hasProject(Project *p)
[static]
bool SessionManager::hasProjects()
[static]
SessionManager *SessionManager::instance()
[static]
bool SessionManager::isDefaultSession(const QString &session)
[static]
bool SessionManager::isDefaultVirgin()
[static]
bool SessionManager::isProjectConfigurationCascading()
[static]
QString SessionManager::lastSession()
[static]
bool SessionManager::loadSession(const QString &session)
[static]
bool SessionManager::loadingSession()
[static]
Node *SessionManager::nodeForFile(const Utils::FileName &fileName)
[signal]
void SessionManager::projectAdded(ProjectExplorer::Project *project)
[static]
bool SessionManager::projectContainsFile(Project *p, const Utils::FileName &fileName)
[signal]
void SessionManager::projectDisplayNameChanged(ProjectExplorer::Project *project)
[signal]
void SessionManager::projectFinishedParsing(ProjectExplorer::Project *project)
[static]
Project *SessionManager::projectForFile(const Utils::FileName &fileName)
[static]
Project *SessionManager::projectForNode(Node *node)
[static]
QList<Project *> SessionManager::projectOrder(const Project *project = 0)
[signal]
void SessionManager::projectRemoved(ProjectExplorer::Project *project)
[static]
const QList<Project *> SessionManager::projects()
[static]
QStringList SessionManager::projectsForSessionName(const QString &session)
[static]
void SessionManager::removeDependency(Project *project, Project *depProject)
[static]
void SessionManager::removeProject(Project *project)
[static]
void SessionManager::removeProjects(const QList<Project *> &remove)
[static]
bool SessionManager::renameSession(const QString &original, const QString &newName)
[static]
void SessionManager::reportProjectLoadingProgress()
[static]
bool SessionManager::save()
[static]
QDateTime SessionManager::sessionDateTime(const QString &session)
[signal]
void SessionManager::sessionLoaded(QString sessionName)
[static]
Utils::FileName SessionManager::sessionNameToFileName(const QString &session)
[static]
QStringList SessionManager::sessions()
[static]
void SessionManager::setActiveBuildConfiguration(Target *t, BuildConfiguration *bc, SetActive cascade)
[static]
void SessionManager::setActiveDeployConfiguration(Target *t, DeployConfiguration *dc, SetActive cascade)
[static]
void SessionManager::setActiveTarget(Project *p, Target *t, SetActive cascade)
[static]
void SessionManager::setProjectConfigurationCascading(bool b)
See also isProjectConfigurationCascading().
[static]
void SessionManager::setStartupProject(Project *startupProject)
See also startupProject().
[static]
void SessionManager::setValue(const QString &name, const QVariant &value)
Lets other plugins store persistent values within the session file.
See also value().
[static]
Project *SessionManager::startupProject()
See also setStartupProject().
[signal]
void SessionManager::startupProjectChanged(ProjectExplorer::Project *project)
[static]
QVariant SessionManager::value(const QString &name)
See also setValue().