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
Options Dialog interface.
Interface class for receiving mouse events.
QString description()
Return a description of what the plugin is doing.
QString name()
Return a name for the plugin.
Interface class from which all plugins have to be created.
Allow access to picking functions.
Interface for all plugins which want to Load or Save files and create Objects.
bool initializeOptionsWidget(QWidget *&_widget)
Initialize the Options Widget.