25 #ifndef YMGA_QCBTable_h
26 #define YMGA_QCBTable_h
29 #include <yui/mga/YMGA_CBTable.h>
30 #include <yui/qt/QY2ListView.h>
34 class QTreeWidgetItem;
47 YMGA_QCBTable( YWidget * parent, YTableHeader * header, YCBTableMode checkboxMode );
68 virtual void addItem( YItem * item );
75 virtual void addItems(
const YItemCollection & itemCollection );
82 virtual void selectItem( YItem * item,
bool selected =
true );
106 virtual void cellChanged(
const YTableCell * cell );
114 void checkItem( YItem * item,
bool checked =
true );
142 virtual void setSize(
int newWidth,
int newHeight );
167 void slotActivated( QTreeWidgetItem* listViewItem,
int column );
177 void slotcolumnClicked(QTreeWidgetItem * item,
192 void addItem( YItem * item,
bool batchMode,
bool resizeColumnsToContent );
198 QY2ListView * _qt_listView;
220 QY2ListView * parent,
231 YCBTableItem *
origItem()
const {
return _origItem; }
241 YCBTableItem * _origItem;
Visual representation of a YCBTableItem.
void updateCell(const YTableCell *cell)
Update this item's display with the content of 'cell'.
YCBTableItem * origItem() const
Return the corresponding YCBTableItem.
YMGA_QCBTableListViewItem(YMGA_QCBTable *table, QY2ListView *parent, YCBTableItem *origItem)
Constructor.
YMGA_QCBTable * table() const
Return the parent table widget.
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
virtual void deselectAllItems()
Deselect all items.
void slotContextMenu(const QPoint &pos)
Propagate a context menu selection.
int checkboxItemColumn()
returns which column is managed by checkboxes, if any -1 otherwise
virtual int preferredHeight()
Preferred height of the widget.
virtual void selectItem(YItem *item, bool selected=true)
Select or deselect an item.
virtual int preferredWidth()
Preferred width 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 cellChanged(const YTableCell *cell)
Notification that a cell (its text and/or its icon) was changed from the outside.
YMGA_QCBTable(YWidget *parent, YTableHeader *header, YCBTableMode checkboxMode)
Constructor.
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
void checkItem(YItem *item, bool checked=true)
check/uncheck Item from application.
virtual bool setKeyboardFocus()
Accept the keyboard focus.
void selectOrigItem(QTreeWidgetItem *listViewItem)
Select the original item (the YCBTableItem) that corresponds to the specified listViewItem.
virtual void deleteAllItems()
Delete all items.
void slotActivated(QTreeWidgetItem *listViewItem, int column)
Notification that an item is activated (double click or keyboard).
void slotSelected(QTreeWidgetItem *)
Notification that an item is selected (single click or keyboard).
virtual void addItems(const YItemCollection &itemCollection)
Add multiple items.
virtual ~YMGA_QCBTable()
Destructor.
virtual void addItem(YItem *item)
Add an item.