libyui-qt  2.47.1.1
YQTree Class Reference
Inheritance diagram for YQTree:
Collaboration diagram for YQTree:

Public Member Functions

 YQTree (YWidget *parent, const std::string &label, bool multiSelection, bool recursiveSelection)
 Constructor.
 
virtual ~YQTree ()
 Destructor.
 
virtual void setLabel (const std::string &label)
 Change the label text. More...
 
virtual void rebuildTree ()
 Rebuild the displayed tree from the internally stored YTreeItems. 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 setEnabled (bool enabled)
 Set enabled/disbled 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.
 
virtual YTreeItem * currentItem ()
 Return the the item that currently has the keyboard focus or 0 if no item currently has the keyboard focus. More...
 

Protected Slots

void slotSelectionChanged ()
 Propagate a tree item selection. More...
 
void slotItemChanged (QTreeWidgetItem *item)
 Propagate a tree item change. More...
 
void slotItemClicked (QTreeWidgetItem *item, int column)
 
void slotActivated (QTreeWidgetItem *item)
 Propagate a double click or pressing the space key on a tree item. More...
 
void slotItemExpanded (QTreeWidgetItem *item)
 Propagate an "item expanded" event to the underlying YTreeItem.
 
void slotItemCollapsed (QTreeWidgetItem *item)
 Propagate an "item collapsed" event to the underlying YTreeItem.
 
void slotContextMenu (const QPoint &pos)
 Propagate a context menu selection. More...
 

Protected Member Functions

void selectItem (YQTreeItem *item)
 Select an item via the corresponding YQTreItem.
 
void selectItem (QTreeWidgetItem *item, bool selected, bool recursive)
 Select or deselect an item, recursively.
 
void openBranch (YQTreeItem *item)
 Open the branch of 'item' recursively to its toplevel item.
 
void buildDisplayTree (YQTreeItem *parentItem, YItemIterator begin, YItemIterator end)
 Build a tree of items that will be displayed (YQTreeItems) from the original items between iterators 'begin' and 'end' as child items of 'parentItem' (or as toplevel items if 'parentItem' is 0).
 

Protected Attributes

YQWidgetCaption_caption
 
QTreeWidget * _qt_treeWidget
 
int _nextSerialNo
 

Detailed Description

Definition at line 38 of file YQTree.h.

Member Function Documentation

YTreeItem * YQTree::currentItem ( )
virtual

Return the the item that currently has the keyboard focus or 0 if no item currently has the keyboard focus.

Reimplemented from YMultiSelectionBox.

Definition at line 422 of file YQTree.cc.

Here is the call graph for this function:

void YQTree::deleteAllItems ( )
virtual

Delete all items.

Reimplemented from YSelectionWidget.

Definition at line 262 of file YQTree.cc.

void YQTree::deselectAllItems ( )
virtual

Deselect all items.

Reimplemented from YSelectionWidget.

Definition at line 236 of file YQTree.cc.

Here is the call graph for this function:

int YQTree::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

Definition at line 377 of file YQTree.cc.

int YQTree::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

Definition at line 370 of file YQTree.cc.

void YQTree::rebuildTree ( )
virtual

Rebuild the displayed tree from the internally stored YTreeItems.

The application should call this (once) after all items have been added with addItem(). YTree::addItems() calls this automatically.

Implemented from YTree.

Definition at line 122 of file YQTree.cc.

Here is the call graph for this function:

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

Select or deselect an item.

Reimplemented from YSelectionWidget.

Definition at line 159 of file YQTree.cc.

Here is the call graph for this function:

void YQTree::setEnabled ( bool  enabled)
virtual

Set enabled/disbled state.

Reimplemented from YWidget.

Definition at line 394 of file YQTree.cc.

void YQTree::setLabel ( const std::string &  label)
virtual

Change the label text.

Reimplemented from YSelectionWidget.

Definition at line 115 of file YQTree.cc.

Here is the call graph for this function:

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

Set the new size of the widget.

Reimplemented from YWidget.

Definition at line 388 of file YQTree.cc.

void YQTree::slotActivated ( QTreeWidgetItem *  item)
protectedslot

Propagate a double click or pressing the space key on a tree item.

This will trigger an 'Activated' event if 'notify' is set.

Definition at line 361 of file YQTree.cc.

Here is the call graph for this function:

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

Propagate a context menu selection.

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

Definition at line 410 of file YQTree.cc.

Here is the call graph for this function:

void YQTree::slotItemChanged ( QTreeWidgetItem *  item)
protectedslot

Propagate a tree item change.

This will trigger a 'ValueChanged' event if 'notify' is set.

Definition at line 294 of file YQTree.cc.

Here is the call graph for this function:

void YQTree::slotSelectionChanged ( )
protectedslot

Propagate a tree item selection.

This will trigger a 'SelectionChanged' event if 'notify' is set.

Definition at line 345 of file YQTree.cc.

Here is the call graph for this function:


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