LMMS
Loading...
Searching...
No Matches
lmms::LinkedModelGroup Class Reference

#include <LinkedModelGroups.h>

Inheritance diagram for lmms::LinkedModelGroup:
lmms::Model lmms::Lv2Proc

Classes

struct  ModelInfo

Signals

void modelAdded (lmms::AutomatableModel *added)
void modelRemoved (lmms::AutomatableModel *removed)
Signals inherited from lmms::Model
void dataChanged ()
void dataUnchanged ()
void propertiesChanged ()

Public Member Functions

 LinkedModelGroup (Model *parent)
void linkControls (LinkedModelGroup *other)
template<class Functor>
void foreach_model (const Functor &ftor)
template<class Functor>
void foreach_model (const Functor &ftor) const
std::size_t modelNum () const
bool containsModel (const QString &name) const
void removeControl (AutomatableModel *)
void saveValues (class QDomDocument &doc, class QDomElement &that)
void loadValues (const class QDomElement &that)
AutomatableModelgetModel (const std::string &s)
void addModel (class AutomatableModel *model, const QString &name)
 Register a further model.
bool eraseModel (const QString &name)
 Unregister a model, return true if a model was erased.
void clearModels ()
 Remove all models.
Public Member Functions inherited from lmms::Model
 Model (Model *parent, QString displayName=QString(), bool defaultConstructed=false)
 ~Model () override=default
bool isDefaultConstructed () const
ModelparentModel () const
virtual QString displayName () const
virtual void setDisplayName (const QString &displayName)
virtual QString fullDisplayName () const

Private Attributes

std::map< std::string, ModelInfom_models

Detailed Description

Base class for a group of linked models

See the LinkedModelGroup class for explanations

Features: Models are stored by their QObject::objectName Models are linked automatically

Constructor & Destructor Documentation

◆ LinkedModelGroup()

lmms::LinkedModelGroup::LinkedModelGroup ( Model * parent)
inline
Parameters
parentmodel of the LinkedModelGroups class

Member Function Documentation

◆ addModel()

void lmms::LinkedModelGroup::addModel ( class AutomatableModel * model,
const QString & name )

Register a further model.

◆ clearModels()

void lmms::LinkedModelGroup::clearModels ( )

Remove all models.

◆ containsModel()

bool lmms::LinkedModelGroup::containsModel ( const QString & name) const

◆ eraseModel()

bool lmms::LinkedModelGroup::eraseModel ( const QString & name)

Unregister a model, return true if a model was erased.

◆ foreach_model() [1/2]

template<class Functor>
void lmms::LinkedModelGroup::foreach_model ( const Functor & ftor)
inline

◆ foreach_model() [2/2]

template<class Functor>
void lmms::LinkedModelGroup::foreach_model ( const Functor & ftor) const
inline

◆ getModel()

AutomatableModel * lmms::LinkedModelGroup::getModel ( const std::string & s)
inline

◆ linkControls()

void lmms::LinkedModelGroup::linkControls ( LinkedModelGroup * other)

◆ loadValues()

void lmms::LinkedModelGroup::loadValues ( const class QDomElement & that)

◆ modelAdded

void lmms::LinkedModelGroup::modelAdded ( lmms::AutomatableModel * added)
signal

◆ modelNum()

std::size_t lmms::LinkedModelGroup::modelNum ( ) const
inline

◆ modelRemoved

void lmms::LinkedModelGroup::modelRemoved ( lmms::AutomatableModel * removed)
signal

◆ removeControl()

void lmms::LinkedModelGroup::removeControl ( AutomatableModel * mdl)

◆ saveValues()

void lmms::LinkedModelGroup::saveValues ( class QDomDocument & doc,
class QDomElement & that )

Member Data Documentation

◆ m_models

std::map<std::string, ModelInfo> lmms::LinkedModelGroup::m_models
private

models for the controls

Note
The AutomatableModels behind the ModelInfo are not owned, but referenced after addModel is being called.

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