HAL
hal::GatePinsTreeItem Class Reference

#include <gate_pins_tree_model.h>

Inheritance diagram for hal::GatePinsTreeItem:
Inheritance graph
Collaboration diagram for hal::GatePinsTreeItem:
Collaboration graph

Public Types

enum  Type { None , Pin , Group }
 

Public Member Functions

 GatePinsTreeItem (const std::string &pinName, QString pinDirection, QString pinTypee, QString netName, int inx)
 
 GatePinsTreeItem ()
 
QVariant getData (int column) const override
 
void setData (QList< QVariant > data) override
 
void setDataAtColumn (int column, QVariant &data) override
 
void appendData (QVariant data) override
 
int getColumnCount () const override
 
void setType (Type tp)
 
Type type () const
 
void setNetIds (const QList< u32 > &nids)
 
QList< u32netIds () const
 
- Public Member Functions inherited from hal::BaseTreeItem
 BaseTreeItem ()
 
 BaseTreeItem (QList< QVariant > columnData)
 
virtual ~BaseTreeItem ()
 
virtual BaseTreeItemgetParent () const
 
virtual void setParent (BaseTreeItem *parent)
 
virtual BaseTreeItemgetChild (int row) const
 
virtual QList< BaseTreeItem * > getChildren () const
 
virtual void appendChild (BaseTreeItem *child)
 
virtual void insertChild (int index, BaseTreeItem *child)
 
virtual BaseTreeItemremoveChildAtPos (int row)
 
virtual bool removeChild (BaseTreeItem *child)
 
virtual int getChildCount () const
 
virtual int getRowForChild (const BaseTreeItem *child) const
 
virtual int getOwnRow ()
 

Additional Inherited Members

- Protected Attributes inherited from hal::BaseTreeItem
BaseTreeItemmParent
 
QList< BaseTreeItem * > mChildren
 

Detailed Description

Definition at line 39 of file gate_pins_tree_model.h.

Member Enumeration Documentation

◆ Type

Enumerator
None 
Pin 
Group 

Definition at line 42 of file gate_pins_tree_model.h.

Constructor & Destructor Documentation

◆ GatePinsTreeItem() [1/2]

hal::GatePinsTreeItem::GatePinsTreeItem ( const std::string &  pinName,
QString  pinDirection,
QString  pinTypee,
QString  netName,
int  inx 
)

Definition at line 14 of file gate_pins_tree_model.cpp.

◆ GatePinsTreeItem() [2/2]

hal::GatePinsTreeItem::GatePinsTreeItem ( )

Definition at line 18 of file gate_pins_tree_model.cpp.

Member Function Documentation

◆ appendData()

void hal::GatePinsTreeItem::appendData ( QVariant  data)
overridevirtual

Appends a new column to the item.

Parameters
data- The data of the new column.

Implements hal::BaseTreeItem.

Definition at line 75 of file gate_pins_tree_model.cpp.

◆ getColumnCount()

int hal::GatePinsTreeItem::getColumnCount ( ) const
overridevirtual

Get the number of currently stored column data.

Returns
The column count.

Implements hal::BaseTreeItem.

Definition at line 77 of file gate_pins_tree_model.cpp.

◆ getData()

QVariant hal::GatePinsTreeItem::getData ( int  column) const
overridevirtual

Get the data of a specific column (most in the form of a string).

Parameters
column- The requested column.
Returns
The data if within the column count. Empty QVariant otherwise.

Implements hal::BaseTreeItem.

Definition at line 21 of file gate_pins_tree_model.cpp.

References QString::fromStdString(), and Group.

Referenced by hal::GatePinTree::handleContextMenuRequested(), and hal::GatePinTree::mouseDoubleClickEvent().

◆ netIds()

QList<u32> hal::GatePinsTreeItem::netIds ( ) const
inline

Get the connected nets for a given treeitem (represents a pin). If the item is grouping type or the pin has no connected net, an empty list is returned. In case of an inout pin, even multiple connected nets are possible.

Returns
A list of net ids.

Definition at line 78 of file gate_pins_tree_model.h.

Referenced by hal::GatePinTree::handleContextMenuRequested(), and hal::GatePinTree::mouseDoubleClickEvent().

◆ setData()

void hal::GatePinsTreeItem::setData ( QList< QVariant data)
overridevirtual

Sets the data for all columns.

Parameters
data- Each entry in the list represents one column.

Implements hal::BaseTreeItem.

Definition at line 41 of file gate_pins_tree_model.cpp.

References hal::data.

Referenced by hal::GatePinsTreeModel::setGate().

◆ setDataAtColumn()

void hal::GatePinsTreeItem::setDataAtColumn ( int  column,
QVariant data 
)
overridevirtual

Sets the data for a specified column. The index must be within already existing boundaries (for example, add dummy data beforehand).

Parameters
index- The column to set the new data.
data- The new column data.

Implements hal::BaseTreeItem.

Definition at line 51 of file gate_pins_tree_model.cpp.

References hal::data.

◆ setNetIds()

void hal::GatePinsTreeItem::setNetIds ( const QList< u32 > &  nids)
inline

Definition at line 69 of file gate_pins_tree_model.h.

Referenced by hal::GatePinsTreeModel::setGate().

◆ setType()

void hal::GatePinsTreeItem::setType ( Type  tp)
inline

Definition at line 61 of file gate_pins_tree_model.h.

Referenced by hal::GatePinsTreeModel::setGate().

◆ type()

Type hal::GatePinsTreeItem::type ( ) const
inline

Get the type (enum) of a given item.

Returns
The item's type.

Definition at line 68 of file gate_pins_tree_model.h.

Referenced by hal::GatePinTree::handleContextMenuRequested(), and hal::GatePinTree::mouseDoubleClickEvent().


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