#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();
}
