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

Chord preset pack manager. More...

#include <src/gui/backend/backend/settings/chord_preset_pack_manager.h>

Public Member Functions

 ChordPresetPackManager (bool scan_for_packs)
 Construct a new Chord Preset Pack Manager object.
 
size_t get_num_packs () const
 
ChordPresetPackget_pack_at (size_t idx)
 
ChordPresetPackget_pack_for_preset (const ChordPreset &pset)
 
int get_pack_index (const ChordPresetPack &pack) const
 
int get_pset_index (const ChordPreset &pset)
 Returns the preset index in its pack.
 
void add_preset (ChordPresetPack &pack, const ChordPreset &pset, bool serialize)
 Add a copy of the given preset to the given preset pack and optionally serializes the pack manager.
 
void add_pack (const ChordPresetPack &pack, bool serialize)
 Add a copy of the given pack.
 
void delete_pack (const ChordPresetPack &pack, bool serialize)
 
void delete_preset (const ChordPreset &pset, bool serialize)
 
void serialize ()
 Serializes the chord presets.
 

Data Fields

std::vector< std::unique_ptr< ChordPresetPack > > packs_
 Scanned preset packs.
 

Detailed Description

Chord preset pack manager.

Definition at line 22 of file chord_preset_pack_manager.h.

Constructor & Destructor Documentation

◆ ChordPresetPackManager() [1/2]

ChordPresetPackManager::ChordPresetPackManager ( )
inline

Definition at line 25 of file chord_preset_pack_manager.h.

◆ ChordPresetPackManager() [2/2]

ChordPresetPackManager::ChordPresetPackManager ( bool scan_for_packs)
inline

Construct a new Chord Preset Pack Manager object.

Parameters
scan_for_packsWhether to scan for preset packs.

Definition at line 32 of file chord_preset_pack_manager.h.

Member Function Documentation

◆ add_preset()

void ChordPresetPackManager::add_preset ( ChordPresetPack & pack,
const ChordPreset & pset,
bool serialize )

Add a copy of the given preset to the given preset pack and optionally serializes the pack manager.

See also
ChordPresetPack::add_preset().

◆ serialize()

void ChordPresetPackManager::serialize ( )

Serializes the chord presets.

Exceptions
ZrythmExceptionon error.

Field Documentation

◆ packs_

std::vector<std::unique_ptr<ChordPresetPack> > ChordPresetPackManager::packs_

Scanned preset packs.

Definition at line 89 of file chord_preset_pack_manager.h.


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