![]() |
HAL
|
An item in the PinModel. More...
#include <pin_item.h>
Public Types | |
enum class | TreeItemType { PinGroup , Pin , GroupCreator , PinCreator , InvalidPinGroup , InvalidPin } |
Additional Inherited Members | |
![]() | |
BaseTreeItem * | mParent |
QList< BaseTreeItem * > | mChildren |
An item in the PinModel.
The PinItem is one item in the PinModel item model.
Definition at line 47 of file pin_item.h.
|
strong |
Enumerator | |
---|---|
PinGroup | |
Pin | |
GroupCreator | |
PinCreator | |
InvalidPinGroup | |
InvalidPin |
Definition at line 50 of file pin_item.h.
hal::PinItem::PinItem | ( | PinItem::TreeItemType | type | ) |
Constructor.
Definition at line 10 of file pin_item.cpp.
|
overridevirtual |
Appends a new column to the item.
data | - The data of the new column. |
Implements hal::BaseTreeItem.
Definition at line 130 of file pin_item.cpp.
|
overridevirtual |
Get the number of currently stored column data.
Implements hal::BaseTreeItem.
Definition at line 125 of file pin_item.cpp.
|
overridevirtual |
Get the data of a specific column (most in the form of a string).
column | - The requested column. |
Implements hal::BaseTreeItem.
Definition at line 24 of file pin_item.cpp.
References hal::enum_to_string(), QString::fromStdString(), GroupCreator, and PinCreator.
PinDirection hal::PinItem::getDirection | ( | ) | const |
Definition at line 96 of file pin_item.cpp.
Referenced by hal::GateLibraryWizard::accept(), hal::PinModel::getInputPins(), hal::PinModel::getOutputPins(), hal::PinModel::handleEditDirection(), hal::PinModel::handleEditName(), and hal::PinModel::setGate().
QString hal::PinItem::getDirectionAsText | ( | ) | const |
Definition at line 101 of file pin_item.cpp.
References hal::enum_to_string(), and QString::fromStdString().
Referenced by hal::PinModel::handleEditDirection().
u32 hal::PinItem::getId | ( | ) | const |
Definition at line 106 of file pin_item.cpp.
PinItem::TreeItemType hal::PinItem::getItemType | ( | ) | const |
Definition at line 132 of file pin_item.cpp.
Referenced by hal::GateLibraryWizard::accept(), hal::PinModel::getInputPins(), hal::PinModel::getOutputPins(), hal::PinModel::getPinGroups(), hal::PinModel::handleEditDirection(), hal::PinModel::handleEditName(), hal::PinModel::handleEditType(), hal::BoolWizardPage::initializePage(), hal::PinsWizardPage::isComplete(), and hal::PinDelegate::setEditorData().
QString hal::PinItem::getName | ( | ) | const |
Definition at line 81 of file pin_item.cpp.
Referenced by hal::GateLibraryWizard::accept(), hal::BoolWizardPage::initializePage(), hal::FlipFlopWizardPage::initializePage(), hal::StateWizardPage::isComplete(), and hal::PinModel::setGate().
PinType hal::PinItem::getPinType | ( | ) | const |
Definition at line 86 of file pin_item.cpp.
Referenced by hal::GateLibraryWizard::accept(), hal::PinModel::handleEditName(), hal::FlipFlopWizardPage::initializePage(), and hal::PinModel::setGate().
QString hal::PinItem::getPinTypeAsText | ( | ) | const |
Definition at line 91 of file pin_item.cpp.
References hal::enum_to_string(), and QString::fromStdString().
int hal::PinItem::row | ( | ) | const |
Definition at line 17 of file pin_item.cpp.
References hal::BaseTreeItem::getParent(), and hal::BaseTreeItem::getRowForChild().
Sets the data for all columns.
data | - Each entry in the list represents one column. |
Implements hal::BaseTreeItem.
Definition at line 48 of file pin_item.cpp.
References hal::data, GroupCreator, hal::none, Pin, PinCreator, and PinGroup.
|
overridevirtual |
Sets the data for a specified column. The index must be within already existing boundaries (for example, add dummy data beforehand).
index | - The column to set the new data. |
data | - The new column data. |
Implements hal::BaseTreeItem.
Definition at line 76 of file pin_item.cpp.
void hal::PinItem::setDirection | ( | const QString & | direction | ) |
Definition at line 116 of file pin_item.cpp.
References direction.
Referenced by hal::PinModel::handleEditDirection(), hal::PinModel::handleEditName(), setFields(), and hal::PinModel::setGate().
void hal::PinItem::setDirection | ( | PinDirection | direction | ) |
Definition at line 138 of file pin_item.cpp.
References direction.
void hal::PinItem::setFields | ( | const QString & | name, |
u32 | id, | ||
PinDirection | direction, | ||
PinType | type | ||
) |
Definition at line 152 of file pin_item.cpp.
References direction, id, name, setDirection(), setType(), and type.
void hal::PinItem::setFields | ( | GatePin * | pin | ) |
Definition at line 148 of file pin_item.cpp.
References QString::fromStdString(), hal::BasePin< T >::get_direction(), hal::BasePin< T >::get_id(), hal::BasePin< T >::get_name(), and hal::BasePin< T >::get_type().
void hal::PinItem::setId | ( | u32 | newId | ) |
Definition at line 72 of file pin_item.cpp.
Referenced by hal::PinModel::handleEditName(), and hal::PinModel::setGate().
void hal::PinItem::setItemType | ( | PinItem::TreeItemType | type | ) |
Definition at line 160 of file pin_item.cpp.
References type.
void hal::PinItem::setName | ( | const QString & | name | ) |
Sets the name of this PinItem
name | - The new name |
Definition at line 111 of file pin_item.cpp.
References name.
Referenced by hal::PinModel::handleEditName(), and hal::PinModel::setGate().
void hal::PinItem::setType | ( | const QString & | type | ) |
Definition at line 121 of file pin_item.cpp.
References type.
Referenced by hal::PinModel::handleEditName(), hal::PinModel::handleEditType(), setFields(), and hal::PinModel::setGate().
void hal::PinItem::setType | ( | PinType | type | ) |
Definition at line 143 of file pin_item.cpp.
References type.