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;
virtual void selectItem(YItem *item, bool selected=true)
Select or deselect an item.
virtual void addItem(YItem *item)
Add an item.
void slotContextMenu(const QPoint &pos)
Propagate a context menu selection.
virtual bool setKeyboardFocus()
Accept the keyboard focus.
YQTableListViewItem(YQTable *table, QY2ListView *parent, YTableItem *origItem)
Constructor.
void slotSelected(QTreeWidgetItem *)
Notification that an item is selected (single 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 void deleteAllItems()
Delete all items.
void selectOrigItem(QTreeWidgetItem *listViewItem)
Select the original item (the YTableItem) that corresponds to the specified listViewItem.
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
Visual representation of a YTableItem.
YTableItem * origItem() const
Return the corresponding YTableItem.
virtual void deselectAllItems()
Deselect all items.
virtual void cellChanged(const YTableCell *cell)
Notification that a cell (its text and/or its icon) was changed from the outside. ...
YQTable(YWidget *parent, YTableHeader *header, bool multiSelection)
Constructor.
virtual ~YQTable()
Destructor.
void updateCell(const YTableCell *cell)
Update this item's display with the content of 'cell'.
YQTable * table() const
Return the parent table widget.
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
void slotActivated(QTreeWidgetItem *)
Notification that an item is activated (double click or keyboard).
virtual void addItems(const YItemCollection &itemCollection)
Add multiple items.
virtual int preferredWidth()
Preferred width of the widget.
Enhanced QTreeWidgetItem.
virtual QString smartSortKey(int column) const override
The text of the table cell or the sort-key if available.
virtual int preferredHeight()
Preferred height of the widget.
void slotSelectionChanged()
Notification that the item selection changed (relevant for multiSelection mode).