Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::ProjectSession Class Reference

Composition root for a project session. More...

#include <src/gui/backend/project_session.h>

Inheritance diagram for zrythm::gui::ProjectSession:
Collaboration diagram for zrythm::gui::ProjectSession:

Signals

void titleChanged (const QString &title)
void projectDirectoryChanged (const QString &directory)

Public Member Functions

 ProjectSession (utils::AppSettings &app_settings, utils::QObjectUniquePtr< structure::project::Project > &&project)
QString title () const
void setTitle (const QString &title)
QString projectDirectory () const
void setProjectDirectory (const QString &directory)
structure::project::Projectproject () const
structure::project::ProjectUiStateuiState () const
undo::UndoStackundoStack () const
zrythm::actions::ArrangerObjectCreatorarrangerObjectCreator () const
zrythm::actions::TrackCreatortrackCreator () const
actions::PluginImporterpluginImporter () const
actions::FileImporterfileImporter () const
controllers::TransportControllertransportController () const
Q_INVOKABLE actions::ArrangerObjectSelectionOperatorcreateArrangerObjectSelectionOperator (QItemSelectionModel *selectionModel) const
Q_INVOKABLE qquick::QFutureQmlWrappersave ()
 Saves the project to the current project directory.
Q_INVOKABLE qquick::QFutureQmlWrappersaveAs (const QString &path)
 Saves the project to a new directory.
std::optional< fs::path > get_newer_backup ()
 Finds a backup directory newer than the main project file.

Properties

QString title
zrythm::structure::project::Projectproject
zrythm::structure::project::ProjectUiStateuiState
zrythm::undo::UndoStackundoStack
zrythm::actions::ArrangerObjectCreatorarrangerObjectCreator
zrythm::actions::TrackCreatortrackCreator
zrythm::actions::PluginImporterpluginImporter
zrythm::actions::FileImporterfileImporter
zrythm::controllers::TransportControllertransportController
QString projectDirectory

Detailed Description

Composition root for a project session.

Owns and coordinates all the components needed for an active project:

  • Core Project data
  • Serializable UI state (ProjectUiState)
  • Undo/redo history
  • Action handlers for user operations

QML accesses UI components (tool, clipEditor, timeline, snapGrids) via the uiState property.

Definition at line 35 of file project_session.h.

Member Function Documentation

◆ get_newer_backup()

std::optional< fs::path > zrythm::gui::ProjectSession::get_newer_backup ( )

Finds a backup directory newer than the main project file.

Returns
The backup path if one exists with a newer timestamp, nullopt otherwise.

◆ save()

Q_INVOKABLE qquick::QFutureQmlWrapper * zrythm::gui::ProjectSession::save ( )

Saves the project to the current project directory.

Returns
A QFutureQmlWrapper that resolves to the saved project path on success.
Precondition
projectDirectory must be set.

◆ saveAs()

Q_INVOKABLE qquick::QFutureQmlWrapper * zrythm::gui::ProjectSession::saveAs ( const QString & path)

Saves the project to a new directory.

Updates projectDirectory and title on success.

Parameters
pathThe new directory path to save to.
Returns
A QFutureQmlWrapper that resolves to the saved project path on success.

Property Documentation

◆ arrangerObjectCreator

zrythm::actions::ArrangerObjectCreator * zrythm::gui::ProjectSession::arrangerObjectCreator
read

Definition at line 42 of file project_session.h.

◆ fileImporter

zrythm::actions::FileImporter * zrythm::gui::ProjectSession::fileImporter
read

Definition at line 45 of file project_session.h.

◆ pluginImporter

zrythm::actions::PluginImporter * zrythm::gui::ProjectSession::pluginImporter
read

Definition at line 44 of file project_session.h.

◆ project

zrythm::structure::project::Project * zrythm::gui::ProjectSession::project
read

Definition at line 39 of file project_session.h.

◆ projectDirectory

QString zrythm::gui::ProjectSession::projectDirectory
readwrite

Definition at line 47 of file project_session.h.

◆ title

QString zrythm::gui::ProjectSession::title
readwrite

Definition at line 38 of file project_session.h.

◆ trackCreator

zrythm::actions::TrackCreator * zrythm::gui::ProjectSession::trackCreator
read

Definition at line 43 of file project_session.h.

◆ transportController

zrythm::controllers::TransportController * zrythm::gui::ProjectSession::transportController
read

Definition at line 46 of file project_session.h.

◆ uiState

zrythm::structure::project::ProjectUiState * zrythm::gui::ProjectSession::uiState
read

Definition at line 40 of file project_session.h.

◆ undoStack

zrythm::undo::UndoStack * zrythm::gui::ProjectSession::undoStack
read

Definition at line 41 of file project_session.h.


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