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() );
117 const std::string & sortKey = std::string() );
164 std::string iconName(
int index )
const;
170 bool hasIconName(
int index )
const;
183 std::string iconName()
const {
return ""; }
185 void setLabel (
const std::string & ) {}
186 void setIconName (
const std::string & ) {}
228 const std::string &
sortKey =
"" )
242 const std::string &
label,
244 const std::string &
sortKey =
"" )
264 std::string
label()
const {
return _label; }
273 void setLabel(
const std::string & newLabel ) { _label = newLabel; }
292 void setIconName(
const std::string & newIconName ) { _iconName = newIconName; }
297 std::string
sortKey()
const {
return _sortKey; }
311 void setSortKey(
const std::string & newSortKey ) { _sortKey = newSortKey; }
342 std::string _iconName;
343 std::string _sortKey;
YTableCellCollection::const_iterator YTableCellConstIterator
Const iterator over YTableCellCollection.
std::vector< YTableCell * > YTableCellCollection
Collection of pointers to YTableCell.
YTableCellCollection::iterator YTableCellIterator
Mutable iterator over YTableCellCollection.
Simple item class for SelectionBox, ComboBox, MultiSelectionBox etc.
int index() const
Return the index of this item (as set with setIndex() ).
One cell (one column in one row) of a YTableItem.
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.
bool hasIconName() const
Return 'true' if this cell has an icon name.
YTableItem * parent() const
Return this cell's parent item or 0 if it doesn't have one yet.
void setLabel(const std::string &newLabel)
Set this cell's label.
bool hasSortKey() const
Return 'true' if this cell has a sort key.
int column() const
Return this cell's column no.
std::string sortKey() const
Return this cell's sort key.
virtual ~YTableCell()
Destructor.
YTableCell(YTableItem *parent, int column, const std::string &label, const std::string &iconName="", const std::string &sortKey="")
Constructor with parent, column no., label and optional icon name for cells that are created with a p...
YTableCell(const std::string &label, const std::string &iconName="", const std::string &sortKey="")
Constructor with label and optional icon name and optional sort key for cells that don't have a paren...
std::string iconName() const
Return this cell's icon name.
int itemIndex() const
Convenience function: Return this cell's parent item's index within its table widget or -1 if there i...
void setSortKey(const std::string &newSortKey)
Set this cell's sort key.
std::string label() const
Return this cells's label.
Item class for YTable items.
int cellCount() const
Return the number of cells this item has.
YTableCellIterator cellsBegin()
Return an iterator that points to the first cell of this item.
std::string iconName(int index) const
Return the icon name of cell no.
YTableItem()
Default constructor.
bool hasIconName(int index) const
Return 'true' if there is a cell with the specified index that has an icon name.
void deleteCells()
Delete all cells.
virtual ~YTableItem()
Destructor.
void addCell(YTableCell *cell_disown)
Add a cell.
const YTableCell * cell(int index) const
Return the cell at the specified index (counting from 0 on) or 0 if there is none.
YTableCellIterator cellsEnd()
Return an iterator that points after the last cell of this item.
bool hasCell(int index) const
Return 'true' if this item has a cell with the specified index (counting from 0 on),...
std::string label() const
Just for debugging.