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

This class can be used to display nodes with their default style, but wrapped in an item, which can be given an ItemStyle. More...

Inheritance diagram for Visualization::NodeWrapper:
Core::Reflect< Base >

Public Types

typedef ItemStyle StyleType
 

Public Member Functions

 NodeWrapper (Item *parent, NodeType *node, const StyleType *style=itemStyles().get())
 
virtual ~NodeWrapper ()
 
virtual QList< Visualization::VisualizationAddOn * > addOns () override
 
virtual Visualization::InteractionHandlerhandler () const override
 
virtual bool hasNode () const override
 
virtual bool isEmpty () const override
 
void refreshWrappedItem ()
 
void setStretchable (bool stretchable)
 Sets if the item is a special stretchable item. More...
 
virtual void setStyle (const Visualization::ItemStyle *itemStyle) override
 
virtual bool sizeDependsOnParent () const override
 
const StyleTypestyle () const
 
ItemwrappedItem () const
 

Static Public Member Functions

static void addAddOn (Visualization::VisualizationAddOn *addOn)
 
static Visualization::InteractionHandlerdefaultClassHandler ()
 
static Visualization::StyleSet< NodeWrapper > & itemStyles ()
 
static bool removeAddOn (Visualization::VisualizationAddOn *addOn)
 
static void setDefaultClassHandler (Visualization::InteractionHandler *handler)
 

Protected Member Functions

virtual void determineChildren () override
 
virtual void updateGeometry (int availableWidth, int availableHeight) override
 

Static Private Member Functions

static QList< Visualization::VisualizationAddOn * > & staticAddOns ()
 

Private Attributes

bool stretchable_ {false}
 
ItemwrappedItem_ {}
 

Static Private Attributes

static Visualization::InteractionHandlerdefaultClassHandler_ = nullptr
 

Additional Inherited Members

- Protected Types inherited from Core::Reflect< Base >
using Super = Reflect< Base >
 

Detailed Description

This class can be used to display nodes with their default style, but wrapped in an item, which can be given an ItemStyle.

This is useful, e.g. to give the node a background shape.

Member Typedef Documentation

◆ StyleType

Constructor & Destructor Documentation

◆ NodeWrapper()

Visualization::NodeWrapper::NodeWrapper ( Item parent,
NodeType *  node,
const StyleType style = itemStyles().get() 
)

◆ ~NodeWrapper()

Visualization::NodeWrapper::~NodeWrapper ( )
virtual

Member Function Documentation

◆ addAddOn()

void Visualization::NodeWrapper::addAddOn ( Visualization::VisualizationAddOn addOn)
static

◆ addOns()

QList< Visualization::VisualizationAddOn * > Visualization::NodeWrapper::addOns ( )
overridevirtual

◆ defaultClassHandler()

static Visualization::InteractionHandler* Visualization::NodeWrapper::defaultClassHandler ( )
inlinestatic

◆ determineChildren()

void Visualization::NodeWrapper::determineChildren ( )
overrideprotectedvirtual

◆ handler()

Visualization::InteractionHandler * Visualization::NodeWrapper::handler ( ) const
overridevirtual

◆ hasNode()

bool Visualization::NodeWrapper::hasNode ( ) const
overridevirtual

◆ isEmpty()

bool Visualization::NodeWrapper::isEmpty ( ) const
overridevirtual

◆ itemStyles()

Visualization::StyleSet< NodeWrapper > & Visualization::NodeWrapper::itemStyles ( )
static

◆ refreshWrappedItem()

void Visualization::NodeWrapper::refreshWrappedItem ( )

◆ removeAddOn()

bool Visualization::NodeWrapper::removeAddOn ( Visualization::VisualizationAddOn addOn)
static

◆ setDefaultClassHandler()

static void Visualization::NodeWrapper::setDefaultClassHandler ( Visualization::InteractionHandler handler)
inlinestatic

◆ setStretchable()

void Visualization::NodeWrapper::setStretchable ( bool  stretchable)
inline

Sets if the item is a special stretchable item.

This means if its node is nullptr, it is not empty and stretches as far as it has space to.

◆ setStyle()

void Visualization::NodeWrapper::setStyle ( const Visualization::ItemStyle itemStyle)
overridevirtual

◆ sizeDependsOnParent()

bool Visualization::NodeWrapper::sizeDependsOnParent ( ) const
overridevirtual

◆ staticAddOns()

QList< Visualization::VisualizationAddOn * > & Visualization::NodeWrapper::staticAddOns ( )
staticprivate

◆ style()

const StyleType* Visualization::NodeWrapper::style ( ) const
inline

◆ updateGeometry()

void Visualization::NodeWrapper::updateGeometry ( int  availableWidth,
int  availableHeight 
)
overrideprotectedvirtual

◆ wrappedItem()

Item * Visualization::NodeWrapper::wrappedItem ( ) const
inline

Member Data Documentation

◆ defaultClassHandler_

Visualization::InteractionHandler * Visualization::NodeWrapper::defaultClassHandler_ = nullptr
staticprivate

◆ stretchable_

bool Visualization::NodeWrapper::stretchable_ {false}
private

◆ wrappedItem_

Item* Visualization::NodeWrapper::wrappedItem_ {}
private