Envision
A visual programming IDE for object-oriented languages
List of all members | Public Types | Public Member Functions | Private Attributes
Visualization::VisualizationGroup Class Reference

Public Types

typedef std::function< bool(Item *parent, Model::Node *node)> ConditionFunction
 
typedef std::function< Item *(Item *parent, Model::Node *node)> ItemConstructor
 

Public Member Functions

 VisualizationGroup ()
 
 VisualizationGroup (ConditionFunction condition, int scorePoints=1)
 
virtual ~VisualizationGroup ()
 
void addSubGroup (VisualizationGroup *group)
 
void addVisualization (VisualizationGroup::ItemConstructor visualization, int itemTypeId)
 
void addVisualization (VisualizationGroup::ItemConstructor visualization, int itemTypeId, ConditionFunction condition)
 
void clear ()
 
bool matchesContext (Item *parent, Model::Node *node)
 
void setConditionFunction (ConditionFunction condition, int scorePoints=1)
 
QList< QPair< VisualizationSuitabilityScore, QPair< int, ItemConstructor > > > visualizationsForContext (Item *parent, Model::Node *node)
 

Private Attributes

ConditionFunction contextCondition_
 
QVector< int > itemTypeIds_
 
int scorePoints_
 
QVector< VisualizationGroup * > subGroups_
 
QVector< ItemConstructorvisualizations_
 

Member Typedef Documentation

◆ ConditionFunction

typedef std::function<bool (Item* parent, Model::Node* node)> Visualization::VisualizationGroup::ConditionFunction

◆ ItemConstructor

typedef std::function<Item* (Item* parent, Model::Node* node)> Visualization::VisualizationGroup::ItemConstructor

Constructor & Destructor Documentation

◆ VisualizationGroup() [1/2]

Visualization::VisualizationGroup::VisualizationGroup ( )

◆ VisualizationGroup() [2/2]

Visualization::VisualizationGroup::VisualizationGroup ( ConditionFunction  condition,
int  scorePoints = 1 
)

◆ ~VisualizationGroup()

Visualization::VisualizationGroup::~VisualizationGroup ( )
virtual

Member Function Documentation

◆ addSubGroup()

void Visualization::VisualizationGroup::addSubGroup ( VisualizationGroup group)
inline

◆ addVisualization() [1/2]

void Visualization::VisualizationGroup::addVisualization ( VisualizationGroup::ItemConstructor  visualization,
int  itemTypeId 
)

◆ addVisualization() [2/2]

void Visualization::VisualizationGroup::addVisualization ( VisualizationGroup::ItemConstructor  visualization,
int  itemTypeId,
ConditionFunction  condition 
)

◆ clear()

void Visualization::VisualizationGroup::clear ( )
inline

◆ matchesContext()

bool Visualization::VisualizationGroup::matchesContext ( Item parent,
Model::Node node 
)

◆ setConditionFunction()

void Visualization::VisualizationGroup::setConditionFunction ( ConditionFunction  condition,
int  scorePoints = 1 
)
inline

◆ visualizationsForContext()

QList< QPair< VisualizationSuitabilityScore, QPair< int, VisualizationGroup::ItemConstructor > > > Visualization::VisualizationGroup::visualizationsForContext ( Item parent,
Model::Node node 
)

Member Data Documentation

◆ contextCondition_

ConditionFunction Visualization::VisualizationGroup::contextCondition_
private

◆ itemTypeIds_

QVector<int> Visualization::VisualizationGroup::itemTypeIds_
private

◆ scorePoints_

int Visualization::VisualizationGroup::scorePoints_
private

◆ subGroups_

QVector<VisualizationGroup*> Visualization::VisualizationGroup::subGroups_
private

◆ visualizations_

QVector<ItemConstructor> Visualization::VisualizationGroup::visualizations_
private