29 #include "QY2ListView.h"
30 #include <yui/YTable.h>
34 class QTreeWidgetItem;
37 class YQTable :
public QFrame,
public YTable
47 YTableHeader * header,
48 bool multiSelection );
69 virtual void addItem( YItem * item );
76 virtual void addItems(
const YItemCollection & itemCollection );
83 virtual void selectItem( YItem * item,
bool selected =
true );
107 virtual void cellChanged(
const YTableCell * cell );
135 virtual void setSize(
int newWidth,
int newHeight );
184 void addItem( YItem * item,
bool batchMode,
bool resizeColumnsToContent );
217 YTableItem *
origItem()
const {
return _origItem; }
227 virtual QString
smartSortKey(
int column)
const override;
232 YTableItem * _origItem;
Enhanced QTreeWidgetItem.
Visual representation of a YTableItem.
virtual QString smartSortKey(int column) const override
The text of the table cell or the sort-key if available.
YQTableListViewItem(YQTable *table, QY2ListView *parent, YTableItem *origItem)
Constructor.
YQTable * table() const
Return the parent table widget.
void updateCell(const YTableCell *cell)
Update this item's display with the content of 'cell'.
YTableItem * origItem() const
Return the corresponding YTableItem.
virtual void addItems(const YItemCollection &itemCollection)
Add multiple items.
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
virtual bool setKeyboardFocus()
Accept the keyboard focus.
virtual void addItem(YItem *item)
Add an item.
virtual void deselectAllItems()
Deselect all items.
void slotActivated(QTreeWidgetItem *)
Notification that an item is activated (double click or keyboard).
virtual void setKeepSorting(bool keepSorting)
Switch between sorting by item insertion order (keepSorting: true) or allowing the user to sort by an...
virtual int preferredWidth()
Preferred width of the widget.
void slotContextMenu(const QPoint &pos)
Propagate a context menu selection.
virtual void selectItem(YItem *item, bool selected=true)
Select or deselect an item.
virtual void deleteAllItems()
Delete all items.
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
virtual ~YQTable()
Destructor.
void slotSelected(QTreeWidgetItem *)
Notification that an item is selected (single click or keyboard).
virtual int preferredHeight()
Preferred height of the widget.
void slotSelectionChanged()
Notification that the item selection changed (relevant for multiSelection mode).
YQTable(YWidget *parent, YTableHeader *header, bool multiSelection)
Constructor.
virtual void cellChanged(const YTableCell *cell)
Notification that a cell (its text and/or its icon) was changed from the outside.
void selectOrigItem(QTreeWidgetItem *listViewItem)
Select the original item (the YTableItem) that corresponds to the specified listViewItem.