Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::ProjectManager Class Reference
Inheritance diagram for zrythm::gui::ProjectManager:
Collaboration diagram for zrythm::gui::ProjectManager:

Public Types

using Template = fs::path
using TemplateList = std::vector<Template>
using ProjectLoadResult

Signals

void projectLoaded (ProjectSession *project)
void projectLoadingFailed (const QString &errorMessage)
void activeSessionChanged (ProjectSession *project)

Public Member Functions

 ProjectManager (utils::AppSettings &app_settings, QObject *parent=nullptr)
TemplateList get_templates () const
 Gets a copy of the list of project templates.
Q_INVOKABLE void createNewProject (const QUrl &directory, const QString &name, const QUrl &templateUrl=QUrl{})
Q_INVOKABLE qquick::QFutureQmlWrapperloadProject (const QString &filepath)
 Loads a project from the specified directory.
RecentProjectsModelgetRecentProjects () const
ProjectSessionactiveSession () const
void setActiveSession (ProjectSession *project)

Static Public Member Functions

static ProjectManager * get_instance ()
static Q_INVOKABLE QString getNextAvailableProjectName (const QUrl &directory, const QString &name)
 Get the next available untitled project name for the given directory.

Properties

QML_ELEMENT zrythm::gui::RecentProjectsModelrecentProjects
zrythm::gui::ProjectSessionactiveSession

Detailed Description

Definition at line 20 of file project_manager.h.

Member Typedef Documentation

◆ ProjectLoadResult

using zrythm::gui::ProjectManager::ProjectLoadResult
Initial value:
std::variant<utils::QObjectUniquePtr<ProjectSession>, QString>

Definition at line 34 of file project_manager.h.

◆ Template

using zrythm::gui::ProjectManager::Template = fs::path

Definition at line 32 of file project_manager.h.

◆ TemplateList

using zrythm::gui::ProjectManager::TemplateList = std::vector<Template>

Definition at line 33 of file project_manager.h.

Member Function Documentation

◆ getNextAvailableProjectName()

Q_INVOKABLE QString zrythm::gui::ProjectManager::getNextAvailableProjectName ( const QUrl & directory,
const QString & name )
static

Get the next available untitled project name for the given directory.

Parameters
directoryDirecctory to check for untitled projects.

◆ loadProject()

Q_INVOKABLE qquick::QFutureQmlWrapper * zrythm::gui::ProjectManager::loadProject ( const QString & filepath)

Loads a project from the specified directory.

Parameters
filepathThe project directory path.
Returns
A QFutureQmlWrapper that resolves to the loaded project path on success.

Property Documentation

◆ activeSession

zrythm::gui::ProjectSession * zrythm::gui::ProjectManager::activeSession
readwrite

Definition at line 26 of file project_manager.h.

◆ recentProjects

QML_ELEMENT zrythm::gui::RecentProjectsModel * zrythm::gui::ProjectManager::recentProjects
read

Definition at line 24 of file project_manager.h.


The documentation for this class was generated from the following file: