Developer Documentation

Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | List of all members
BSplineCurveSelectionPlugin Class Reference
Inheritance diagram for BSplineCurveSelectionPlugin:

## Public Slots
void | loadSelection (int _objId, const QString &_filename)
QString | version ()

## Signals
void | updateView ()
void | updatedObject (int, const UpdateType &)
void | nodeVisibilityChanged (int _identifier)
void | setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
void | createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
void | log (Logtype _type, QString _message)
void | log (QString _message)
void | scriptInfo (QString _functionName)
void | addSelectionEnvironment (QString _modeName, QString _description, QString _icon, QString &_handleName)
void | registerType (QString _handleName, DataType _type)
void | addPrimitiveType (QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType &_typeHandle)
void | addSelectionOperations (QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type=0u)
void | showToggleSelectionMode (QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
void | showVolumeLassoSelectionMode (QString _handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
void | getActiveDataTypes (SelectionInterface::TypeList &_types)
void | getActivePrimitiveType (SelectionInterface::PrimitiveType &_type)
void | targetObjectsOnly (bool &_targetsOnly)
void | registerKeyShortcut (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
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 KeyInterface
virtual void | registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false)
| Register a key-combination for your plugin. More...
Signals inherited from BackupInterface
virtual void | createBackup (int _objectid, QString _name, UpdateType _type=UPDATE_ALL)
| Tell Backup Plugin to create a backup. More...
virtual void | aboutToRestore (int _objectid)
| Backup Plugin tells other Plugins that a restore will happen. More...
virtual void | generateBackup (int _id, QString _name, UpdateType _type)
| This signal is emitted by a BackupPlugin and tells a TypePlugin to generate a backup. More...
Signals inherited from LoggingInterface
virtual void | log (Logtype _type, QString _message)=0
virtual void | log (QString _message)=0
Signals inherited from ScriptInterface
virtual void | scriptInfo (QString _functionWithParameters)
| Emit this signal if a scriptable function is executed. More...
virtual void | getScriptingEngine (QScriptEngine *&_engine)
virtual void | executeScript (QString _script)
virtual void | getAvailableFunctions (QStringList &_functions)
Signals inherited from SelectionInterface
virtual void | addSelectionEnvironment (QString _modeName, QString _description, QString _icon, QString &_handleName)
| Add a selection environment in order to provide selection functions for specific data type(s) More...
virtual void | showToggleSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
| Show toggle selection mode in a specified selection environment. More...
virtual void | addSelectionOperations (QString _handleName, QStringList _operationsList, QString _category, PrimitiveType _type=0u)
| Add non-interactive selection operations for a specific primitive type. More...
virtual void | selectionOperation (QString _operation)
| Emitted by selection base plugin when a non-interactive selection operation is requested. More...
virtual void | registerKeyShortcut (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
| Register key shortcut. More...

## Public Member Functions
| BSplineCurveSelectionPlugin ()
| Default constructor.
| ~BSplineCurveSelectionPlugin ()
| Default destructor.
QString | name ()
| Return a name for the plugin. More...
QString | description ()
| Return a description of what the plugin is doing. More...
Scriptable slots
void | selectAllControlPoints (int _objectId)
| Select all control points of a curve.
void | deselectAllControlPoints (int _objectId)
| Deselect all control points of a curve.
void | invertControlPointSelection (int _objectId)
| Invert control point selection.
void | deleteSelectedControlPoints (int _objectId)
| Delete selected control points.
void | selectControlPoints (int _objectId, const IdList &_ids, bool _deselect=false)
| Select specific control points of a curve.
IdList | getControlPointSelection (int _objectId)
| Get current control point selection.
void | selectAllKnots (int _objectId)
| Select all knots of a curve.
void | deselectAllKnots (int _objectId)
| Deselect all knots of a curve.
void | invertKnotSelection (int _objectId)
| Invert knot selection.
void | deleteSelectedKnots (int _objectId)
| Delete selected knots.
void | selectKnots (int _objectId, const IdList &_ids, bool _deselect=false)
| Select specific knots of a curve.
IdList | getKnotSelection (int _objectId)
| Get current knot selection.

## Private Slots
void | loadIniFile (INIFile &_ini, int _id)
void | saveIniFile (INIFile &_ini, int _id)
void | initializePlugin ()
void | pluginsInitialized ()
void | noguiSupported ()
Private Slots inherited from BaseInterface
virtual void | exit ()
virtual QString | version ()
| Return a version string for your plugin. More...
Private Slots inherited from KeyInterface
virtual void | slotKeyEvent (QKeyEvent *_event)
| Key Event from Main App. More...
Private Slots inherited from SelectionInterface
virtual void | loadSelection (int _objId, const QString &_filename)
| Scripting slot for loading selections. More...

## Private Member Functions
void | slotSelectionOperation (QString _operation)
| A specific operation is requested. More...
void | slotToggleSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
| Called whenever the user performs a toggle selection. More...
void | slotVolumeLassoSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
| Called whenever the user performs a volume lasso selection. More...
void | slotLoadSelection (const INIFile &_file)
| Load selection for specific objects in the scene. More...
void | slotSaveSelection (INIFile &_file)
| Save selection for all objects in the scene. More...
void | slotKeyShortcutEvent (int _key, Qt::KeyboardModifiers _modifiers)
| One of the previously registered keys has been pressed. More...
Private Member Functions inherited from BaseInterface
virtual void | noguiSupported ()
virtual | ~BaseInterface ()
| Destructor.
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 KeyInterface
virtual void | slotKeyReleaseEvent (QKeyEvent *_event)
| Key Release Event from Main App. More...
virtual | ~KeyInterface ()
| Destructor.
Private Member Functions inherited from INIInterface
virtual | ~INIInterface ()
| Destructor.
Private Member Functions inherited from BackupInterface
virtual void | createBackup (IdList _objectids, QString _name, std::vector< UpdateType > _types)
| Tell Backup Plugin to create a group backup. More...
virtual void | undo (int _objectid)
| Tell Backup Plugin to undo the last action of an object. More...
virtual void | redo (int _objectid)
| Tell Backup Plugin to redo the last action on an object. More...
virtual void | undo ()
| Tell Backup Plugin to undo the last action. More...
virtual void | redo ()
| Tell Backup Plugin to redo the last action. More...
virtual | ~BackupInterface ()
| Destructor.
virtual void | restored (int _objectid)
| Backup Plugin tells other Plugins that a restore has happened. More...
Private Member Functions inherited from LoggingInterface
virtual | ~LoggingInterface ()
| Destructor.
Private Member Functions inherited from ScriptInterface
virtual | ~ScriptInterface ()
| Destructor.
virtual void | executeFileScript (QString _filename)
virtual void | getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
Private Member Functions inherited from SelectionInterface
virtual | ~SelectionInterface ()
| Destructor.
virtual void | registerType (QString _handleName, DataType _type)
| Register data type for a selection environment. More...
virtual void | addPrimitiveType (QString _handleName, QString _name, QString _icon, PrimitiveType &_typeHandle)
| Provide selection for primitives other than the standard ones. More...
virtual void | showLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
| Show lasso selection mode in a specified selection environment. More...
virtual void | showVolumeLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
| Show volume lasso selection mode in a specified selection environment. More...
virtual void | showSurfaceLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
| Show surface lasso selection mode in a specified selection environment. More...
virtual void | showSphereSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
| Show sphere selection mode in a specified selection environment. More...
virtual void | showClosestBoundarySelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
| Show closest boundary selection mode in a specified selection environment. More...
virtual void | showFloodFillSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
| Show flood fill selection mode in a specified selection environment. More...
virtual void | showComponentsSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
| Show connected components selection mode in a specified selection environment. More...
virtual void | addCustomSelectionMode (QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier)
| Add a custom interactive selection mode. More...
virtual void | addCustomSelectionMode (QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier, DataType _objectTypeRestriction)
| Add a custom interactive selection mode. More...
virtual void | getActiveDataTypes (TypeList &_types)
| Get the data types that the currently active selection environment supports. More...
virtual void | getActivePrimitiveType (PrimitiveType &_type)
| Get the primitive type that is selected. More...
virtual void | targetObjectsOnly (bool &_targetsOnly)
| Indicates whether selection should be performed on target objects only. More...
virtual void | addSelectionParameters (QString _handleName, QWidget *_widget, QString _category, PrimitiveType _type=0u)
| Add interactive selection parameters for a specific primitive type. More...
virtual void | toggleSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
| Emitted by selection base plugin whenever the user performs a toggle selection. More...
virtual void | lassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
| Emitted by selection base plugin whenever the user performs a lasso selection. More...
virtual void | volumeLassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
| Emitted by selection base plugin whenever the user performs a volume lasso selection. More...
virtual void | surfaceLassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
| Emitted by selection base plugin whenever the user performs a surface lasso selection. More...
virtual void | sphereSelection (QMouseEvent *_event, double _radius, PrimitiveType _currentType, bool _deselect)
| Emitted by selection base plugin whenever the user performs a sphere selection. More...
virtual void | closestBoundarySelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
| Emitted by selection base plugin whenever the user performs a closest boundary selection. More...
virtual void | floodFillSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
| Emitted by selection base plugin whenever the user performs a flood fill selection. More...
virtual void | componentsSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
| Emitted by selection base plugin whenever the user performs a connected components selection. More...
virtual void | customSelection (QMouseEvent *_event, PrimitiveType _currentType, QString _customIdentifier, bool _deselect)
| Emitted by selection base plugin whenever the user performs a custom selection. More...
virtual void | loadSelection (const INIFile &_file)
| Load selections from ini-file. More...
virtual void | saveSelection (INIFile &_file)
| Save selections into ini-file. More...
virtual void | keyShortcutEvent (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
| Key shortcut event happened. More...

## Private Attributes
Member variables
QString | environmentHandle_
| Handle to selection environment.
unsigned int | controlPointType_
| Primitive type handles:
unsigned int | knotType_
| Handle to selection environment.
unsigned int | allSupportedTypes_
| Handle to selection environment.
QVector< QPoint > | volumeLassoPoints_
| Keep volume lasso points.

## Private methods
enum | SelectionViewMode { CP, K }
| Change selection view mode for every B-spline curve in the scene.
void | setSelectionViewMode (const SelectionViewMode _mode)
| Change selection view mode for every B-spline curve in the scene.
void | updateSlotDescriptions ()
| Set slot descriptions for scripting functions.

## Additional Inherited Members
Private Types inherited from SelectionInterface
typedef std::vector< DataType > | TypeList
typedef unsigned int | PrimitiveType

## Detailed Description

Definition at line 71 of file BSplineCurveSelectionPlugin.hh.

## Member Function Documentation

## ◆ description()

QString BSplineCurveSelectionPlugin::description | ( |  | ) |
| inline virtual

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 159 of file BSplineCurveSelectionPlugin.hh.

## ◆ name()

QString BSplineCurveSelectionPlugin::name | ( |  | ) |
| inline virtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 155 of file BSplineCurveSelectionPlugin.hh.

## ◆ slotKeyShortcutEvent()

void BSplineCurveSelectionPlugin::slotKeyShortcutEvent | ( | int | _key,
|  | Qt::KeyboardModifiers | _modifiers
| ) |  |
| private virtual

One of the previously registered keys has been pressed.

This slot is called whenever the user has pressed one of the registered keys. Note that this is actually handled by the selection base plugin since the different plugins might want to register the same key multiple times.

Parameters

  _key | The pressed key
  _modifiers | Indicates whether mod-keys have been pressed synchronously

Reimplemented from SelectionInterface.

Definition at line 569 of file BSplineCurveSelectionPlugin.cc.

## ◆ slotLoadSelection()

void BSplineCurveSelectionPlugin::slotLoadSelection | ( | const INIFile & | _file | ) |
| private virtual

Load selection for specific objects in the scene.

OpenFlipper allows for saving of selections in an INI file (implemented by the different selection plugins by overriding function slotSaveSelection()). So this slot is called each time such INI file is about to be loaded.

Parameters

  _file | The file from which one can read the selection data

Reimplemented from SelectionInterface.

Definition at line 517 of file BSplineCurveSelectionPlugin.cc.

## ◆ slotSaveSelection()

void BSplineCurveSelectionPlugin::slotSaveSelection | ( | INIFile & | _file | ) |
| private virtual

Save selection for all objects in the scene.

Override this slot in order to save selections for a specific data type. These selections are then stored within an INI file and can be loaded via slotLoadSelection().

Parameters

  _file | The file into which one can store selection data

Reimplemented from SelectionInterface.

Definition at line 550 of file BSplineCurveSelectionPlugin.cc.

## ◆ slotSelectionOperation()

void BSplineCurveSelectionPlugin::slotSelectionOperation | ( | QString | _operation | ) |
| private virtual

A specific operation is requested.

This slot is called each time the user has pressed one of the operations buttons (for the various primitive types) offered in the tool box.

Parameters

  _operation | The identifier of the operation just as registered via addSelectionOperations

Reimplemented from SelectionInterface.

Definition at line 184 of file BSplineCurveSelectionPlugin.cc.

## ◆ slotToggleSelection()

void BSplineCurveSelectionPlugin::slotToggleSelection | ( | QMouseEvent * | _event,
|  | SelectionInterface::PrimitiveType | _currentType,
|  | bool | _deselect
| ) |  |
| private virtual

Called whenever the user performs a toggle selection.

This has to be implemented by each type selection plugin if this interactive selection mode should be provided.

Parameters

  _event | The mouse event that occurred
  _currentType | The currently active primitive type
  _deselect | True if entities should be deselected

Reimplemented from SelectionInterface.

Definition at line 297 of file BSplineCurveSelectionPlugin.cc.

## ◆ slotVolumeLassoSelection()

void BSplineCurveSelectionPlugin::slotVolumeLassoSelection | ( | QMouseEvent * | _event,
|  | SelectionInterface::PrimitiveType | _currentType,
|  | bool | _deselect
| ) |  |
| private virtual

Called whenever the user performs a volume lasso selection.

This has to be implemented by each type selection plugin if this interactive selection mode should be provided. The metaphor behind it is that the user draws a polygonal line and all primitives which are insinde the volume spanned by the eye position and the polygon get selected.

Parameters

  _event | The mouse event that currently is performed
  _currentType | The currently active primitive type
  _deselect | True if entities should be deselected

Reimplemented from SelectionInterface.

Definition at line 377 of file BSplineCurveSelectionPlugin.cc.

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

- PluginCollection-Selection/Plugin-SelectionBSplineCurve/BSplineCurveSelectionPlugin.hh
- PluginCollection-Selection/Plugin-SelectionBSplineCurve/BSplineCurveSelectionFunctions.cc
- PluginCollection-Selection/Plugin-SelectionBSplineCurve/BSplineCurveSelectionPlugin.cc