|
template<typename ElementType > |
static ElementType * | addForm (ElementType *element) |
| Add element to the list of forms. More...
|
|
static QList< FormElement * > & | formsStatic () |
| Static vertion of the method forms, returning the list of forms for this declarative item type. More...
|
|
template<typename ChildItemVisualizationType > |
static VisualizationItemWrapperFormElement< VisualizationType, ChildItemVisualizationType, true > * | item (ChildItemVisualizationType *VisualizationType::*itemStorage) |
| A factory method to get an item wrapper element with a visualization only, it takes a pointer to member, where the visualization itemStorage should be stored, and a method to get the style (styleGetter) with which the itemStorage should be created. More...
|
|
template<typename ChildItemVisualizationType , typename ParentStyleType , typename ParentNodeType , typename ParentNodeSubType > |
static NodeWithVisualizationItemWrapperFormElement< VisualizationType, ChildItemVisualizationType > * | item (ChildItemVisualizationType *VisualizationType::*itemStorage, ParentNodeSubType *(ParentNodeType::*nodePointer)(), Style::Property< typename ChildItemVisualizationType::StyleType > ParentStyleType::*stylePointer) |
|
template<typename ChildItemVisualizationType > |
static VisualizationItemWrapperFormElement< VisualizationType, ChildItemVisualizationType, false > * | item (ChildItemVisualizationType *VisualizationType::*itemStorage, std::function< const typename ChildItemVisualizationType::StyleType *(VisualizationType *v)> styleGetter) |
|
template<typename ChildItemVisualizationType > |
static NodeWithVisualizationItemWrapperFormElement< VisualizationType, ChildItemVisualizationType > * | item (ChildItemVisualizationType *VisualizationType::*itemStorage, std::function< typename ChildItemVisualizationType::NodeType *(VisualizationType *v)> nodeGetter, std::function< const typename ChildItemVisualizationType::StyleType *(VisualizationType *v)> styleGetter) |
| A factory method to get an item wrapper element with a node and a visualization, it takes a pointer to member, where the visualization itemStorage should be stored, a method to get the style (styleGetter), and a method to get the node (nodeGetter). More...
|
|
template<typename ChildItemVisualizationType , typename ParentStyleType > |
static NodeWithVisualizationItemWrapperFormElement< VisualizationType, ChildItemVisualizationType > * | item (ChildItemVisualizationType *VisualizationType::*itemStorage, std::function< typename ChildItemVisualizationType::NodeType *(VisualizationType *v)> nodeGetter, Style::Property< typename ChildItemVisualizationType::StyleType > ParentStyleType::*stylePointer) |
|
template<typename ChildItemVisualizationType , typename ParentStyleType > |
static VisualizationItemWrapperFormElement< VisualizationType, ChildItemVisualizationType, false > * | item (ChildItemVisualizationType *VisualizationType::*itemStorage, Style::Property< typename ChildItemVisualizationType::StyleType > ParentStyleType::*stylePointer) |
|
static NodeItemWrapperFormElement< VisualizationType > * | item (Item *VisualizationType::*itemStorage, std::function< Model::Node *(VisualizationType *v)> nodeGetter) |
| A factory method to get an item wrapper element with a node only, it takes a pointer to member, where the visualization itemStorage should be stored, and a method to get the node (nodeGetter) with which the itemStorage should be associated. More...
|
|
static QList< QList< FormElement * > > & | shapeElementsStatic () |
| Static version of the method shapeElements, returning the list of shape element lists for each form. More...
|
|
static GridLayoutFormElement * | grid (QList< QList< Merge >> elements) |
| Creates a grid layout. More...
|
|
template<typename VisualizationType>
class Visualization::DeclarativeItem< VisualizationType >
The DeclarativeItem class is the base class for all items that use the declarative API for visualizations.
It is a template class, such that every descendant visualization type has its own static list of available forms.
To use the declarative API, one needs to inherit from DeclarativeItem, and implement a static method initializeForms in which the list of forms and their properties is set up.
template<typename VisualizationType >
template<typename ElementType >
Add element to the list of forms.
All the forms should be added via this method inside the static method initializeForms.
If element is already a form root element or has a parent, then it is cloned and its clone is added to the list.
Returns a pointer to the added element.
template<typename VisualizationType >
template<typename ChildItemVisualizationType >
A factory method to get an item wrapper element with a visualization only, it takes a pointer to member, where the visualization itemStorage should be stored, and a method to get the style (styleGetter) with which the itemStorage should be created.
To call it, one has to supply the visualization type and the parent type (which is always 'I') as the template arguments.
template<typename VisualizationType >
template<typename ChildItemVisualizationType >
static NodeWithVisualizationItemWrapperFormElement<VisualizationType, ChildItemVisualizationType>* Visualization::DeclarativeItem< VisualizationType >::item |
( |
ChildItemVisualizationType *VisualizationType::* |
itemStorage, |
|
|
std::function< typename ChildItemVisualizationType::NodeType *(VisualizationType *v)> |
nodeGetter, |
|
|
std::function< const typename ChildItemVisualizationType::StyleType *(VisualizationType *v)> |
styleGetter |
|
) |
| |
|
staticprotected |
A factory method to get an item wrapper element with a node and a visualization, it takes a pointer to member, where the visualization itemStorage should be stored, a method to get the style (styleGetter), and a method to get the node (nodeGetter).
The node then gets visualized using the given visualization and style. To call it, one has to supply the visualization type and the parent type (which is always 'I') as template arguments.
template<typename VisualizationType >
A factory method to get an item wrapper element with a node only, it takes a pointer to member, where the visualization itemStorage should be stored, and a method to get the node (nodeGetter) with which the itemStorage should be associated.
The node gets visualized with its default style.
NOTE: Introducing the ChildItemVisualizationType template argument will require ChildItemVisualizationType::NodeType, which Item does not have, and thus Item cannot be the default!