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,
221 YCBTableItem * origItem );
231 YCBTableItem *
origItem()
const {
return _origItem; }
236 void updateCell(
const YTableCell * cell );
241 YCBTableItem * _origItem;
virtual void setEnabled(bool enabled)
Set enabled/disabled state.
void slotContextMenu(const QPoint &pos)
Propagate a context menu selection.
virtual void addItem(YItem *item)
Add an item.
void slotSelected(QTreeWidgetItem *)
Notification that an item is selected (single click or keyboard).
virtual void deselectAllItems()
Deselect all items.
virtual ~YMGA_QCBTable()
Destructor.
YMGA_QCBTable * table() const
Return the parent table widget.
virtual int preferredWidth()
Preferred width of the widget.
virtual void cellChanged(const YTableCell *cell)
Notification that a cell (its text and/or its icon) was changed from the outside. ...
virtual void selectItem(YItem *item, bool selected=true)
Select or deselect an item.
virtual void setKeepSorting(bool keepSorting)
Switch between sorting by item insertion order (keepSorting: true) or allowing the user to sort by an...
virtual int preferredHeight()
Preferred height of the widget.
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
int checkboxItemColumn()
returns which column is managed by checkboxes, if any -1 otherwise
YCBTableItem * origItem() const
Return the corresponding YCBTableItem.
void checkItem(YItem *item, bool checked=true)
check/uncheck Item from application.
virtual bool setKeyboardFocus()
Accept the keyboard focus.
virtual void addItems(const YItemCollection &itemCollection)
Add multiple items.
YMGA_QCBTable(YWidget *parent, YTableHeader *header, YCBTableMode checkboxMode)
Constructor.
void slotActivated(QTreeWidgetItem *listViewItem, int column)
Notification that an item is activated (double click or keyboard).
void selectOrigItem(QTreeWidgetItem *listViewItem)
Select the original item (the YCBTableItem) that corresponds to the specified listViewItem.
virtual void deleteAllItems()
Delete all items.
Visual representation of a YCBTableItem.