Envision
A visual programming IDE for object-oriented languages
|
The non-template base class for DeclarativeItem. More...
Classes | |
struct | Merge |
Public Types | |
typedef DeclarativeItemBaseStyle | StyleType |
Public Member Functions | |
DeclarativeItemBase (Item *parent, const StyleType *style=itemStyles().get()) | |
virtual | ~DeclarativeItemBase () |
virtual QList< Visualization::VisualizationAddOn * > | addOns () override |
FormElement * | currentForm () const |
Returns the form at the index from the cached result of determineForm. More... | |
int | currentFormIndex () const |
Returns the index of the current form. More... | |
QList< FormElement * > | currentShapeElements () const |
Returns the list of shape elements belonging to the current form (the same index as returned by determineForm). More... | |
virtual void | determineChildren () override |
virtual int | determineForm () |
Returns the index of the form to use for the current state of the declarative item. More... | |
virtual QList< FormElement * > & | forms () const =0 |
Returns the list of forms available for this declarative item type. More... | |
virtual Visualization::InteractionHandler * | handler () const override |
virtual bool | isEmpty () const override |
virtual QList< ItemRegion > | regions () override |
virtual void | setStyle (const Visualization::ItemStyle *itemStyle) override |
virtual QList< QList< FormElement * > > & | shapeElements () const =0 |
Returns the a list of shape elements per form for this declarative item type. More... | |
virtual bool | sizeDependsOnParent () const override |
const StyleType * | style () const |
virtual void | updateGeometry (int availableWidth, int availableHeight) override |
Static Public Member Functions | |
static void | addAddOn (Visualization::VisualizationAddOn *addOn) |
static Visualization::InteractionHandler * | defaultClassHandler () |
static Visualization::StyleSet< DeclarativeItemBase > & | itemStyles () |
static bool | removeAddOn (Visualization::VisualizationAddOn *addOn) |
static void | setDefaultClassHandler (Visualization::InteractionHandler *handler) |
Static Protected Member Functions | |
static GridLayoutFormElement * | grid (QList< QList< Merge >> elements) |
Creates a grid layout. More... | |
Static Private Member Functions | |
static QList< Visualization::VisualizationAddOn * > & | staticAddOns () |
Private Attributes | |
int | currentFormIndex_ {-1} |
Static Private Attributes | |
static Visualization::InteractionHandler * | defaultClassHandler_ = nullptr |
Additional Inherited Members | |
Protected Types inherited from Core::Reflect< Base > | |
using | Super = Reflect< Base > |
The non-template base class for DeclarativeItem.
Implements all not template related functionalities of the class DeclarativeItem.
Visualization::DeclarativeItemBase::DeclarativeItemBase | ( | Item * | parent, |
const StyleType * | style = itemStyles().get() |
||
) |
|
virtual |
|
static |
|
overridevirtual |
|
inline |
Returns the form at the index from the cached result of determineForm.
|
inline |
Returns the index of the current form.
This is the index that was return by the last call to determineForm().
|
inline |
Returns the list of shape elements belonging to the current form (the same index as returned by determineForm).
|
inlinestatic |
|
overridevirtual |
|
virtual |
Returns the index of the form to use for the current state of the declarative item.
This method returns 0 by default, which means there is no redefinition needed when there is only one form available for this declarative item. When there are multiple forms to choose from, this method should be overridden to return the index to the correct form.
When overriding this method, one should be aware, that this method is called upon every redraw, and therefore should not be too computationally complex.
This method gets called once per redraw. To use the cached result of this call, use currentForm.
|
pure virtual |
Returns the list of forms available for this declarative item type.
Implemented in Visualization::DeclarativeItem< VisualizationType >.
|
staticprotected |
Creates a grid layout.
This is a convenience method.
|
overridevirtual |
|
overridevirtual |
|
static |
|
overridevirtual |
|
static |
|
inlinestatic |
|
overridevirtual |
|
pure virtual |
Returns the a list of shape elements per form for this declarative item type.
Those lists are determined from the list of forms.
Implemented in Visualization::DeclarativeItem< VisualizationType >.
|
overridevirtual |
|
staticprivate |
|
inline |
|
overridevirtual |
|
private |
|
staticprivate |