![]() |
HAL
|
An entry within a GroupingTableModel. More...
#include <grouping_table_model.h>
Public Member Functions | |
GroupingTableEntry (const QString &n) | |
GroupingTableEntry (u32 existingId) | |
GroupingTableEntry (Grouping *grp) | |
u32 | id () const |
QString | name () const |
QColor | color () const |
void | setName (const QString &n) |
void | setColor (const QColor &c) |
Grouping * | grouping () const |
An entry within a GroupingTableModel.
The GroupingTableEntry represents one entry in the groupings table. Therefore it stores information about the grouping. It also provides and interface to change these fields.
Definition at line 48 of file grouping_table_model.h.
hal::GroupingTableEntry::GroupingTableEntry | ( | const QString & | n | ) |
Constructor.
Creates a new grouping in the netlist.
n | - The name of the grouping |
Definition at line 16 of file grouping_table_model.cpp.
References hal::Netlist::create_grouping(), hal::gNetlist, and test::n.
hal::GroupingTableEntry::GroupingTableEntry | ( | u32 | existingId | ) |
Constructor.
Initializes the GroupingTableEntry with an already existing grouping of the netlist.
existingId | - The id of an already existing grouping of the netlist. |
Definition at line 22 of file grouping_table_model.cpp.
References hal::Netlist::get_grouping_by_id(), and hal::gNetlist.
|
inline |
Constructor.
Initializes the GroupingTableEntry with an already existing grouping.
grp | - The grouping to represent |
c | - The color of the grouping |
Definition at line 75 of file grouping_table_model.h.
QColor hal::GroupingTableEntry::color | ( | ) | const |
Gets the color of the grouping.
Definition at line 40 of file grouping_table_model.cpp.
References hal::Grouping::get_color(), and hal::toQColor().
Referenced by hal::GroupingTableModel::data(), hal::GroupingsOfItemModel::data(), hal::ActionDeleteObject::exec(), and hal::GroupingColorSerializer::serialize().
|
inline |
Accesses the grouping this entry represents.
Definition at line 118 of file grouping_table_model.h.
Referenced by hal::GroupingTableModel::addDefaultEntry(), and hal::ActionDeleteObject::exec().
u32 hal::GroupingTableEntry::id | ( | ) | const |
Gets the id of the grouping.
Definition at line 28 of file grouping_table_model.cpp.
References hal::Grouping::get_id().
Referenced by hal::GroupingTableModel::data(), hal::GroupingsOfItemModel::data(), hal::ActionDeleteObject::exec(), and hal::GroupingColorSerializer::serialize().
QString hal::GroupingTableEntry::name | ( | ) | const |
Gets the name of the grouping.
Definition at line 34 of file grouping_table_model.cpp.
References QString::fromStdString(), and hal::Grouping::get_name().
Referenced by hal::GroupingTableModel::data(), hal::GroupingsOfItemModel::data(), and hal::ActionDeleteObject::exec().
void hal::GroupingTableEntry::setColor | ( | const QColor & | c | ) |
Sets the color for the grouping.
c | - the new color for the grouping |
Definition at line 52 of file grouping_table_model.cpp.
References QColor::hue(), QColor::saturation(), hal::Grouping::set_color(), and QColor::value().
void hal::GroupingTableEntry::setName | ( | const QString & | n | ) |
Sets the name of the grouping.
n | - The new name of the grouping |
Definition at line 46 of file grouping_table_model.cpp.
References test::n, and hal::Grouping::set_name().