29 #include <QTreeWidget>
31 #include <yui/YTree.h>
38 class YQTree :
public QFrame,
public YTree
48 const std::string & label,
50 bool recursiveSelection );
62 virtual void setLabel(
const std::string & label );
79 virtual void selectItem( YItem * item,
bool selected =
true );
122 virtual void setSize(
int newWidth,
int newHeight );
163 void slotItemClicked( QTreeWidgetItem * item,
int column );
200 void selectItem(QTreeWidgetItem * item,
bool selected,
bool recursive);
221 QTreeWidget * _qt_treeWidget;
234 QTreeWidget * parent,
256 virtual void setOpen(
bool open );
265 YTreeItem * yTreeItem,
276 QString
key(
int column,
bool ascending )
const;
284 YTreeItem * _origItem;
QString key(int column, bool ascending) const
Sort key of this item.
YQTreeItem(YQTree *tree, QTreeWidget *parent, YTreeItem *origItem, int serial)
Constructor for a top level item.
YTreeItem * origItem()
Returns the original YTreeItem of which this item is a clone.
virtual void setOpen(bool open)
Open this item.
void slotActivated(QTreeWidgetItem *item)
Propagate a double click or pressing the space key on a tree item.
virtual void selectItem(YItem *item, bool selected=true)
Select or deselect an item.
YQTree(YWidget *parent, const std::string &label, bool multiSelection, bool recursiveSelection)
Constructor.
virtual void rebuildTree()
Rebuild the displayed tree from the internally stored YTreeItems.
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
void slotSelectionChanged()
Propagate a tree item selection.
virtual void setLabel(const std::string &label)
Change the label text.
void openBranch(YQTreeItem *item)
Open the branch of 'item' recursively to its toplevel item.
void slotItemExpanded(QTreeWidgetItem *item)
Propagate an "item expanded" event to the underlying YTreeItem.
virtual YTreeItem * currentItem()
Return the the item that currently has the keyboard focus or 0 if no item currently has the keyboard ...
void slotItemCollapsed(QTreeWidgetItem *item)
Propagate an "item collapsed" event to the underlying YTreeItem.
void buildDisplayTree(YQTreeItem *parentItem, YItemIterator begin, YItemIterator end)
Build a tree of items that will be displayed (YQTreeItems) from the original items between iterators ...
virtual bool setKeyboardFocus()
Accept the keyboard focus.
virtual void setEnabled(bool enabled)
Set enabled/disbled state.
virtual void deleteAllItems()
Delete all items.
virtual void activate()
Activate the item selected in the tree.
virtual int preferredHeight()
Preferred height of the widget.
virtual ~YQTree()
Destructor.
virtual int preferredWidth()
Preferred width of the widget.
void slotContextMenu(const QPoint &pos)
Propagate a context menu selection.
void slotItemChanged(QTreeWidgetItem *item)
Propagate a tree item change.
virtual void deselectAllItems()
Deselect all items.