Choreonoid  1.8
BodySelectionManager.h
Go to the documentation of this file.
1 #ifndef CNOID_BODY_PLUGIN_BODY_SELECTION_MANAGER_H
2 #define CNOID_BODY_PLUGIN_BODY_SELECTION_MANAGER_H
3 
4 #include <cnoid/Signal>
5 #include <cnoid/ItemList>
6 #include "exportdecl.h"
7 
8 namespace cnoid {
9 
10 class BodyItem;
11 class Link;
12 class ItemTreeWidget;
13 
14 class CNOID_EXPORT BodySelectionManager
15 {
16 public:
17  static void initializeClass(ExtensionManager* ext);
18  static BodySelectionManager* instance();
19 
21 
22  SignalProxy<void(BodyItem* bodyItem, Link* link)> sigCurrentSpecified();
23  SignalProxy<void(BodyItem* bodyItem)> sigCurrentBodyItemSpecified();
24 
25  SignalProxy<void(BodyItem* bodyItem, Link* link)> sigCurrentChanged();
26  SignalProxy<void(BodyItem* bodyItem)> sigCurrentBodyItemChanged();
27 
28  BodyItem* currentBodyItem();
29  Link* currentLink();
30  void setCurrent(BodyItem* bodyItem, Link* link = nullptr, bool doSelectBodyItem = false);
31  void setItemTreeWidgetToSelectCurrentBodyItem(ItemTreeWidget* itemTreeWidget);
32 
33  SignalProxy<void(const ItemList<BodyItem>& selected)> sigSelectedBodyItemsChanged();
34  const ItemList<BodyItem>& selectedBodyItems() const;
35 
36  SignalProxy<void(const std::vector<bool>& selection)> sigLinkSelectionChanged(BodyItem* bodyItem);
37  const std::vector<bool>& linkSelection(BodyItem* bodyItem);
38 
39  void setLinkSelection(BodyItem* bodyItem, const std::vector<bool>& linkSelection);
40 
41 private:
43 
44  class Impl;
45  Impl* impl;
46 };
47 
48 }
49 
50 #endif
cnoid::ExtensionManager
Definition: ExtensionManager.h:23
cnoid::BodyItem
Definition: BodyItem.h:28
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::ItemList
Definition: Item.h:20
cnoid::ItemTreeWidget
Definition: ItemTreeWidget.h:19
cnoid::SignalProxy
Definition: Signal.h:470
cnoid::BodySelectionManager
Definition: BodySelectionManager.h:14