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 | Private Member Functions | Static Private Member Functions | Private Attributes | Static Private Attributes
Visualization::PositionLayout Class Reference
Inheritance diagram for Visualization::PositionLayout:
Core::Reflect< Base >

Public Types

typedef PositionLayoutStyle StyleType
 

Public Member Functions

 PositionLayout (Item *parent, const StyleType *style=itemStyles().get())
 
 ~PositionLayout ()
 
virtual QList< Visualization::VisualizationAddOn * > addOns () override
 
template<typename T >
T * at (int index)
 
template<typename T >
T * at (int index) const
 
void clear (bool deleteItems=true)
 
bool containsNode (Model::Node *node)
 
int focusedElementIndex () const
 
virtual Visualization::InteractionHandlerhandler () const override
 
void insert (Item *item)
 Inserts the specified item into the Layout. More...
 
virtual bool isEmpty () const override
 
virtual bool isSensitiveToScale () const override
 
int length () const
 
void remove (int index, bool deleteItem=true)
 
void removeAll (Item *item, bool deleteItem=true)
 
virtual void setStyle (const Visualization::ItemStyle *itemStyle) override
 
const StyleTypestyle () const
 
void synchronizeWithNodes (const QList< Model::Node * > &nodes)
 
int toGrid (const int &pos) const
 

Static Public Member Functions

static void addAddOn (Visualization::VisualizationAddOn *addOn)
 
static Visualization::InteractionHandlerdefaultClassHandler ()
 
static Visualization::StyleSet< PositionLayout > & 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
 

Private Member Functions

bool adjustChildrenSemanticZoom ()
 Returns true if the semantic zoom level of at least one child item was adjusted. More...
 
void swap (int i, int j)
 

Static Private Member Functions

static void ensureItemHasCompositeNode (const Item *item)
 
static std::unique_ptr< PositionpositionOf (Item *item)
 
static QList< Visualization::VisualizationAddOn * > & staticAddOns ()
 

Private Attributes

bool allNodesLackPositionInfo {}
 
QVector< Item * > items
 

Static Private Attributes

static Visualization::InteractionHandlerdefaultClassHandler_ = nullptr
 

Additional Inherited Members

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

Member Typedef Documentation

◆ StyleType

Constructor & Destructor Documentation

◆ PositionLayout()

Visualization::PositionLayout::PositionLayout ( Item parent,
const StyleType style = itemStyles().get() 
)

◆ ~PositionLayout()

Visualization::PositionLayout::~PositionLayout ( )

Member Function Documentation

◆ addAddOn()

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

◆ addOns()

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

◆ adjustChildrenSemanticZoom()

bool Visualization::PositionLayout::adjustChildrenSemanticZoom ( )
private

Returns true if the semantic zoom level of at least one child item was adjusted.

◆ at() [1/2]

template<typename T >
T * Visualization::PositionLayout::at ( int  index)

◆ at() [2/2]

template<typename T >
T * Visualization::PositionLayout::at ( int  index) const

◆ clear()

void Visualization::PositionLayout::clear ( bool  deleteItems = true)

◆ containsNode()

bool Visualization::PositionLayout::containsNode ( Model::Node node)

◆ defaultClassHandler()

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

◆ determineChildren()

void Visualization::PositionLayout::determineChildren ( )
overrideprotectedvirtual

◆ ensureItemHasCompositeNode()

void Visualization::PositionLayout::ensureItemHasCompositeNode ( const Item item)
inlinestaticprivate

◆ focusedElementIndex()

int Visualization::PositionLayout::focusedElementIndex ( ) const

◆ handler()

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

◆ insert()

void Visualization::PositionLayout::insert ( Item item)

Inserts the specified item into the Layout.

Parameters
itemThe Item to insert. This item must implement an Item that represents a node derived from Model::CompositeNode. Furthermore the represented node must have the Position and the FullDetailSize extensions.

◆ isEmpty()

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

◆ isSensitiveToScale()

bool Visualization::PositionLayout::isSensitiveToScale ( ) const
overridevirtual

◆ itemStyles()

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

◆ length()

int Visualization::PositionLayout::length ( ) const

◆ positionOf()

std::unique_ptr< Position > Visualization::PositionLayout::positionOf ( Item item)
inlinestaticprivate

◆ remove()

void Visualization::PositionLayout::remove ( int  index,
bool  deleteItem = true 
)

◆ removeAddOn()

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

◆ removeAll()

void Visualization::PositionLayout::removeAll ( Item item,
bool  deleteItem = true 
)

◆ setDefaultClassHandler()

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

◆ setStyle()

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

◆ staticAddOns()

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

◆ style()

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

◆ swap()

void Visualization::PositionLayout::swap ( int  i,
int  j 
)
private

◆ synchronizeWithNodes()

void Visualization::PositionLayout::synchronizeWithNodes ( const QList< Model::Node * > &  nodes)

◆ toGrid()

int Visualization::PositionLayout::toGrid ( const int &  pos) const

◆ updateGeometry()

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

Member Data Documentation

◆ allNodesLackPositionInfo

bool Visualization::PositionLayout::allNodesLackPositionInfo {}
private

◆ defaultClassHandler_

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

◆ items

QVector<Item*> Visualization::PositionLayout::items
private