libyui-qt  2.56.2
YQTable Class Reference
Inheritance diagram for YQTable:
Collaboration diagram for YQTable:

Public Member Functions

 YQTable (YWidget *parent, YTableHeader *header, bool multiSelection)
 Constructor.
 
virtual ~YQTable ()
 Destructor.
 
virtual void setKeepSorting (bool keepSorting)
 Switch between sorting by item insertion order (keepSorting: true) or allowing the user to sort by an arbitrary column (by clicking on the column header). More...
 
virtual void addItem (YItem *item)
 Add an item. More...
 
virtual void addItems (const YItemCollection &itemCollection)
 Add multiple items. More...
 
virtual void selectItem (YItem *item, bool selected=true)
 Select or deselect an item. More...
 
virtual void deselectAllItems ()
 Deselect all items. More...
 
virtual void deleteAllItems ()
 Delete all items. More...
 
virtual void cellChanged (const YTableCell *cell)
 Notification that a cell (its text and/or its icon) was changed from the outside. More...
 
virtual void setEnabled (bool enabled)
 Set enabled/disabled state. More...
 
virtual int preferredWidth ()
 Preferred width of the widget. More...
 
virtual int preferredHeight ()
 Preferred height of the widget. More...
 
virtual void setSize (int newWidth, int newHeight)
 Set the new size of the widget. More...
 
virtual bool setKeyboardFocus ()
 Accept the keyboard focus. More...
 

Protected Slots

void slotSelected (QTreeWidgetItem *)
 Notification that an item is selected (single click or keyboard).
 
void slotSelectionChanged ()
 Notification that the item selection changed (relevant for multiSelection mode).
 
void slotActivated (QTreeWidgetItem *)
 Notification that an item is activated (double click or keyboard).
 
void slotItemExpanded (QTreeWidgetItem *item)
 Propagate an "item expanded" event to the underlying YTableItem.
 
void slotItemCollapsed (QTreeWidgetItem *item)
 Propagate an "item collapsed" event to the underlying YTableItem.
 
void slotContextMenu (const QPoint &pos)
 Propagate a context menu selection. More...
 

Protected Member Functions

void selectOrigItem (QTreeWidgetItem *listViewItem)
 Select the original item (the YTableItem) that corresponds to the specified listViewItem.
 
void addItem (YItem *item, bool batchMode, bool resizeColumnsToContent)
 Internal addItem() method that will not do expensive operations in batch mode.
 
void cloneChildItems (YTableItem *parentItem, YQTableListViewItem *parentItemClone)
 Clone (create Qt item counterparts) for all child items of 'parentItem'. More...
 

Protected Attributes

QY2ListView_qt_listView
 

Detailed Description

Definition at line 38 of file YQTable.h.

Member Function Documentation

◆ addItem()

void YQTable::addItem ( YItem *  item)
virtual

Add an item.

Reimplemented from YSelectionWidget.

Definition at line 140 of file YQTable.cc.

◆ addItems()

void YQTable::addItems ( const YItemCollection &  itemCollection)
virtual

Add multiple items.

Reimplemented for efficiency from YSelectionWidget.

Definition at line 206 of file YQTable.cc.

Here is the call graph for this function:

◆ cellChanged()

void YQTable::cellChanged ( const YTableCell *  cell)
virtual

Notification that a cell (its text and/or its icon) was changed from the outside.

Applications are required to call this whenever a table cell is changed after adding the corresponding table item (the row) to the table widget.

Reimplemented from YTable.

Definition at line 300 of file YQTable.cc.

Here is the call graph for this function:

◆ cloneChildItems()

void YQTable::cloneChildItems ( YTableItem *  parentItem,
YQTableListViewItem parentItemClone 
)
protected

Clone (create Qt item counterparts) for all child items of 'parentItem'.

Set their Qt item parent to 'parentItemClone'.

Definition at line 186 of file YQTable.cc.

◆ deleteAllItems()

void YQTable::deleteAllItems ( )
virtual

Delete all items.

Reimplemented from YSelectionWidget.

Definition at line 292 of file YQTable.cc.

Here is the call graph for this function:

◆ deselectAllItems()

void YQTable::deselectAllItems ( )
virtual

Deselect all items.

Reimplemented from YSelectionWidget.

Definition at line 282 of file YQTable.cc.

◆ preferredHeight()

int YQTable::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

Definition at line 420 of file YQTable.cc.

◆ preferredWidth()

int YQTable::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

Definition at line 410 of file YQTable.cc.

◆ selectItem()

void YQTable::selectItem ( YItem *  item,
bool  selected = true 
)
virtual

Select or deselect an item.

Reimplemented from YSelectionWidget.

Definition at line 232 of file YQTable.cc.

Here is the call graph for this function:

◆ setEnabled()

void YQTable::setEnabled ( bool  enabled)
virtual

Set enabled/disabled state.

Reimplemented from YWidget.

Definition at line 400 of file YQTable.cc.

◆ setKeepSorting()

void YQTable::setKeepSorting ( bool  keepSorting)
virtual

Switch between sorting by item insertion order (keepSorting: true) or allowing the user to sort by an arbitrary column (by clicking on the column header).

Reimplemented from YTable.

Definition at line 131 of file YQTable.cc.

Here is the call graph for this function:

◆ setKeyboardFocus()

bool YQTable::setKeyboardFocus ( )
virtual

Accept the keyboard focus.

Reimplemented from YWidget.

Definition at line 437 of file YQTable.cc.

◆ setSize()

void YQTable::setSize ( int  newWidth,
int  newHeight 
)
virtual

Set the new size of the widget.

Reimplemented from YWidget.

Definition at line 430 of file YQTable.cc.

◆ slotContextMenu

void YQTable::slotContextMenu ( const QPoint &  pos)
protectedslot

Propagate a context menu selection.

This will trigger a 'ContextMenuActivated' event if 'notifyContextMenu' is set.

Definition at line 446 of file YQTable.cc.

Here is the call graph for this function:

The documentation for this class was generated from the following files: