OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ak::aTreeWidgetBase Class Reference

This class represents a tree. More...

#include "aTreeWidget.h"

Inheritance diagram for ak::aTreeWidgetBase:
ak::aWidget ak::aObject

Signals

void keyPressed (QKeyEvent *)
 
void keyReleased (QKeyEvent *)
 
void mouseMove (QMouseEvent *)
 
void leave (QEvent *)
 

Public Member Functions

 aTreeWidgetBase (aTreeWidget *_ownerTree)
 Constructor.
 
virtual ~aTreeWidgetBase ()
 
virtual void keyPressEvent (QKeyEvent *_event) override
 Emits a key pressend signal a key is pressed.
 
virtual void keyReleaseEvent (QKeyEvent *_event) override
 Emits a key released signal a key is released.
 
virtual void mouseMoveEvent (QMouseEvent *event) override
 Emits a mouse move event.
 
virtual void leaveEvent (QEvent *event) override
 Emits a FocusLeft event.
 
virtual void dropEvent (QDropEvent *_event) override
 
virtual void dragEnterEvent (QDragEnterEvent *_event) override
 
virtual void dragLeaveEvent (QDragLeaveEvent *_event) override
 
virtual QWidget * widget (void) override
 Will return the widgets widget to display it.
 
void AddTopLevelItem (aTreeWidgetItem *_item)
 Will add the provided item to the top level and store its information.
 
void itemWasMovedToTopLevel (aTreeWidgetItem *_item)
 
aTreeWidgetItemtopLevelItem (const QString &_text)
 Will return the top level item with the provided text Returns nullptr if the item does not exist.
 
aTreeWidgetItemtopLevelItem (ID _id)
 Will return the top level item with the provided ID Returns nullptr if the item does not exist.
 
std::vector< QString > topLevelItemsText (void)
 Will return the names of all top level items.
 
void Clear (void)
 Will clear the tree.
 
void removeTopLevelItem (ID _id)
 Will remove the topLevelItem with the provided ID Will not destroy the item.
 
QList< aTreeWidgetItem * > selectedItemsRef (void) const
 
void extendedItemSelectionInformation (const QList< aTreeWidgetItem * > &_selectedItems, QList< ID > &_selectedItemIds, QList< ID > &_itemParentIds) const
 
- Public Member Functions inherited from ak::aWidget
 aWidget (objectType _type=otNone, UID _UID=invalidUID)
 Constructor.
 
virtual ~aWidget ()
 Deconstructor.
 
virtual bool isWidgetType (void) const override
 Returns true the object is derived from aWidget.
 
- Public Member Functions inherited from ak::aObject
 aObject (objectType _type=otNone, UID _UID=ak::invalidUID)
 Constructor.
 
 aObject (const aObject &_other)
 Copy constructor.
 
aObjectoperator= (const aObject &_other)
 Assignment operator.
 
virtual ~aObject ()
 Deconstructor.
 
virtual void removeChildObject (aObject *_child)
 Will remove the child from this object (not destroy it) This function should be called from the deconstructor of a child.
 
virtual void addChildObject (aObject *_child)
 Will add the child to this object.
 
void setUniqueName (const QString &_name)
 Will set this objects unique name.
 
virtual void setParentObject (aObject *_parentObject)
 Will set the parent object of this object.
 
QString uniqueName (void) const
 Will return the unique name of this object.
 
aObjectparentObject (void) const
 Will return a pointer to the parent object.
 
int childObjectCount (void) const
 Will return the count of sub objects.
 
aObjectchildObject (UID _childUID)
 Will return the child with the specified UID.
 
void setOwner (aObject *_object)
 Will set the owner of this object.
 
aObjectowner (void) const
 Will return the owner of this object.
 
void setUid (UID _UID)
 Will set the objects UID.
 
UID uid (void) const
 Returns the objects UID.
 
objectType type (void) const
 Returns the objects type.
 

Static Public Member Functions

static ID getItemId (QTreeWidgetItem *_item)
 Will extract the id form the QTreeWidgetItem (which must be a treeItem)
 

Additional Inherited Members

- Protected Attributes inherited from ak::aObject
UID m_uid
 
int m_references
 The objects UID.
 
objectType m_objectType
 The objects references.
 
QString m_uniqueName
 The object type of this object.
 
aObjectm_parentObject
 
aObjectm_owner
 
std::map< UID, aObject * > m_childObjects
 

Detailed Description

This class represents a tree.

Constructor & Destructor Documentation

◆ aTreeWidgetBase()

ak::aTreeWidgetBase::aTreeWidgetBase ( aTreeWidget * _ownerTree)

Constructor.

◆ ~aTreeWidgetBase()

ak::aTreeWidgetBase::~aTreeWidgetBase ( )
virtual

Member Function Documentation

◆ AddTopLevelItem()

void ak::aTreeWidgetBase::AddTopLevelItem ( aTreeWidgetItem * _item)

Will add the provided item to the top level and store its information.

Parameters
_itemThe item to add

◆ Clear()

void ak::aTreeWidgetBase::Clear ( void )

Will clear the tree.

◆ dragEnterEvent()

void ak::aTreeWidgetBase::dragEnterEvent ( QDragEnterEvent * _event)
overridevirtual

◆ dragLeaveEvent()

void ak::aTreeWidgetBase::dragLeaveEvent ( QDragLeaveEvent * _event)
overridevirtual

◆ dropEvent()

void ak::aTreeWidgetBase::dropEvent ( QDropEvent * _event)
overridevirtual

◆ extendedItemSelectionInformation()

void ak::aTreeWidgetBase::extendedItemSelectionInformation ( const QList< aTreeWidgetItem * > & _selectedItems,
QList< ID > & _selectedItemIds,
QList< ID > & _itemParentIds ) const

◆ getItemId()

ak::ID ak::aTreeWidgetBase::getItemId ( QTreeWidgetItem * _item)
static

Will extract the id form the QTreeWidgetItem (which must be a treeItem)

◆ itemWasMovedToTopLevel()

void ak::aTreeWidgetBase::itemWasMovedToTopLevel ( aTreeWidgetItem * _item)

◆ keyPressed

void ak::aTreeWidgetBase::keyPressed ( QKeyEvent * )
signal

◆ keyPressEvent()

void ak::aTreeWidgetBase::keyPressEvent ( QKeyEvent * _event)
overridevirtual

Emits a key pressend signal a key is pressed.

◆ keyReleased

void ak::aTreeWidgetBase::keyReleased ( QKeyEvent * )
signal

◆ keyReleaseEvent()

void ak::aTreeWidgetBase::keyReleaseEvent ( QKeyEvent * _event)
overridevirtual

Emits a key released signal a key is released.

◆ leave

void ak::aTreeWidgetBase::leave ( QEvent * )
signal

◆ leaveEvent()

void ak::aTreeWidgetBase::leaveEvent ( QEvent * event)
overridevirtual

Emits a FocusLeft event.

◆ mouseMove

void ak::aTreeWidgetBase::mouseMove ( QMouseEvent * )
signal

◆ mouseMoveEvent()

void ak::aTreeWidgetBase::mouseMoveEvent ( QMouseEvent * event)
overridevirtual

Emits a mouse move event.

◆ removeTopLevelItem()

void ak::aTreeWidgetBase::removeTopLevelItem ( ak::ID _id)

Will remove the topLevelItem with the provided ID Will not destroy the item.

◆ selectedItemsRef()

QList< ak::aTreeWidgetItem * > ak::aTreeWidgetBase::selectedItemsRef ( void ) const

◆ topLevelItem() [1/2]

ak::aTreeWidgetItem * ak::aTreeWidgetBase::topLevelItem ( const QString & _text)

Will return the top level item with the provided text Returns nullptr if the item does not exist.

◆ topLevelItem() [2/2]

ak::aTreeWidgetItem * ak::aTreeWidgetBase::topLevelItem ( ak::ID _id)

Will return the top level item with the provided ID Returns nullptr if the item does not exist.

◆ topLevelItemsText()

std::vector< QString > ak::aTreeWidgetBase::topLevelItemsText ( void )

Will return the names of all top level items.

◆ widget()

QWidget * ak::aTreeWidgetBase::widget ( void )
overridevirtual

Will return the widgets widget to display it.

Implements ak::aWidget.


The documentation for this class was generated from the following files: