Choreonoid  1.8
RectRegionMarker.h
Go to the documentation of this file.
1 
5 #ifndef CNOID_BASE_RECT_REGION_MARKER_H
6 #define CNOID_BASE_RECT_REGION_MARKER_H
7 
9 #include <cnoid/SceneDrawables>
10 #include <QCursor>
11 #include "exportdecl.h"
12 
13 namespace cnoid {
14 
15 class PolyhedralRegion;
16 class RectRegionMarkerImpl;
17 
18 class CNOID_EXPORT RectRegionMarker : public SgViewportOverlay, public SceneWidgetEventHandler
19 {
20 public:
23 
24  void setRect(int x0, int y0, int x1, int y1);
25 
26  void setEditModeCursor(QCursor cursor);
27 
28  void startEditing(SceneWidget* sceneWidget);
29  bool isEditing() const;
30  void finishEditing();
31 
32  const PolyhedralRegion& region() const;
33  SignalProxy<void(const PolyhedralRegion& region)> sigRegionFixed();
34 
35  virtual void calcViewVolume(double viewportWidth, double viewportHeight, ViewVolume& io_volume) override;
36  virtual void onSceneModeChanged(SceneWidgetEvent* event) override;
37  virtual bool onButtonPressEvent(SceneWidgetEvent* event) override;
38  virtual bool onButtonReleaseEvent(SceneWidgetEvent* event) override;
39  virtual bool onPointerMoveEvent(SceneWidgetEvent* event) override;
40  virtual bool onContextMenuRequest(SceneWidgetEvent* event, MenuManager* menuManager) override;
41 
42  SignalProxy<void(SceneWidgetEvent* event, MenuManager* menuManager)> sigContextMenuRequest();
43 
44 private:
45  RectRegionMarkerImpl* impl;
46 };
47 
49 
50 }
51 
52 #endif
cnoid::PolyhedralRegion
Definition: PolyhedralRegion.h:13
cnoid::RectRegionMarkerPtr
ref_ptr< RectRegionMarker > RectRegionMarkerPtr
Definition: RectRegionMarker.h:48
cnoid::MenuManager
Definition: MenuManager.h:14
cnoid::ref_ptr
Definition: Referenced.h:103
cnoid::SceneWidgetEventHandler
Definition: SceneWidgetEventHandler.h:15
cnoid::SceneWidgetEvent
Definition: SceneWidgetEvent.h:15
cnoid
Definition: AbstractSceneLoader.h:11
cnoid::SgViewportOverlay::ViewVolume
Definition: SceneDrawables.h:759
cnoid::SignalProxy
Definition: Signal.h:470
SceneWidgetEventHandler.h
cnoid::SgViewportOverlay
Definition: SceneDrawables.h:752
cnoid::SceneWidget
Definition: SceneWidget.h:25
cnoid::RectRegionMarker
Definition: RectRegionMarker.h:18