Erste Version
This commit is contained in:
33
src/core/ProjectManager.cpp
Normal file
33
src/core/ProjectManager.cpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#include "ProjectManager.h"
|
||||
|
||||
ProjectManager::ProjectManager(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
QString ProjectManager::currentProjectPath() const
|
||||
{
|
||||
return m_projectPath;
|
||||
}
|
||||
|
||||
void ProjectManager::openProject(const QString &path)
|
||||
{
|
||||
if (m_projectPath == path)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_projectPath = path;
|
||||
emit projectOpened(m_projectPath);
|
||||
}
|
||||
|
||||
void ProjectManager::closeProject()
|
||||
{
|
||||
if (m_projectPath.isEmpty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
m_projectPath.clear();
|
||||
emit projectClosed();
|
||||
}
|
||||
Reference in New Issue
Block a user