|
|
| ProjectSaver (const Project &project, utils::Version app_version) |
| QFuture< utils::Utf8String > | save (const fs::path &path, bool is_backup) |
| | Saves the project asynchronously to the directory set previously in Project.
|
|
bool | has_unsaved_changes () const |
|
| static int | autosave_cb (void *data) |
| | Autosave callback.
|
| static void | make_project_dirs (const fs::path &project_directory) |
| | Creates the project directories.
|
| static void | compress_or_decompress (bool compress, char **_dest, size_t *_dest_size, const QByteArray &src) |
| | Compresses/decompress a project from a file/data to a file/data.
|
| static void | compress (char **_dest, size_t *_dest_size, const QByteArray &src) |
| static void | decompress (char **_dest, size_t *_dest_size, const QByteArray &src) |
| static std::string | get_existing_uncompressed_text (const fs::path &project_dir) |
| | Returns the uncompressed text representation of the saved project file.
|
Definition at line 15 of file project_saver.h.
◆ autosave_cb()
| int zrythm::structure::project::ProjectSaver::autosave_cb |
( |
void * | data | ) |
|
|
static |
Autosave callback.
This will keep getting called at regular short intervals, and if enough time has passed and it's okay to save it will autosave, otherwise it will wait until the next interval and check again.
◆ compress()
| void zrythm::structure::project::ProjectSaver::compress |
( |
char ** | _dest, |
|
|
size_t * | _dest_size, |
|
|
const QByteArray & | src ) |
|
inlinestatic |
◆ compress_or_decompress()
| void zrythm::structure::project::ProjectSaver::compress_or_decompress |
( |
bool | compress, |
|
|
char ** | _dest, |
|
|
size_t * | _dest_size, |
|
|
const QByteArray & | src ) |
|
static |
Compresses/decompress a project from a file/data to a file/data.
- Parameters
-
| compress | True to compress, false to decompress. |
| [out] | _dest | Pointer to a location to allocate memory. |
| [out] | _dest_size | Pointer to a location to store the size of the allocated memory. |
| src | Input bytes to compress/decompress. |
- Exceptions
-
◆ decompress()
| void zrythm::structure::project::ProjectSaver::decompress |
( |
char ** | _dest, |
|
|
size_t * | _dest_size, |
|
|
const QByteArray & | src ) |
|
inlinestatic |
◆ get_existing_uncompressed_text()
| std::string zrythm::structure::project::ProjectSaver::get_existing_uncompressed_text |
( |
const fs::path & | project_dir | ) |
|
|
static |
Returns the uncompressed text representation of the saved project file.
- Parameters
-
| backup | Whether to use the project file from the most recent backup. |
- Exceptions
-
◆ make_project_dirs()
| void zrythm::structure::project::ProjectSaver::make_project_dirs |
( |
const fs::path & | project_directory | ) |
|
|
static |
Creates the project directories.
- Exceptions
-
◆ save()
| QFuture< utils::Utf8String > zrythm::structure::project::ProjectSaver::save |
( |
const fs::path & | path, |
|
|
bool | is_backup ) |
|
nodiscard |
Saves the project asynchronously to the directory set previously in Project.
- Parameters
-
| path | The directory to save the project in (including the title). |
| is_backup | 1 if this is a backup. Backups will be saved as <original
filename>.bak<num>. |
- Exceptions
-
The documentation for this class was generated from the following file: