29 #include "QY2ListView.h"
30 #include <yui/YTable.h>
34 class QTreeWidgetItem;
38 class YQTable :
public QFrame,
public YTable
48 YTableHeader * header,
49 bool multiSelection );
70 virtual void addItem( YItem * item );
77 virtual void addItems(
const YItemCollection & itemCollection );
84 virtual void selectItem( YItem * item,
bool selected =
true );
108 virtual void cellChanged(
const YTableCell * cell );
136 virtual void setSize(
int newWidth,
int newHeight );
196 void addItem( YItem * item,
bool batchMode,
bool resizeColumnsToContent );
243 YTableItem *
origItem()
const {
return _origItem; }
258 virtual QString
smartSortKey(
int column)
const override;
275 YTableItem * _origItem;
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
void setColAlignment()
Set the alignment for each column according to the YTable parent's alignment.
virtual void deleteAllItems()
Delete all items.
void slotContextMenu(const QPoint &pos)
Propagate a context menu selection.
void init()
Common initializations for all constructors.
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
YQTableListViewItem(YQTable *table, QY2ListView *parent, YTableItem *origItem)
Constructor for toplevel items.
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.
virtual QString smartSortKey(int column) const override
The text of the table cell or the sort-key if available.
void slotItemExpanded(QTreeWidgetItem *item)
Propagate an "item expanded" event to the underlying YTableItem.
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 cloneChildItems(YTableItem *parentItem, YQTableListViewItem *parentItemClone)
Clone (create Qt item counterparts) for all child items of 'parentItem'.
void slotItemCollapsed(QTreeWidgetItem *item)
Propagate an "item collapsed" event to the underlying YTableItem.
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.
void updateCells()
Update all columns of this item with the content of the original item.
Enhanced QTreeWidgetItem.
Visual representation of a YTableItem.