#include <tool.hh>
Inherited by Manipulator, MapTool, MeasureTool, and SelectionTool.
Public Member Functions | |
| virtual | ~Tool () |
| virtual void | Click (const MouseEvent &event) |
| virtual void | DoubleClick (const MouseEvent &event) |
| virtual void | MousePress (const MouseEvent &event) |
| virtual void | MouseMove (const MouseEvent &event) |
| virtual void | RenderGL () |
| virtual void | Activate () |
| virtual void | Deactivate () |
| virtual bool | CanOperateOn (gfx::NodePtrList nodes)=0 |
| ToolOptions * | GetToolOptions () const |
| const String & | GetName () const |
| virtual QIcon | GetIcon () const |
Protected Member Functions | |
| Tool (const String &name) | |
Parameters of the tool that are configurable should be implemented using the ToolOptions facility. This automatically takes care of remembering the used options over different sessions (in the future) and creates a widget to modify these options.
Tools only receive mouse move events when one of the mouse buttons is pressed.
CanOperateOn() determines if the tool can manipulate a certain gfx::GfxNodeP. This method is used to enabled/disable certain actions (in the toolbar, for example).
Definition at line 61 of file tool.hh.
| virtual ~Tool | ( | ) | [virtual] |
| virtual void Activate | ( | ) | [inline, virtual] |
| virtual bool CanOperateOn | ( | gfx::NodePtrList | nodes | ) | [pure virtual] |
whether the tool is capable of manipulating the given node
Implemented in Manipulator, MapTool, MeasureTool, and SelectionTool.
| virtual void Click | ( | const MouseEvent & | event | ) | [inline, virtual] |
| virtual void Deactivate | ( | ) | [inline, virtual] |
| virtual void DoubleClick | ( | const MouseEvent & | event | ) | [inline, virtual] |
| virtual QIcon GetIcon | ( | ) | const [virtual] |
Reimplemented in Manipulator, MapTool, MeasureTool, and SelectionTool.
| const String& GetName | ( | ) | const |
| ToolOptions* GetToolOptions | ( | ) | const |
| virtual void MouseMove | ( | const MouseEvent & | event | ) | [inline, virtual] |
| virtual void MousePress | ( | const MouseEvent & | event | ) | [inline, virtual] |
| virtual void RenderGL | ( | ) | [inline, virtual] |
1.5.8