29 #include <QTreeWidget>
31 #include <yui/YTree.h>
38 class YQTree :
public QFrame,
public YTree
47 YQTree( YWidget * parent,
const std::string & label,
bool multiSelection,
bool recursiveSelection );
59 virtual void setLabel(
const std::string & label );
76 virtual void selectItem( YItem * item,
bool selected =
true );
119 virtual void setSize(
int newWidth,
int newHeight );
154 void slotItemClicked( QTreeWidgetItem * item,
int column );
194 void selectItem(QTreeWidgetItem * item,
bool selected,
bool recursive);
215 QTreeWidget * _qt_treeWidget;
228 QTreeWidget * parent,
237 YTreeItem * origItem,
250 virtual void setOpen(
bool open );
259 YTreeItem * yTreeItem,
270 QString
key(
int column,
bool ascending )
const;
278 YTreeItem * _origItem;
284 #endif // ifndef YQTree_h
void slotItemChanged(QTreeWidgetItem *item)
Propagate a tree item change.
virtual int preferredWidth()
Preferred width of the widget.
virtual void setOpen(bool open)
Open this item.
virtual void rebuildTree()
Rebuild the displayed tree from the internally stored YTreeItems.
virtual YTreeItem * currentItem()
Return the the item that currently has the keyboard focus or 0 if no item currently has the keyboard ...
YQTree(YWidget *parent, const std::string &label, bool multiSelection, bool recursiveSelection)
Constructor.
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 void setLabel(const std::string &label)
Change the label text.
void slotItemCollapsed(QTreeWidgetItem *item)
Propagate an "item collapsed" event to the underlying YTreeItem.
virtual void deselectAllItems()
Deselect all items.
virtual ~YQTree()
Destructor.
virtual void setSize(int newWidth, int newHeight)
Set the new size of the widget.
virtual void selectItem(YItem *item, bool selected=true)
Select or deselect an 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.
void slotSelectionChanged()
Propagate a tree item selection.
virtual void deleteAllItems()
Delete all items.
virtual void setEnabled(bool enabled)
Set enabled/disbled state.
QString key(int column, bool ascending) const
Sort key of this item.
void slotActivated(QTreeWidgetItem *item)
Propagate a double click or pressing the space key on a tree 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 ...
virtual int preferredHeight()
Preferred height of the widget.
virtual bool setKeyboardFocus()
Accept the keyboard focus.
void slotContextMenu(const QPoint &pos)
Propagate a context menu selection.