Go to the documentation of this file.
84 const std::string & label_1 = std::string(),
85 const std::string & label_2 = std::string(),
86 const std::string & label_3 = std::string(),
87 const std::string & label_4 = std::string(),
88 const std::string & label_5 = std::string(),
89 const std::string & label_6 = std::string(),
90 const std::string & label_7 = std::string(),
91 const std::string & label_8 = std::string(),
92 const std::string & label_9 = std::string() );
163 std::string iconName(
int index )
const;
169 bool hasIconName(
int index )
const;
182 std::string iconName()
const {
return ""; }
184 void setLabel (
const std::string & ) {}
185 void setIconName (
const std::string & ) {}
239 const std::string &
label,
259 std::string
label()
const {
return _label; }
268 void setLabel(
const std::string & newLabel ) { _label = newLabel; }
287 void setIconName(
const std::string & newIconName ) { _iconName = newIconName; }
318 std::string _iconName;
325 #endif // YTableItem_h
std::string label() const
Return this cells's label.
YTableCellIterator cellsBegin()
Return an iterator that points to the first cell of this item.
int cellCount() const
Return the number of cells this item has.
int index() const
Return the index of this item (as set with setIndex() ).
std::string iconName(int index) const
Return the icon name of cell no.
YTableItem * parent() const
Return this cell's parent item or 0 if it doesn't have one yet.
std::string label() const
Just for debugging.
std::string iconName() const
Return this cell's icon name.
int column() const
Return this cell's column no.
void setIconName(const std::string &newIconName)
Set this cell's icon name.
void reparent(YTableItem *parent, int column)
Set this cell's parent item and column no.
int itemIndex() const
Convenience function: Return this cell's parent item's index within its table widget or -1 if there i...
Item class for YTable items.
void deleteCells()
Delete all cells.
YTableCell(const std::string &label, const std::string &iconName="")
Constructor with label and optional icon name for cells that don't have a parent item yet (that will ...
std::vector< YTableCell * > YTableCellCollection
Collection of pointers to YTableCell.
YTableCellIterator cellsEnd()
Return an iterator that points after the last cell of this item.
bool hasIconName() const
Return 'true' if this cell has an icon name.
void setLabel(const std::string &newLabel)
Set this cell's label.
YTableItem()
Default constructor.
YTableCellCollection::iterator YTableCellIterator
Mutable iterator over YTableCellCollection.
const YTableCell * cell(int index) const
Return the cell at the specified index (counting from 0 on) or 0 if there is none.
YTableCellCollection::const_iterator YTableCellConstIterator
Const iterator over YTableCellCollection.
YTableCell(YTableItem *parent, int column, const std::string &label, const std::string &iconName="")
Constructor with parent, column no., label and optional icon name for cells that are created with a p...
virtual ~YTableCell()
Destructor.
virtual ~YTableItem()
Destructor.
bool hasIconName(int index) const
Return 'true' if there is a cell with the specified index that has an icon name.
void addCell(YTableCell *cell_disown)
Add a cell.
One cell (one column in one row) of a YTableItem.
bool hasCell(int index) const
Return 'true' if this item has a cell with the specified index (counting from 0 on),...
Simple item class for SelectionBox, ComboBox, MultiSelectionBox etc.