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;
290 #endif // ifndef YQTree_h virtual void activate()
Activate the item selected in the tree.
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.
QString key(int column, bool ascending) const
Sort key of this item.
void slotSelectionChanged()
Propagate a tree item selection.
virtual void deleteAllItems()
Delete all items.
virtual void setEnabled(bool enabled)
Set enabled/disbled state.
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.