23#ifndef H2C_INSTRUMENTCOMPONENT_H
24#define H2C_INSTRUMENTCOMPONENT_H
40class DrumkitComponent;
51 void save_to(
XMLNode* node,
int component_id,
bool bRecentVersion =
true,
bool bFull =
false );
53 const QString& sDrumkitPath,
55 bool bSilent =
false );
57 std::shared_ptr<InstrumentLayer>
operator[](
int ix );
58 std::shared_ptr<InstrumentLayer>
get_layer(
int idx );
59 void set_layer( std::shared_ptr<InstrumentLayer> layer,
int idx );
73 std::vector<std::shared_ptr<InstrumentLayer>>::iterator
begin();
74 std::vector<std::shared_ptr<InstrumentLayer>>::iterator
end();
84 QString
toQString(
const QString& sPrefix =
"",
bool bShort =
true )
const override;
101 std::vector<std::shared_ptr<InstrumentLayer>>
__layers;
static std::shared_ptr< InstrumentComponent > load_from(XMLNode *pNode, const QString &sDrumkitPath, const License &drumkitLicense=License(), bool bSilent=false)
std::vector< std::shared_ptr< InstrumentLayer > > __layers
std::vector< std::shared_ptr< InstrumentLayer > >::iterator begin()
Iteration.
int get_drumkit_componentID()
Returns the component ID of the drumkit.
static int m_nMaxLayers
Maximum number of layers to be used in the Instrument editor.
InstrumentComponent(int related_drumkit_componentID)
static void setMaxLayers(int layers)
int __related_drumkit_componentID
Component ID of the drumkit.
std::vector< std::shared_ptr< InstrumentLayer > >::iterator end()
void set_gain(float gain)
std::shared_ptr< InstrumentLayer > operator[](int ix)
void set_layer(std::shared_ptr< InstrumentLayer > layer, int idx)
QString toQString(const QString &sPrefix="", bool bShort=true) const override
Formatted string version for debugging purposes.
std::shared_ptr< InstrumentLayer > get_layer(int idx)
void save_to(XMLNode *node, int component_id, bool bRecentVersion=true, bool bFull=false)
static int getMaxLayers()
void set_drumkit_componentID(int related_drumkit_componentID)
Sets the component ID __related_drumkit_componentID.
Wrapper class to help Hydrogen deal with the license information specified in a drumkit.
XMLNode is a subclass of QDomNode with read and write values methods.