Choreonoid  1.8
LinkPositionWidget.h
Go to the documentation of this file.
1 #ifndef CNOID_BODY_PLUGIN_LINK_POSITION_WIDGET_H
2 #define CNOID_BODY_PLUGIN_LINK_POSITION_WIDGET_H
3 
4 #include <QWidget>
5 #include <functional>
6 #include <string>
7 #include <utility>
8 #include "exportdecl.h"
9 
10 namespace cnoid {
11 
12 class BodyItem;
13 class Link;
14 class LinkKinematicsKit;
15 class CoordinateFrame;
16 class MenuManager;
17 class Archive;
18 
19 class CNOID_EXPORT LinkPositionWidget : public QWidget
20 {
21 public:
22  LinkPositionWidget(QWidget* parent);
24 
25  void customizeCoordinateModeLabels(
26  const char* worldModeLabel, const char* modelModeLabel, const char* localModeLabel);
27 
28  typedef std::function<std::string(LinkKinematicsKit* kit, CoordinateFrame* frame, bool isDefaultFrame)>
30  void customizeBaseFrameLabels(const char* caption, FrameLabelFunction labelFunction);
31  void customizeOffsetFrameLabels(const char* caption, FrameLabelFunction labelFunction);
32 
33  enum TargetLinkType { AnyLink, RootOrIkLink, IkLink, NumTargetLinkTypes };
34  void setTargetLinkType(int type);
35  int targetLinkType() const;
36 
37  void setTargetBodyAndLink(BodyItem* bodyItem, Link* link);
38  BodyItem* targetBodyItem();
39  Link* targetLink();
40 
41  void setCustomIkEnabled(bool on);
42  bool isCustomIkEnabled() const;
43 
44  void setOptionMenuTo(MenuManager& menuManager);
45 
46  bool storeState(Archive& archive);
47  bool restoreState(const Archive& archive);
48 
49  class Impl;
50 
51 private:
52  Impl* impl;
53 };
54 
55 }
56 
57 #endif
cnoid::Archive
Definition: Archive.h:22
cnoid::MenuManager
Definition: MenuManager.h:14
cnoid::LinkPositionWidget::FrameLabelFunction
std::function< std::string(LinkKinematicsKit *kit, CoordinateFrame *frame, bool isDefaultFrame)> FrameLabelFunction
Definition: LinkPositionWidget.h:29
cnoid::CoordinateFrame
Definition: CoordinateFrame.h:16
cnoid::BodyItem
Definition: BodyItem.h:28
cnoid::LinkPositionWidget
Definition: LinkPositionWidget.h:19
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::LinkKinematicsKit
Definition: LinkKinematicsKit.h:23
cnoid::LinkPositionWidget::TargetLinkType
TargetLinkType
Definition: LinkPositionWidget.h:33