44 #ifndef RULERPLUGIN_HH 45 #define RULERPLUGIN_HH 50 #include <ACG/Utils/SmartPointer.hh> 60 #include "RulerOptions.hh" 72 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Ruler")
75 void addToolbar(QToolBar *_toolbar);
77 void addPickMode(
const std::string &_mode);
81 void setPickModeMouseTracking (
const std::string &_mode,
bool _mouseTracking);
85 void slotPickModeChanged(
const std::string& _mode);
87 void slotMouseEvent(QMouseEvent* _event);
89 void slotViewChanged();
98 QString
name(){
return QString(
"RulerPlugin");}
99 QString
description(){
return QString(
"Measure the distance between two points.");}
105 void enableDragMode(
const int _point);
107 void disableDragMode();
109 bool dragModeActive(){
return lineDrag_ >= 0;}
111 QAction *buttonAction_;
113 const std::string pickModeName_;
121 ptr::shared_ptr<Ruler> currentRuler_;
125 const QString textSizeSettingName_;
128 void initializePlugin();
130 void pluginsInitialized();
132 void slotChangePickMode();
134 void slotAllCleared();
136 void objectDeleted(
int _id);
142 QString version(){
return QString(
"1.0"); }
146 #endif //RULERPLUGIN_HH
Interface for all plugins which want to Load or Save files and create Objects.
Interface class for receiving mouse events.
QString description()
Return a description of what the plugin is doing.
Allow access to picking functions.
Interface class from which all plugins have to be created.
Add a toolbox to OpenFlipper.
bool initializeOptionsWidget(QWidget *&_widget)
Initialize the Options Widget.
Options Dialog interface.
QString name()
Return a name for the plugin.