Developer Documentation
RulerPlugin Class Reference
Inheritance diagram for RulerPlugin:
BaseInterface MouseInterface PickingInterface ToolbarInterface LoadSaveInterface OptionsInterface

Public Slots

void slotPickModeChanged (const std::string &_mode)
 
void slotMouseEvent (QMouseEvent *_event)
 
void slotViewChanged ()
 
QString version ()
 

Signals

void addToolbar (QToolBar *_toolbar)
 
void addPickMode (const std::string &_mode)
 
void updateView ()
 
void setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking)
 
- Signals inherited from BaseInterface
virtual void updateView ()
 Update current view in Main Application. More...
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot. More...
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer. More...
 
- Signals inherited from PickingInterface
virtual void addPickMode (const std::string &_mode)
 Add a new picking mode to the examiner. More...
 
- Signals inherited from ToolbarInterface
virtual void addToolbar (QToolBar *_toolbar)
 Adds a Toolbar to the main widget. More...
 
- Signals inherited from LoadSaveInterface
virtual void save (int _id, QString _filename)
 Save object to a file. More...
 
virtual void load (QString _filename, DataType _type, int &_id)
 Load object from file with a specific DataType. More...
 

Public Member Functions

bool initializeOptionsWidget (QWidget *&_widget)
 Initialize the Options Widget. More...
 
QString name ()
 Return a name for the plugin. More...
 
QString description ()
 Return a description of what the plugin is doing. More...
 

Private Slots

void initializePlugin ()
 
void pluginsInitialized ()
 
void slotChangePickMode ()
 
void slotAllCleared ()
 
void objectDeleted (int _id)
 
void applyOptions ()
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin. More...
 

Private Member Functions

void reset ()
 
void enableDragMode (const int _point)
 
void disableDragMode ()
 
bool dragModeActive ()
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor. More...
 
virtual void blockScenegraphUpdates (bool _block)
 Tell the core to prevent scenegraph updates. More...
 
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin. More...
 
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin. More...
 
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden. More...
 
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer. More...
 
- Private Member Functions inherited from MouseInterface
virtual ~MouseInterface ()
 Destructor. More...
 
- Private Member Functions inherited from PickingInterface
virtual void addHiddenPickMode (const std::string &_mode)
 Add a new picking mode to the examiner which will be invisible. More...
 
virtual void setPickModeCursor (const std::string &_mode, QCursor _cursor)
 Set the cursor of the given PickMode. More...
 
virtual void setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking)
 Set mouse tracking for the given PickMode. More...
 
virtual void setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar)
 Set the additional toolbar of the given PickMode. More...
 
virtual void removePickModeToolbar (const std::string &_mode)
 Removes the additional toolbar of the given PickMode. More...
 
virtual ~PickingInterface ()
 Destructor. More...
 
- Private Member Functions inherited from ToolbarInterface
virtual ~ToolbarInterface ()
 Destructor. More...
 
virtual void removeToolbar (QToolBar *_toolbar)
 Remove a Toolbar from the main widget. More...
 
virtual void getToolBar (QString _name, QToolBar *&_toolbar)
 Get a pointer to a Toolbar of the given name or 0 if it does not exist. More...
 
- Private Member Functions inherited from LoadSaveInterface
virtual ~LoadSaveInterface ()
 Destructor. More...
 
virtual void addEmptyObject (DataType _type, int &_id)
 
virtual void copyObject (int _oldId, int &_newId)
 
virtual void emptyObjectAdded (int _id)
 DEPRECATED HERE (Moved to Type Interface)! Emit this signal if an empty object has been created. More...
 
virtual void deleteObject (int _id)
 Delete an object
This signal can be called from any thread.
. More...
 
virtual void deleteAllObjects ()
 Delete all Objects. More...
 
virtual void getAllFileFilters (QStringList &_filters)
 Get all file filters that are registered. More...
 
- Private Member Functions inherited from OptionsInterface
virtual ~OptionsInterface ()
 Destructor. More...
 
virtual bool initializeOptionsWidget (QWidget *&_widget)=0
 Initialize the Options Widget. More...
 
virtual void applyOptions ()=0
 Apply changes to options. More...
 

Private Attributes

QAction * buttonAction_
 
const std::string pickModeName_
 
int lineDrag_
 
bool dblClickCheck_
 
ptr::shared_ptr< RulercurrentRuler_
 
RulerOptionsoptionsWidget_
 
const QString textSizeSettingName_
 

Detailed Description

Definition at line 62 of file RulerPlugin.hh.

Constructor & Destructor Documentation

◆ RulerPlugin()

RulerPlugin::RulerPlugin ( )

Definition at line 49 of file RulerPlugin.cc.

◆ ~RulerPlugin()

RulerPlugin::~RulerPlugin ( )

Definition at line 62 of file RulerPlugin.cc.

Member Function Documentation

◆ applyOptions

void RulerPlugin::applyOptions ( )
privateslot

Definition at line 272 of file RulerPlugin.cc.

◆ description()

QString RulerPlugin::description ( )
inlinevirtual

Return a description of what the plugin is doing.

This function has to return a basic description of the plugin

Implements BaseInterface.

Definition at line 99 of file RulerPlugin.hh.

◆ disableDragMode()

void RulerPlugin::disableDragMode ( )
private

Definition at line 220 of file RulerPlugin.cc.

◆ dragModeActive()

bool RulerPlugin::dragModeActive ( )
inlineprivate

Definition at line 109 of file RulerPlugin.hh.

◆ enableDragMode()

void RulerPlugin::enableDragMode ( const int  _point)
private

Definition at line 213 of file RulerPlugin.cc.

◆ initializeOptionsWidget()

bool RulerPlugin::initializeOptionsWidget ( QWidget *&  _widget)
virtual

Initialize the Options Widget.

Initialize the options widget (create a widget and return a pointer to it )

Example :
_widget = new QWidget();

In the widget you can add anything you want.

use the slot applyOptions() to save the values of options currently entered in your widget.

Parameters
_widgetPointer to the new Widget
Returns
Return true if a widget has been created

Implements OptionsInterface.

Definition at line 259 of file RulerPlugin.cc.

◆ initializePlugin

void RulerPlugin::initializePlugin ( )
privateslot

Definition at line 67 of file RulerPlugin.cc.

◆ name()

QString RulerPlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 98 of file RulerPlugin.hh.

◆ objectDeleted

void RulerPlugin::objectDeleted ( int  _id)
privateslot

Definition at line 246 of file RulerPlugin.cc.

◆ pluginsInitialized

void RulerPlugin::pluginsInitialized ( )
privateslot

Definition at line 86 of file RulerPlugin.cc.

◆ reset()

void RulerPlugin::reset ( void  )
private

Definition at line 207 of file RulerPlugin.cc.

◆ slotAllCleared

void RulerPlugin::slotAllCleared ( )
privateslot

Definition at line 241 of file RulerPlugin.cc.

◆ slotChangePickMode

void RulerPlugin::slotChangePickMode ( )
privateslot

Definition at line 227 of file RulerPlugin.cc.

◆ slotMouseEvent

void RulerPlugin::slotMouseEvent ( QMouseEvent *  _event)
slot

Definition at line 92 of file RulerPlugin.cc.

◆ slotPickModeChanged

void RulerPlugin::slotPickModeChanged ( const std::string &  _mode)
slot

Definition at line 235 of file RulerPlugin.cc.

◆ slotViewChanged

void RulerPlugin::slotViewChanged ( )
slot

Definition at line 280 of file RulerPlugin.cc.

◆ version

QString RulerPlugin::version ( )
inlineslot

Definition at line 142 of file RulerPlugin.hh.

Member Data Documentation

◆ buttonAction_

QAction* RulerPlugin::buttonAction_
private

Definition at line 111 of file RulerPlugin.hh.

◆ currentRuler_

ptr::shared_ptr<Ruler> RulerPlugin::currentRuler_
private

Definition at line 121 of file RulerPlugin.hh.

◆ dblClickCheck_

bool RulerPlugin::dblClickCheck_
private

Definition at line 119 of file RulerPlugin.hh.

◆ lineDrag_

int RulerPlugin::lineDrag_
private

Definition at line 116 of file RulerPlugin.hh.

◆ optionsWidget_

RulerOptions* RulerPlugin::optionsWidget_
private

Definition at line 123 of file RulerPlugin.hh.

◆ pickModeName_

const std::string RulerPlugin::pickModeName_
private

Definition at line 113 of file RulerPlugin.hh.

◆ textSizeSettingName_

const QString RulerPlugin::textSizeSettingName_
private

Definition at line 125 of file RulerPlugin.hh.


The documentation for this class was generated from the following files: