libyui-qt  2.43.5
 All Classes Functions Variables
YQTree Class Reference
Inheritance diagram for YQTree:

Public Member Functions

 YQTree (YWidget *parent, const std::string &label, bool multiSelection, bool recursiveSelection)
 
virtual ~YQTree ()
 
virtual void setLabel (const std::string &label)
 
virtual void rebuildTree ()
 
virtual void selectItem (YItem *item, bool selected=true)
 
virtual void deselectAllItems ()
 
virtual void deleteAllItems ()
 
virtual void setEnabled (bool enabled)
 
virtual int preferredWidth ()
 
virtual int preferredHeight ()
 
virtual void setSize (int newWidth, int newHeight)
 
virtual bool setKeyboardFocus ()
 
virtual YTreeItem * currentItem ()
 

Protected Slots

void slotSelectionChanged ()
 
void slotItemChanged (QTreeWidgetItem *item)
 
void slotItemClicked (QTreeWidgetItem *item, int column)
 
void slotActivated (QTreeWidgetItem *item)
 
void slotItemExpanded (QTreeWidgetItem *item)
 
void slotItemCollapsed (QTreeWidgetItem *item)
 
void slotContextMenu (const QPoint &pos)
 

Protected Member Functions

void selectItem (YQTreeItem *item)
 
void selectItem (QTreeWidgetItem *item, bool selected, bool recursive)
 
void openBranch (YQTreeItem *item)
 
void buildDisplayTree (YQTreeItem *parentItem, YItemIterator begin, YItemIterator end)
 

Protected Attributes

YQWidgetCaption_caption
 
QTreeWidget * _qt_treeWidget
 
int _nextSerialNo
 

Detailed Description

Definition at line 38 of file YQTree.h.

Constructor & Destructor Documentation

YQTree::YQTree ( YWidget *  parent,
const std::string &  label,
bool  multiSelection,
bool  recursiveSelection 
)

Constructor.

Definition at line 51 of file YQTree.cc.

YQTree::~YQTree ( )
virtual

Destructor.

Definition at line 110 of file YQTree.cc.

Member Function Documentation

void YQTree::buildDisplayTree ( YQTreeItem parentItem,
YItemIterator  begin,
YItemIterator  end 
)
protected

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).

Definition at line 133 of file YQTree.cc.

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 418 of file YQTree.cc.

void YQTree::deleteAllItems ( )
virtual

Delete all items.

Reimplemented from YSelectionWidget.

Definition at line 258 of file YQTree.cc.

void YQTree::deselectAllItems ( )
virtual

Deselect all items.

Reimplemented from YSelectionWidget.

Definition at line 232 of file YQTree.cc.

void YQTree::openBranch ( YQTreeItem item)
protected

Open the branch of 'item' recursively to its toplevel item.

Definition at line 201 of file YQTree.cc.

int YQTree::preferredHeight ( )
virtual

Preferred height of the widget.

Reimplemented from YWidget.

Definition at line 373 of file YQTree.cc.

int YQTree::preferredWidth ( )
virtual

Preferred width of the widget.

Reimplemented from YWidget.

Definition at line 366 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 123 of file YQTree.cc.

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

Select or deselect an item.

Reimplemented from YSelectionWidget.

Definition at line 155 of file YQTree.cc.

void YQTree::selectItem ( YQTreeItem item)
protected

Select an item via the corresponding YQTreItem.

Definition at line 178 of file YQTree.cc.

void YQTree::selectItem ( QTreeWidgetItem *  item,
bool  selected,
bool  recursive 
)
protected

Select or deselect an item, recursively

Definition at line 267 of file YQTree.cc.

void YQTree::setEnabled ( bool  enabled)
virtual

Set enabled/disbled state.

Reimplemented from YWidget.

Definition at line 390 of file YQTree.cc.

bool YQTree::setKeyboardFocus ( )
virtual

Accept the keyboard focus.

Definition at line 398 of file YQTree.cc.

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

Change the label text.

Reimplemented from YSelectionWidget.

Definition at line 116 of file YQTree.cc.

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

Set the new size of the widget.

Reimplemented from YWidget.

Definition at line 384 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 357 of file YQTree.cc.

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 406 of file YQTree.cc.

void YQTree::slotItemChanged ( QTreeWidgetItem *  item)
protectedslot

Propagate a tree item change.

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

Definition at line 290 of file YQTree.cc.

void YQTree::slotItemCollapsed ( QTreeWidgetItem *  item)
protectedslot

Propagate an "item collapsed" event to the underlying YTreeItem.

Definition at line 221 of file YQTree.cc.

void YQTree::slotItemExpanded ( QTreeWidgetItem *  item)
protectedslot

Propagate an "item expanded" event to the underlying YTreeItem.

Definition at line 210 of file YQTree.cc.

void YQTree::slotSelectionChanged ( )
protectedslot

Propagate a tree item selection.

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

Definition at line 341 of file YQTree.cc.


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