Go to the documentation of this file. 1 #ifndef CNOID_BASE_ITEM_TREE_VIEW_H
2 #define CNOID_BASE_ITEM_TREE_VIEW_H
7 #include "exportdecl.h"
28 template<
class ItemType>
31 itemTreeWidget()->customizeContextMenu(func);
34 void setExpanded(
Item* item,
bool on =
true);
36 template <
class ItemType>
37 [[deprecated(
"Use RootItem::selectedItems")]]
41 [[deprecated(
"Use RootItem::selectedItems")]]
45 template <
class ItemType>
48 return selectedItems<ItemType>().toSingle(fromMultiItems);
50 template <
class ItemType>
51 [[deprecated(
"Use Item::selectedDescendantItems")]]
55 template <
class ItemType>
58 return selectedSubItems<ItemType>(topItem).toSingle(fromMultiItems);
60 [[deprecated(
"Use Item::isSelected")]]
64 [[deprecated(
"Use Item::setSelected")]]
69 [[deprecated(
"Use Item::setSubTreeItemsSelected for the root item")]]
73 [[deprecated(
"Use Item::setSubTreeItemsSelected for the root item")]]
80 template <
class ItemType>
81 [[deprecated(
"Use RootItem::checkedItems")]]
85 [[deprecated(
"Use Item::isChecked")]]
89 [[deprecated(
"Use Item::setChecked")]]
94 [[deprecated(
"Use RootItem::sigSelectedItemsChanged")]]
98 [[deprecated(
"Use RootItem::sigCheckToggled")]]
102 [[deprecated(
"Use Item::sigCheckToggled")]]
108 virtual bool storeState(
Archive& archive)
override;
109 virtual bool restoreState(
const Archive& archive)
override;
SignalProxy< void(bool on)> sigCheckToggled(int checkId=PrimaryCheck)
Definition: Item.cpp:1144
bool isItemSelected(const Item *item) const
Definition: ItemTreeView.h:61
ItemList< ItemType > checkedItems(int checkId=Item::PrimaryCheck) const
Definition: ItemTreeView.h:82
ItemList< ItemType > selectedItems()
Definition: RootItem.h:44
const ItemList & selectedItems() const
Definition: ItemTreeView.h:42
SignalProxy< void(const ItemList<> &)> sigSelectionChanged() const
Definition: ItemTreeView.h:95
ItemType * selectedSubItem(Item *topItem, bool fromMultiItems=false) const
Definition: ItemTreeView.h:57
Definition: ExtensionManager.h:23
bool selectItem(Item *item, bool on=true)
Definition: ItemTreeView.h:65
static RootItem * instance()
Definition: RootItem.cpp:134
void selectAllItems()
Definition: ItemTreeView.h:70
SignalProxy< void(Item *item, bool on)> sigCheckToggled(int checkId=PrimaryCheck)
Definition: RootItem.cpp:589
Definition: ItemTreeView.h:11
void setChecked(bool on)
Definition: Item.cpp:475
ItemType * selectedItem(bool fromMultiItems=false) const
Definition: ItemTreeView.h:47
void clearSelection()
Definition: ItemTreeView.h:74
CheckId
Definition: ItemTreeView.h:78
bool isSelected() const
Definition: Item.h:98
SignalProxy< void(Item *item, bool isChecked)> sigCheckToggled(int checkId=Item::PrimaryCheck) const
Definition: ItemTreeView.h:99
ItemList< ItemType > checkedItems(int checkId=PrimaryCheck)
Definition: RootItem.h:73
ItemList selectedDescendantItems(std::function< bool(Item *item)> pred=nullptr) const
Definition: Item.cpp:1267
void setSubTreeItemsSelected(bool on)
Definition: Item.cpp:430
Definition: AbstractSceneLoader.h:11
bool isChecked(int checkId=PrimaryCheck) const
Definition: Item.cpp:457
static ItemTreeView * mainInstance()
Definition: ItemTreeView.h:19
@ LogicalSumOfAllChecks
Definition: Item.h:106
ItemList< ItemType > selectedSubItems(const Item *topItem) const
Definition: ItemTreeView.h:52
SignalProxy< void(bool isChecked)> sigCheckToggled(Item *item, int checkId=Item::PrimaryCheck) const
Definition: ItemTreeView.h:103
void setSelected(bool on, bool isCurrent=false)
Definition: Item.cpp:409
bool isItemChecked(const Item *item, int checkId=Item::PrimaryCheck) const
Definition: ItemTreeView.h:86
SignalProxy< void(const ItemList<> &selectedItems)> sigSelectedItemsChanged()
Definition: RootItem.cpp:442
ItemList< ItemType > selectedItems() const
Definition: ItemTreeView.h:38
void customizeContextMenu(std::function< void(ItemType *item, MenuManager &menuManager, ItemFunctionDispatcher menuFunction)> func)
Definition: ItemTreeView.h:29
@ PrimaryCheck
Definition: Item.h:106
bool checkItem(Item *item, bool on=true, int checkId=Item::PrimaryCheck)
Definition: ItemTreeView.h:90
PolymorphicItemFunctionSet::Dispatcher ItemFunctionDispatcher
Definition: PolymorphicItemFunctionSet.h:16