50 #ifndef RULERPLUGIN_HH
51 #define RULERPLUGIN_HH
56 #include <ACG/Utils/SmartPointer.hh>
66 #include "RulerOptions.hh"
78 #if QT_VERSION >= 0x050000
79 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-Ruler")
83 void addToolbar(QToolBar *_toolbar);
85 void addPickMode(
const std::string &_mode);
89 void setPickModeMouseTracking (
const std::string &_mode,
bool _mouseTracking);
93 void slotPickModeChanged(
const std::string& _mode);
95 void slotMouseEvent(QMouseEvent* _event);
97 void slotViewChanged();
106 QString
name(){
return QString(
"RulerPlugin");}
107 QString
description(){
return QString(
"Measure the distance between two points.");}
113 void enableDragMode(
const int _point);
115 void disableDragMode();
117 bool dragModeActive(){
return lineDrag_ >= 0;}
119 QAction *buttonAction_;
121 const std::string pickModeName_;
129 ptr::shared_ptr<Ruler> currentRuler_;
133 const QString textSizeSettingName_;
136 void initializePlugin();
138 void pluginsInitialized();
140 void slotChangePickMode();
142 void slotAllCleared();
144 void objectDeleted(
int _id);
150 QString version(){
return QString(
"1.0"); }
154 #endif //RULERPLUGIN_HH
Interface class from which all plugins have to be created.
QString description()
Return a description of what the plugin is doing.
Options Dialog interface.
Add a toolbox to OpenFlipper.
Interface for all plugins which want to Load or Save files and create Objects.
QString name()
Return a name for the plugin.
bool initializeOptionsWidget(QWidget *&_widget)
Initialize the Options Widget.
Allow access to picking functions.
Interface class for receiving mouse events.