5 #ifndef CNOID_BASE_ROOT_ITEM_H
6 #define CNOID_BASE_ROOT_ITEM_H
9 #include "exportdecl.h"
22 [[deprecated(
"Use RootItem::instance()")]]
37 SignalProxy<void(
Item* item,
const std::string& oldName)> sigItemNameChanged();
39 [[deprecated(
"Use Item::sigSubTreeChanged()")]]
45 return getSelectedItems();
49 return getSelectedItems();
52 void selectItem(
Item* item);
57 void beginItemSelectionChanges();
58 void endItemSelectionChanges();
61 int addCheckEntry(
const std::string& description);
62 int numCheckEntries()
const;
63 const std::string& checkEntryDescription(
int checkId)
const;
64 void releaseCheckEntry(
int checkId);
66 SignalProxy<void(
int checkId)> sigCheckEntryAdded();
67 SignalProxy<void(
int checkId)> sigCheckEntryReleased();
69 bool storeCheckStates(
int checkId,
Archive& archive,
const std::string& key);
70 bool restoreCheckStates(
int checkId,
const Archive& archive,
const std::string& key);
74 return getCheckedItems(checkId);
78 return getSelectedItems();
81 SignalProxy<void(
Item* item,
bool on)> sigCheckToggled(
int checkId = PrimaryCheck);
84 virtual Item* doDuplicate()
const override;
85 virtual bool store(
Archive& archive)
override;
86 virtual bool restore(
const Archive& archive)
override;
94 void notifyEventOnSubTreeAdded(
Item* item, std::vector<Item*>& orgSubTreeItems);
95 void notifyEventOnSubTreeMoved(
Item* item, std::vector<Item*>& orgSubTreeItems);
96 void notifyEventOnSubTreeRemoving(
Item* item,
bool isMoving);
97 void notifyEventOnSubTreeRemoved(
Item* item,
bool isMoving);
98 void emitSigItemAssinged(
Item* assigned,
Item* srcItem);
99 void emitSigItemNameChanged(
Item* item,
const std::string& oldName);
100 void emitSigSelectionChanged(
Item* item,
bool on,
bool isCurrent);
101 void requestToEmitSigSelectedItemsChanged();
102 void emitSigCheckToggled(
Item* item,
int checkId,
bool on);
105 const ItemList<>& getCheckedItems(
int checkId);