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