|
| enum class | CompressionFlag { PROJECT_COMPRESS_FILE = 0
, PROJECT_DECOMPRESS_FILE = 0
, PROJECT_COMPRESS_DATA = 1
, PROJECT_DECOMPRESS_DATA = 1
} |
| | Flag to pass to project_compress() and project_decompress(). More...
|
|
|
| ProjectSaver (const Project &project) |
|
QFuture< void > | save_async (bool for_backup) |
| void | save (bool is_backup, bool show_notification, bool async) |
| | Saves the project to the directory set previously in Project.
|
| std::string | get_existing_uncompressed_text (bool backup) |
| | Returns the uncompressed text representation of the saved project file.
|
|
bool | has_unsaved_changes () const |
|
| static int | autosave_cb (void *data) |
| | Autosave callback.
|
| static void | make_project_dirs (const Project &project, bool is_backup) |
| | Creates the project directories.
|
| static void | compress_or_decompress (bool compress, char **_dest, size_t *_dest_size, CompressionFlag dest_type, const QByteArray &src) |
| | Compresses/decompress a project from a file/data to a file/data.
|
| static void | compress (char **_dest, size_t *_dest_size, CompressionFlag dest_type, const QByteArray &src) |
| static void | decompress (char **_dest, size_t *_dest_size, CompressionFlag dest_type, const QByteArray &src) |
Definition at line 14 of file project_saver.h.
◆ CompressionFlag
Flag to pass to project_compress() and project_decompress().
Definition at line 54 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, |
|
|
CompressionFlag | dest_type, |
|
|
const QByteArray & | src ) |
|
inlinestatic |
◆ compress_or_decompress()
| void zrythm::structure::project::ProjectSaver::compress_or_decompress |
( |
bool | compress, |
|
|
char ** | _dest, |
|
|
size_t * | _dest_size, |
|
|
CompressionFlag | dest_type, |
|
|
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, |
|
|
CompressionFlag | dest_type, |
|
|
const QByteArray & | src ) |
|
inlinestatic |
◆ get_existing_uncompressed_text()
| std::string zrythm::structure::project::ProjectSaver::get_existing_uncompressed_text |
( |
bool | backup | ) |
|
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 Project & | project, |
|
|
bool | is_backup ) |
|
static |
Creates the project directories.
- Parameters
-
- Exceptions
-
◆ save()
| void zrythm::structure::project::ProjectSaver::save |
( |
bool | is_backup, |
|
|
bool | show_notification, |
|
|
bool | async ) |
Saves the project to the directory set previously in Project.
- Parameters
-
| is_backup | 1 if this is a backup. Backups will be saved as <original
filename>.bak<num>. |
| show_notification | Show a notification in the UI that the project was saved. |
| async | Save asynchronously in another thread. |
- Exceptions
-
The documentation for this class was generated from the following file: