Developer Documentation
Loading...
Searching...
No Matches
SelectionBasePlugin Class Reference
Inheritance diagram for SelectionBasePlugin:
SelectionInterface LoadSaveInterface ToolbarInterface ContextMenuInterface ScriptInterface LoggingInterface INIInterface ToolboxInterface PickingInterface KeyInterface MouseInterface BaseInterface

Classes

struct  SelectionEnvironment
 

Public Slots

QString version ()
 

Signals

void updateView ()
 
void log (Logtype _type, QString _message)
 
void log (QString _message)
 
void addToolbar (QToolBar *_toolbar)
 
void toggleSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 
void lassoSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 
void volumeLassoSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 
void surfaceLassoSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 
void sphereSelection (QMouseEvent *_event, double _radius, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 
void closestBoundarySelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 
void floodFillSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 
void componentsSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect)
 
void customSelection (QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, QString _customIdentifier, bool _deselect)
 
void selectionOperation (QString _operation)
 
void loadSelection (const INIFile &_file)
 
void saveSelection (INIFile &_file)
 
void keyShortcutEvent (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
 
void addPickMode (const std::string &_mode)
 
void setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking)
 
void setPickModeCursor (const std::string &_mode, QCursor _cursor)
 
void setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar)
 
void registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false)
 
void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 
- Signals inherited from BaseInterface
virtual void updateView ()
 Update current view in Main Application.
 
virtual void setSlotDescription (QString _slotName, QString _slotDescription, QStringList _parameters, QStringList _descriptions)
 Set a description for a public slot.
 
virtual void setRenderer (unsigned int _viewer, QString _rendererName)
 Set a renderer for the given viewer.
 
- Signals inherited from KeyInterface
virtual void registerKey (int _key, Qt::KeyboardModifiers _modifiers, QString _description, bool _multiUse=false)
 Register a key-combination for your plugin.
 
- Signals inherited from PickingInterface
virtual void addPickMode (const std::string &_mode)
 Add a new picking mode to the examiner.
 
- Signals inherited from ToolboxInterface
virtual void addToolbox (QString _name, QWidget *_widget)
 Add a toolbox widget to the gui with the given name.
 
- 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.
 
virtual void getScriptingEngine (QScriptEngine *&_engine)
 
virtual void executeFileScript (QString _filename)
 
virtual void getAvailableFunctions (QStringList &_functions)
 
- Signals inherited from ContextMenuInterface
virtual void addContextMenuItem (QAction *_action, ContextMenuType _type)
 Add an entry for a context Menu.
 
- Signals inherited from ToolbarInterface
virtual void addToolbar (QToolBar *_toolbar)
 Adds a Toolbar to the main widget.
 
- Signals inherited from LoadSaveInterface
virtual void save (int _id, QString _filename)
 Save object to a file.
 
virtual void load (QString _filename, DataType _type, int &_id)
 Load object from file with a specific DataType.
 
- 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)
 
virtual void showToggleSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
 Show toggle selection mode in a specified selection environment.
 
virtual void addSelectionOperations (QString _handleName, QStringList _operationsList, QString _category, PrimitiveType _type=0u)
 Add non-interactive selection operations for a specific primitive type.
 
virtual void selectionOperation (QString _operation)
 Emitted by selection base plugin when a non-interactive selection operation is requested.
 
virtual void registerKeyShortcut (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
 Register key shortcut.
 

Public Member Functions

 SelectionBasePlugin ()
 Default constructor.
 
QString name ()
 Return a name for the plugin.
 
QString description ()
 Return a description of what the plugin is doing.
 
void setSelectionMetaphor (const QString &_metaphor)
 Enables setting the selection metaphor via scripting The default selection metaphors are:
 
void setSelectionPrimitiveType (const QString &_primitive)
 Enables setting the selection primitive via scripting The default primitives for OpenMesh are:
 

Private Slots

void initializePlugin ()
 
void pluginsInitialized ()
 
void slotMouseWheelEvent (QWheelEvent *_event, const std::string &_mode)
 
void slotMouseEvent (QMouseEvent *_event)
 
void slotAddSelectionEnvironment (QString _modeName, const QString &_description, const QString &_icon, QString &_handleName)
 
void slotRegisterType (const QString &_handleName, DataType _type)
 
void slotAddPrimitiveType (QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType &_typeHandle)
 
void slotAddCustomSelectionMode (const QString &_handleName, const QString &_modeName, const QString &_description, const QString &_icon, SelectionInterface::PrimitiveType _associatedTypes, QString &_customIdentifier)
 
void slotAddCustomSelectionMode (const QString &_handleName, const QString &_modeName, const QString &_description, const QString &_icon, SelectionInterface::PrimitiveType _associatedTypes, QString &_customIdentifier, DataType _objectTypeRestriction)
 
void slotAddSelectionOperations (QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type=0u)
 
void slotAddSelectionParameters (QString _handleName, QWidget *_widget, QString _category, SelectionInterface::PrimitiveType _type=0u)
 
void slotShowToggleSelectionMode (const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void slotShowLassoSelectionMode (const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void slotShowVolumeLassoSelectionMode (const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void slotShowSurfaceLassoSelectionMode (const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void slotShowSphereSelectionMode (const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void slotShowClosestBoundarySelectionMode (const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void slotShowFloodFillSelectionMode (const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void slotShowComponentsSelectionMode (const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes)
 
void slotGetActiveDataTypes (SelectionInterface::TypeList &_types)
 
void slotGetActivePrimitiveType (SelectionInterface::PrimitiveType &_type)
 
void slotTargetObjectsOnly (bool &_targetsOnly)
 
void slotRegisterKeyShortcut (int _key, Qt::KeyboardModifiers _modifiers)
 
void addedEmptyObject (int _id)
 
void objectDeleted (int _id)
 
void slotPickModeChanged (const std::string &_pickmode)
 
void slotKeyEvent (QKeyEvent *_event)
 
void slotKeyReleaseEvent (QKeyEvent *_event)
 
void loadIniFileOptionsLast (INIFile &_ini)
 
void slotMouseToggleSelection (QMouseEvent *_event)
 
void slotMouseLassoSelection (QMouseEvent *_event)
 
void slotMouseVolumeLassoSelection (QMouseEvent *_event)
 
void slotMouseSurfaceLassoSelection (QMouseEvent *_event)
 
void slotMouseSphereSelection (QMouseEvent *_event)
 
void slotMouseBoundarySelection (QMouseEvent *_event)
 
void slotMouseFloodFillSelection (QMouseEvent *_event)
 
void slotMouseComponentsSelection (QMouseEvent *_event)
 
void slotMouseCustomSelection (QMouseEvent *_event)
 
void slotLoadSelectionButton ()
 
void slotSaveSelectionButton ()
 
void slotOperationRequested ()
 
void slotShowAndHideOperations ()
 
void slotShowAndHideParameters ()
 
void slotSelectionEnvironmentRequested (bool _checked)
 
void slotEnterSelectionMode (bool _checked)
 
void updateActivePrimitiveTypes (bool _checked)
 
- Private Slots inherited from BaseInterface
virtual void exit ()
 
virtual QString version ()
 Return a version string for your plugin.
 
- Private Slots inherited from KeyInterface
virtual void slotKeyEvent (QKeyEvent *_event)
 Key Event from Main App.
 
- Private Slots inherited from SelectionInterface
virtual void loadSelection (int _objId, const QString &_filename)
 Scripting slot for loading selections.
 

Private Member Functions

QString getUniqueIdentifierName (const QString &_name, int _num=0)
 Get a unique pickmode name.
 
QString getUniqueHandleName (const QString &_name, int _num=0)
 Get a unique handle name.
 
bool getSelectionEnvironment (SelectionEnvironment *&env, const QString &_handleName)
 Get a selectionEnvironment by a given name.
 
bool typeExists (DataType _type, int _excludeId=-1)
 Test if at least one object of type _type is in the scene graph.
 
void showSelectionMode (const QString &_mode, const QString &_icon, const QString &_desc, const QString &_handleName, bool _show, SelectionInterface::PrimitiveType _associatedTypes, QString &_customIdentifier, bool _custom=false, DataType _objectTypeRestriction=DATA_ALL)
 
void selectionModeShowSwitch (bool _show, SelectionEnvironment *&env, HandleAction *toggleSelectionAction_, SelectionInterface::PrimitiveType &_associatedTypes)
 helper function for showSelectionMode
 
bool findObjectType (BaseObjectData *&obj, bool &found, SelectionEnvironment *&env, int _id)
 helper function to find a baseObjectData and selection environment given a specific id
 
SelectionTypeFrameWidgetcreateNewTypeFrame (SelectionEnvironment &_env)
 Create new type frame for tabs widget.
 
void updatePickModeToolBar ()
 Update the pickmode toolbar.
 
void updateTabsOrder ()
 
- Private Member Functions inherited from BaseInterface
virtual void noguiSupported ()
 
virtual ~BaseInterface ()
 Destructor.
 
virtual void blockScenegraphUpdates (bool _block)
 Tell the core to prevent scenegraph updates.
 
virtual void updatedObject (int _objectId)
 An object has been changed or added by this plugin.
 
virtual void updatedObject (int _identifier, const UpdateType &_type)
 An object has been changed or added by this plugin.
 
virtual void nodeVisibilityChanged (int _identifier)
 A scenegraph node has been shown or hidden.
 
virtual void getCurrentRenderer (unsigned int _viewer, QString &_rendererName)
 Get the current renderer for the given viewer.
 
- Private Member Functions inherited from MouseInterface
virtual ~MouseInterface ()
 Destructor.
 
- Private Member Functions inherited from KeyInterface
virtual void slotKeyReleaseEvent (QKeyEvent *_event)
 Key Release Event from Main App.
 
virtual ~KeyInterface ()
 Destructor.
 
- 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.
 
virtual void setPickModeCursor (const std::string &_mode, QCursor _cursor)
 Set the cursor of the given PickMode.
 
virtual void setPickModeMouseTracking (const std::string &_mode, bool _mouseTracking)
 Set mouse tracking for the given PickMode.
 
virtual void setPickModeToolbar (const std::string &_mode, QToolBar *_toolbar)
 Set the additional toolbar of the given PickMode.
 
virtual void removePickModeToolbar (const std::string &_mode)
 Removes the additional toolbar of the given PickMode.
 
virtual ~PickingInterface ()
 Destructor.
 
- Private Member Functions inherited from ToolboxInterface
virtual ~ToolboxInterface ()
 Destructor.
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon)
 Add a toolbox widget to the gui with the given name and an icon.
 
virtual void addToolbox (QString _name, QWidget *_widget, QIcon *_icon, QWidget *_headerAreaWidget)
 Add a toolbox widget to the gui with the given name, icon and header area widget.
 
- Private Member Functions inherited from INIInterface
virtual ~INIInterface ()
 Destructor.
 
- Private Member Functions inherited from LoggingInterface
virtual ~LoggingInterface ()
 Destructor.
 
- Private Member Functions inherited from ScriptInterface
virtual ~ScriptInterface ()
 Destructor.
 
virtual void showScriptInEditor (QString _filename)
 
virtual void executeScript (QString _script)
 
virtual void getDescription (QString _function, QString &_description, QStringList &_parameters, QStringList &_descriptions)
 
- Private Member Functions inherited from ContextMenuInterface
virtual ~ContextMenuInterface ()
 Destructor.
 
virtual void addContextMenuItem (QAction *_action, DataType _objectType, ContextMenuType _type)
 Add an entry for a context Menu.
 
virtual void hideContextMenu ()
 hide the main context menu
 
- Private Member Functions inherited from ToolbarInterface
virtual ~ToolbarInterface ()
 Destructor.
 
virtual void removeToolbar (QToolBar *_toolbar)
 Remove a Toolbar from the main widget.
 
virtual void getToolBar (QString _name, QToolBar *&_toolbar)
 Get a pointer to a Toolbar of the given name or 0 if it does not exist.
 
- Private Member Functions inherited from LoadSaveInterface
virtual ~LoadSaveInterface ()
 Destructor.
 
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.
 
virtual void deleteObject (int _id)
 Delete an object
This signal can be called from any thread.
.
 
virtual void deleteAllObjects ()
 Delete all Objects.
 
virtual void getAllFileFilters (QStringList &_filters)
 Get all file filters that are registered.
 
- Private Member Functions inherited from SelectionInterface
virtual ~SelectionInterface ()
 Destructor.
 
virtual void registerType (QString _handleName, DataType _type)
 Register data type for a selection environment.
 
virtual void addPrimitiveType (QString _handleName, QString _name, QString _icon, PrimitiveType &_typeHandle)
 Provide selection for primitives other than the standard ones.
 
virtual void showLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
 Show lasso selection mode in a specified selection environment.
 
virtual void showVolumeLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
 Show volume lasso selection mode in a specified selection environment.
 
virtual void showSurfaceLassoSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
 Show surface lasso selection mode in a specified selection environment.
 
virtual void showSphereSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
 Show sphere selection mode in a specified selection environment.
 
virtual void showClosestBoundarySelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
 Show closest boundary selection mode in a specified selection environment.
 
virtual void showFloodFillSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
 Show flood fill selection mode in a specified selection environment.
 
virtual void showComponentsSelectionMode (QString _handleName, bool _show, PrimitiveType _associatedTypes)
 Show connected components selection mode in a specified selection environment.
 
virtual void addCustomSelectionMode (QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier)
 Add a custom interactive selection mode.
 
virtual void addCustomSelectionMode (QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier, DataType _objectTypeRestriction)
 Add a custom interactive selection mode.
 
virtual void getActiveDataTypes (TypeList &_types)
 Get the data types that the currently active selection environment supports.
 
virtual void getActivePrimitiveType (PrimitiveType &_type)
 Get the primitive type that is selected.
 
virtual void targetObjectsOnly (bool &_targetsOnly)
 Indicates whether selection should be performed on target objects only.
 
virtual void addSelectionParameters (QString _handleName, QWidget *_widget, QString _category, PrimitiveType _type=0u)
 Add interactive selection parameters for a specific primitive type.
 
virtual void toggleSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
 Emitted by selection base plugin whenever the user performs a toggle selection.
 
virtual void lassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
 Emitted by selection base plugin whenever the user performs a lasso selection.
 
virtual void volumeLassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
 Emitted by selection base plugin whenever the user performs a volume lasso selection.
 
virtual void surfaceLassoSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
 Emitted by selection base plugin whenever the user performs a surface lasso selection.
 
virtual void sphereSelection (QMouseEvent *_event, double _radius, PrimitiveType _currentType, bool _deselect)
 Emitted by selection base plugin whenever the user performs a sphere selection.
 
virtual void closestBoundarySelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
 Emitted by selection base plugin whenever the user performs a closest boundary selection.
 
virtual void floodFillSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
 Emitted by selection base plugin whenever the user performs a flood fill selection.
 
virtual void componentsSelection (QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
 Emitted by selection base plugin whenever the user performs a connected components selection.
 
virtual void customSelection (QMouseEvent *_event, PrimitiveType _currentType, QString _customIdentifier, bool _deselect)
 Emitted by selection base plugin whenever the user performs a custom selection.
 
virtual void loadSelection (const INIFile &_file)
 Load selections from ini-file.
 
virtual void saveSelection (INIFile &_file)
 Save selections into ini-file.
 
virtual void keyShortcutEvent (int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
 Key shortcut event happened.
 

Private Attributes

QMap< DataType, int > typeCounter_
 Caches the number of available elements of a certain data type for the typeExists function.
 
std::map< QString, SelectionEnvironmentselectionEnvironments_
 
std::map< PrimitiveType, QAction * > primitiveTypeButtons_
 
QToolBar * toolBar_
 
SelectionBaseToolboxWidgettool_
 
QActionGroup * primitivesBarGroup_
 
QToolBar * pickModeToolBar_
 
QActionGroup * selectionModesGroup_
 
HandleActiontoggleSelectionAction_
 
HandleActionlassoSelectionAction_
 
HandleActionvolumeLassoSelectionAction_
 
HandleActionsurfaceLassoSelectionAction_
 
HandleActionsphereSelectionAction_
 
HandleActionboundarySelectionAction_
 
HandleActionfloodFillSelectionAction_
 
HandleActioncomponentsSelectionAction_
 
std::set< std::pair< int, Qt::KeyboardModifiers > > registeredKeys_
 
QString currentPickMode_
 
QString lastPickMode_
 
QString currentSelectionMode_
 
SelectionInterface::PrimitiveType currentPrimitiveType_
 
unsigned int nextFreePrimitiveType_
 
bool deselection_
 
ACG::SceneGraph::MaterialNodesphere_mat_node_
 
ACG::SceneGraph::GlutPrimitiveNodesphere_node_
 
double sphere_radius_
 
ACG::SceneGraph::LineNodeline_node_
 
bool lassoSelection_
 
std::vector< ACG::Vec3dlinePoints_
 
QIcon * toolIcon_
 
DataType availableObjectTypes_
 

Additional Inherited Members

- Private Types inherited from SelectionInterface
typedef std::vector< DataTypeTypeList
 
typedef unsigned int PrimitiveType
 

Detailed Description

Definition at line 85 of file SelectionBasePlugin.hh.

Constructor & Destructor Documentation

◆ SelectionBasePlugin()

SelectionBasePlugin::SelectionBasePlugin ( )

Default constructor.

Definition at line 93 of file SelectionBasePlugin.cc.

◆ ~SelectionBasePlugin()

SelectionBasePlugin::~SelectionBasePlugin ( )

Definition at line 124 of file SelectionBasePlugin.cc.

Member Function Documentation

◆ addedEmptyObject

void SelectionBasePlugin::addedEmptyObject ( int  _id)
privateslot

Definition at line 1498 of file SelectionBasePlugin.cc.

◆ createNewTypeFrame()

SelectionTypeFrameWidget * SelectionBasePlugin::createNewTypeFrame ( SelectionEnvironment _env)
private

Create new type frame for tabs widget.

Definition at line 276 of file SelectionBasePlugin.cc.

◆ description()

QString SelectionBasePlugin::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 112 of file SelectionBasePlugin.hh.

◆ findObjectType()

bool SelectionBasePlugin::findObjectType ( BaseObjectData *&  obj,
bool &  found,
SelectionEnvironment *&  env,
int  _id 
)
private

helper function to find a baseObjectData and selection environment given a specific id

Definition at line 1815 of file SelectionBasePlugin.cc.

◆ getSelectionEnvironment()

bool SelectionBasePlugin::getSelectionEnvironment ( SelectionEnvironment *&  env,
const QString &  _handleName 
)
private

Get a selectionEnvironment by a given name.

Definition at line 1785 of file SelectionBasePlugin.cc.

◆ getUniqueHandleName()

QString SelectionBasePlugin::getUniqueHandleName ( const QString &  _name,
int  _num = 0 
)
private

Get a unique handle name.

Definition at line 1677 of file SelectionBasePlugin.cc.

◆ getUniqueIdentifierName()

QString SelectionBasePlugin::getUniqueIdentifierName ( const QString &  _name,
int  _num = 0 
)
private

Get a unique pickmode name.

Definition at line 1641 of file SelectionBasePlugin.cc.

◆ initializePlugin

void SelectionBasePlugin::initializePlugin ( )
privateslot

Definition at line 130 of file SelectionBasePlugin.cc.

◆ loadIniFileOptionsLast

void SelectionBasePlugin::loadIniFileOptionsLast ( INIFile _ini)
privateslot

Definition at line 400 of file SelectionBasePlugin.cc.

◆ name()

QString SelectionBasePlugin::name ( )
inlinevirtual

Return a name for the plugin.

This Function has to return the name of the plugin.

Implements BaseInterface.

Definition at line 111 of file SelectionBasePlugin.hh.

◆ objectDeleted

void SelectionBasePlugin::objectDeleted ( int  _id)
privateslot

Definition at line 1546 of file SelectionBasePlugin.cc.

◆ pluginsInitialized

void SelectionBasePlugin::pluginsInitialized ( )
privateslot

Definition at line 235 of file SelectionBasePlugin.cc.

◆ selectionModeShowSwitch()

void SelectionBasePlugin::selectionModeShowSwitch ( bool  _show,
SelectionEnvironment *&  env,
HandleAction toggleSelectionAction_,
SelectionInterface::PrimitiveType &  _associatedTypes 
)
private

helper function for showSelectionMode

Definition at line 1798 of file SelectionBasePlugin.cc.

◆ setSelectionMetaphor()

void SelectionBasePlugin::setSelectionMetaphor ( const QString &  _metaphor)

Enables setting the selection metaphor via scripting The default selection metaphors are:

  • "sb_toggle"
  • "sb_lasso"
  • "sb_volumelasso"
  • "sb_surfacelasso"
  • "sb_sphere"
  • "sb_closestboundary"
  • "sb_floodfill"
  • "sb_components"

Note that furhter custom methaphors can be defined and used

Definition at line 742 of file SelectionBasePlugin.cc.

◆ setSelectionPrimitiveType()

void SelectionBasePlugin::setSelectionPrimitiveType ( const QString &  _primitive)

Enables setting the selection primitive via scripting The default primitives for OpenMesh are:

  • "Select Vertices"
  • "Select Halfedges"
  • "Select Edges"
  • "Select Faces" The default primitives for OpenVolumeMesh are:
  • "Select Volume Mesh Vertices"
  • "Select Volume Mesh Edges"
  • "Select Volume Mesh Faces"
  • "Select Volume Mesh Cells"
  • "Column Selection"
  • "Sheet Selection"

Note that further custom primitive types can be defined and used

Definition at line 780 of file SelectionBasePlugin.cc.

◆ showSelectionMode()

void SelectionBasePlugin::showSelectionMode ( const QString &  _mode,
const QString &  _icon,
const QString &  _desc,
const QString &  _handleName,
bool  _show,
SelectionInterface::PrimitiveType  _associatedTypes,
QString &  _customIdentifier,
bool  _custom = false,
DataType  _objectTypeRestriction = DATA_ALL 
)
private

Show standard selection mode Use this method to show/hide standard selection actions (lasso, floodfill, sphere, etc.)

Definition at line 1060 of file SelectionBasePlugin.cc.

◆ slotAddCustomSelectionMode [1/2]

void SelectionBasePlugin::slotAddCustomSelectionMode ( const QString &  _handleName,
const QString &  _modeName,
const QString &  _description,
const QString &  _icon,
SelectionInterface::PrimitiveType  _associatedTypes,
QString &  _customIdentifier 
)
privateslot

Definition at line 1133 of file SelectionBasePlugin.cc.

◆ slotAddCustomSelectionMode [2/2]

void SelectionBasePlugin::slotAddCustomSelectionMode ( const QString &  _handleName,
const QString &  _modeName,
const QString &  _description,
const QString &  _icon,
SelectionInterface::PrimitiveType  _associatedTypes,
QString &  _customIdentifier,
DataType  _objectTypeRestriction 
)
privateslot

Definition at line 1142 of file SelectionBasePlugin.cc.

◆ slotAddPrimitiveType

void SelectionBasePlugin::slotAddPrimitiveType ( QString  _handleName,
QString  _name,
QString  _icon,
SelectionInterface::PrimitiveType &  _typeHandle 
)
privateslot

Definition at line 598 of file SelectionBasePlugin.cc.

◆ slotAddSelectionEnvironment

void SelectionBasePlugin::slotAddSelectionEnvironment ( QString  _modeName,
const QString &  _description,
const QString &  _icon,
QString &  _handleName 
)
privateslot

Definition at line 407 of file SelectionBasePlugin.cc.

◆ slotAddSelectionOperations

void SelectionBasePlugin::slotAddSelectionOperations ( QString  _handleName,
QStringList  _operationsList,
QString  _category,
SelectionInterface::PrimitiveType  _type = 0u 
)
privateslot

Definition at line 792 of file SelectionBasePlugin.cc.

◆ slotAddSelectionParameters

void SelectionBasePlugin::slotAddSelectionParameters ( QString  _handleName,
QWidget *  _widget,
QString  _category,
SelectionInterface::PrimitiveType  _type = 0u 
)
privateslot

Definition at line 838 of file SelectionBasePlugin.cc.

◆ slotEnterSelectionMode

void SelectionBasePlugin::slotEnterSelectionMode ( bool  _checked)
privateslot

Definition at line 941 of file SelectionBasePlugin.cc.

◆ slotGetActiveDataTypes

void SelectionBasePlugin::slotGetActiveDataTypes ( SelectionInterface::TypeList &  _types)
privateslot

Definition at line 1232 of file SelectionBasePlugin.cc.

◆ slotGetActivePrimitiveType

void SelectionBasePlugin::slotGetActivePrimitiveType ( SelectionInterface::PrimitiveType &  _type)
privateslot

Definition at line 1248 of file SelectionBasePlugin.cc.

◆ slotKeyEvent

void SelectionBasePlugin::slotKeyEvent ( QKeyEvent *  _event)
privateslot

Definition at line 352 of file SelectionBasePlugin.cc.

◆ slotKeyReleaseEvent

void SelectionBasePlugin::slotKeyReleaseEvent ( QKeyEvent *  _event)
privateslot

Definition at line 385 of file SelectionBasePlugin.cc.

◆ slotLoadSelectionButton

void SelectionBasePlugin::slotLoadSelectionButton ( )
privateslot

Definition at line 304 of file SelectionBasePlugin.cc.

◆ slotMouseBoundarySelection

void SelectionBasePlugin::slotMouseBoundarySelection ( QMouseEvent *  _event)
privateslot

Definition at line 1452 of file SelectionBasePlugin.cc.

◆ slotMouseComponentsSelection

void SelectionBasePlugin::slotMouseComponentsSelection ( QMouseEvent *  _event)
privateslot

Definition at line 1478 of file SelectionBasePlugin.cc.

◆ slotMouseCustomSelection

void SelectionBasePlugin::slotMouseCustomSelection ( QMouseEvent *  _event)
privateslot

Definition at line 1491 of file SelectionBasePlugin.cc.

◆ slotMouseEvent

void SelectionBasePlugin::slotMouseEvent ( QMouseEvent *  _event)
privateslot

Definition at line 569 of file SelectionBasePlugin.cc.

◆ slotMouseFloodFillSelection

void SelectionBasePlugin::slotMouseFloodFillSelection ( QMouseEvent *  _event)
privateslot

Definition at line 1465 of file SelectionBasePlugin.cc.

◆ slotMouseLassoSelection

void SelectionBasePlugin::slotMouseLassoSelection ( QMouseEvent *  _event)
privateslot

Definition at line 1268 of file SelectionBasePlugin.cc.

◆ slotMouseSphereSelection

void SelectionBasePlugin::slotMouseSphereSelection ( QMouseEvent *  _event)
privateslot

Definition at line 1410 of file SelectionBasePlugin.cc.

◆ slotMouseSurfaceLassoSelection

void SelectionBasePlugin::slotMouseSurfaceLassoSelection ( QMouseEvent *  _event)
privateslot

Definition at line 1403 of file SelectionBasePlugin.cc.

◆ slotMouseToggleSelection

void SelectionBasePlugin::slotMouseToggleSelection ( QMouseEvent *  _event)
privateslot

Definition at line 1255 of file SelectionBasePlugin.cc.

◆ slotMouseVolumeLassoSelection

void SelectionBasePlugin::slotMouseVolumeLassoSelection ( QMouseEvent *  _event)
privateslot

Definition at line 1335 of file SelectionBasePlugin.cc.

◆ slotMouseWheelEvent

void SelectionBasePlugin::slotMouseWheelEvent ( QWheelEvent *  _event,
const std::string &  _mode 
)
privateslot

Definition at line 550 of file SelectionBasePlugin.cc.

◆ slotOperationRequested

void SelectionBasePlugin::slotOperationRequested ( )
privateslot

Definition at line 874 of file SelectionBasePlugin.cc.

◆ slotPickModeChanged

void SelectionBasePlugin::slotPickModeChanged ( const std::string &  _pickmode)
privateslot

Definition at line 970 of file SelectionBasePlugin.cc.

◆ slotRegisterKeyShortcut

void SelectionBasePlugin::slotRegisterKeyShortcut ( int  _key,
Qt::KeyboardModifiers  _modifiers 
)
privateslot

Definition at line 1771 of file SelectionBasePlugin.cc.

◆ slotRegisterType

void SelectionBasePlugin::slotRegisterType ( const QString &  _handleName,
DataType  _type 
)
privateslot

Definition at line 458 of file SelectionBasePlugin.cc.

◆ slotSaveSelectionButton

void SelectionBasePlugin::slotSaveSelectionButton ( )
privateslot

Definition at line 328 of file SelectionBasePlugin.cc.

◆ slotSelectionEnvironmentRequested

void SelectionBasePlugin::slotSelectionEnvironmentRequested ( bool  _checked)
privateslot

Definition at line 929 of file SelectionBasePlugin.cc.

◆ slotShowAndHideOperations

void SelectionBasePlugin::slotShowAndHideOperations ( )
privateslot

Definition at line 887 of file SelectionBasePlugin.cc.

◆ slotShowAndHideParameters

void SelectionBasePlugin::slotShowAndHideParameters ( )
privateslot

Definition at line 908 of file SelectionBasePlugin.cc.

◆ slotShowClosestBoundarySelectionMode

void SelectionBasePlugin::slotShowClosestBoundarySelectionMode ( const QString &  _handleName,
bool  _show,
SelectionInterface::PrimitiveType  _associatedTypes 
)
privateslot

Definition at line 1202 of file SelectionBasePlugin.cc.

◆ slotShowComponentsSelectionMode

void SelectionBasePlugin::slotShowComponentsSelectionMode ( const QString &  _handleName,
bool  _show,
SelectionInterface::PrimitiveType  _associatedTypes 
)
privateslot

Definition at line 1222 of file SelectionBasePlugin.cc.

◆ slotShowFloodFillSelectionMode

void SelectionBasePlugin::slotShowFloodFillSelectionMode ( const QString &  _handleName,
bool  _show,
SelectionInterface::PrimitiveType  _associatedTypes 
)
privateslot

Definition at line 1212 of file SelectionBasePlugin.cc.

◆ slotShowLassoSelectionMode

void SelectionBasePlugin::slotShowLassoSelectionMode ( const QString &  _handleName,
bool  _show,
SelectionInterface::PrimitiveType  _associatedTypes 
)
privateslot

Definition at line 1162 of file SelectionBasePlugin.cc.

◆ slotShowSphereSelectionMode

void SelectionBasePlugin::slotShowSphereSelectionMode ( const QString &  _handleName,
bool  _show,
SelectionInterface::PrimitiveType  _associatedTypes 
)
privateslot

Definition at line 1192 of file SelectionBasePlugin.cc.

◆ slotShowSurfaceLassoSelectionMode

void SelectionBasePlugin::slotShowSurfaceLassoSelectionMode ( const QString &  _handleName,
bool  _show,
SelectionInterface::PrimitiveType  _associatedTypes 
)
privateslot

Definition at line 1182 of file SelectionBasePlugin.cc.

◆ slotShowToggleSelectionMode

void SelectionBasePlugin::slotShowToggleSelectionMode ( const QString &  _handleName,
bool  _show,
SelectionInterface::PrimitiveType  _associatedTypes 
)
privateslot

Definition at line 1152 of file SelectionBasePlugin.cc.

◆ slotShowVolumeLassoSelectionMode

void SelectionBasePlugin::slotShowVolumeLassoSelectionMode ( const QString &  _handleName,
bool  _show,
SelectionInterface::PrimitiveType  _associatedTypes 
)
privateslot

Definition at line 1172 of file SelectionBasePlugin.cc.

◆ slotTargetObjectsOnly

void SelectionBasePlugin::slotTargetObjectsOnly ( bool &  _targetsOnly)
privateslot

Definition at line 1630 of file SelectionBasePlugin.cc.

◆ typeExists()

bool SelectionBasePlugin::typeExists ( DataType  _type,
int  _excludeId = -1 
)
private

Test if at least one object of type _type is in the scene graph.

Definition at line 1707 of file SelectionBasePlugin.cc.

◆ updateActivePrimitiveTypes

void SelectionBasePlugin::updateActivePrimitiveTypes ( bool  _checked)
privateslot

Definition at line 662 of file SelectionBasePlugin.cc.

◆ updatePickModeToolBar()

void SelectionBasePlugin::updatePickModeToolBar ( )
private

Update the pickmode toolbar.

Definition at line 491 of file SelectionBasePlugin.cc.

◆ updateTabsOrder()

void SelectionBasePlugin::updateTabsOrder ( )
private

Definition at line 1608 of file SelectionBasePlugin.cc.

◆ version

QString SelectionBasePlugin::version ( )
inlineslot

Definition at line 236 of file SelectionBasePlugin.hh.

Member Data Documentation

◆ availableObjectTypes_

DataType SelectionBasePlugin::availableObjectTypes_
private

Definition at line 416 of file SelectionBasePlugin.hh.

◆ boundarySelectionAction_

HandleAction* SelectionBasePlugin::boundarySelectionAction_
private

Definition at line 367 of file SelectionBasePlugin.hh.

◆ componentsSelectionAction_

HandleAction* SelectionBasePlugin::componentsSelectionAction_
private

Definition at line 369 of file SelectionBasePlugin.hh.

◆ currentPickMode_

QString SelectionBasePlugin::currentPickMode_
private

Definition at line 376 of file SelectionBasePlugin.hh.

◆ currentPrimitiveType_

SelectionInterface::PrimitiveType SelectionBasePlugin::currentPrimitiveType_
private

Definition at line 385 of file SelectionBasePlugin.hh.

◆ currentSelectionMode_

QString SelectionBasePlugin::currentSelectionMode_
private

Definition at line 382 of file SelectionBasePlugin.hh.

◆ deselection_

bool SelectionBasePlugin::deselection_
private

Definition at line 391 of file SelectionBasePlugin.hh.

◆ floodFillSelectionAction_

HandleAction* SelectionBasePlugin::floodFillSelectionAction_
private

Definition at line 368 of file SelectionBasePlugin.hh.

◆ lassoSelection_

bool SelectionBasePlugin::lassoSelection_
private

Definition at line 408 of file SelectionBasePlugin.hh.

◆ lassoSelectionAction_

HandleAction* SelectionBasePlugin::lassoSelectionAction_
private

Definition at line 363 of file SelectionBasePlugin.hh.

◆ lastPickMode_

QString SelectionBasePlugin::lastPickMode_
private

Definition at line 379 of file SelectionBasePlugin.hh.

◆ line_node_

ACG::SceneGraph::LineNode* SelectionBasePlugin::line_node_
private

Definition at line 405 of file SelectionBasePlugin.hh.

◆ linePoints_

std::vector<ACG::Vec3d> SelectionBasePlugin::linePoints_
private

Definition at line 411 of file SelectionBasePlugin.hh.

◆ nextFreePrimitiveType_

unsigned int SelectionBasePlugin::nextFreePrimitiveType_
private

Definition at line 388 of file SelectionBasePlugin.hh.

◆ pickModeToolBar_

QToolBar* SelectionBasePlugin::pickModeToolBar_
private

Definition at line 357 of file SelectionBasePlugin.hh.

◆ primitivesBarGroup_

QActionGroup* SelectionBasePlugin::primitivesBarGroup_
private

Definition at line 356 of file SelectionBasePlugin.hh.

◆ primitiveTypeButtons_

std::map<PrimitiveType,QAction*> SelectionBasePlugin::primitiveTypeButtons_
private

Definition at line 347 of file SelectionBasePlugin.hh.

◆ registeredKeys_

std::set<std::pair<int,Qt::KeyboardModifiers> > SelectionBasePlugin::registeredKeys_
private

Definition at line 371 of file SelectionBasePlugin.hh.

◆ selectionEnvironments_

std::map<QString,SelectionEnvironment> SelectionBasePlugin::selectionEnvironments_
private

Definition at line 342 of file SelectionBasePlugin.hh.

◆ selectionModesGroup_

QActionGroup* SelectionBasePlugin::selectionModesGroup_
private

Definition at line 359 of file SelectionBasePlugin.hh.

◆ sphere_mat_node_

ACG::SceneGraph::MaterialNode* SelectionBasePlugin::sphere_mat_node_
private

Definition at line 396 of file SelectionBasePlugin.hh.

◆ sphere_node_

ACG::SceneGraph::GlutPrimitiveNode* SelectionBasePlugin::sphere_node_
private

Definition at line 399 of file SelectionBasePlugin.hh.

◆ sphere_radius_

double SelectionBasePlugin::sphere_radius_
private

Definition at line 402 of file SelectionBasePlugin.hh.

◆ sphereSelectionAction_

HandleAction* SelectionBasePlugin::sphereSelectionAction_
private

Definition at line 366 of file SelectionBasePlugin.hh.

◆ surfaceLassoSelectionAction_

HandleAction* SelectionBasePlugin::surfaceLassoSelectionAction_
private

Definition at line 365 of file SelectionBasePlugin.hh.

◆ toggleSelectionAction_

HandleAction* SelectionBasePlugin::toggleSelectionAction_
private

Definition at line 362 of file SelectionBasePlugin.hh.

◆ tool_

SelectionBaseToolboxWidget* SelectionBasePlugin::tool_
private

Definition at line 353 of file SelectionBasePlugin.hh.

◆ toolBar_

QToolBar* SelectionBasePlugin::toolBar_
private

Definition at line 350 of file SelectionBasePlugin.hh.

◆ toolIcon_

QIcon* SelectionBasePlugin::toolIcon_
private

Definition at line 413 of file SelectionBasePlugin.hh.

◆ typeCounter_

QMap<DataType,int> SelectionBasePlugin::typeCounter_
private

Caches the number of available elements of a certain data type for the typeExists function.

Definition at line 317 of file SelectionBasePlugin.hh.

◆ volumeLassoSelectionAction_

HandleAction* SelectionBasePlugin::volumeLassoSelectionAction_
private

Definition at line 364 of file SelectionBasePlugin.hh.


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