51 #ifndef SELECTIONINTERFACE_HH
52 #define SELECTIONINTERFACE_HH
54 #include <OpenFlipper/INIFile/INIFile.hh>
58 #if QT_VERSION >= 0x050000
85 typedef std::vector<DataType> TypeList;
86 typedef unsigned int PrimitiveType;
194 virtual void addPrimitiveType(QString _handleName, QString _name, QString _icon, PrimitiveType& _typeHandle) {};
364 PrimitiveType _associatedTypes, QString& _customIdentifier) {};
386 PrimitiveType _associatedTypes, QString& _customIdentifier,
387 DataType _objectTypeRestriction) {};
660 virtual void addSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, PrimitiveType _type = 0u) {};
782 virtual void slotSphereSelection(QMouseEvent* _event,
double _radius, PrimitiveType _currentType,
bool _deselect) {};
809 virtual void slotFloodFillSelection(QMouseEvent* _event,
double _maxAngle, PrimitiveType _currentType,
bool _deselect) {};
833 virtual void slotCustomSelection(QMouseEvent* _event, PrimitiveType _currentType, QString _customIdentifier,
bool _deselect) {};
869 virtual void toggleSelection(QMouseEvent* _event, PrimitiveType _currentType,
bool _deselect) {};
880 virtual void lassoSelection(QMouseEvent* _event, PrimitiveType _currentType,
bool _deselect) {};
914 virtual void sphereSelection(QMouseEvent* _event,
double _radius, PrimitiveType _currentType,
bool _deselect) {};
937 virtual void floodFillSelection(QMouseEvent* _event,
double _maxAngle, PrimitiveType _currentType,
bool _deselect) {};
960 virtual void customSelection(QMouseEvent* _event, PrimitiveType _currentType, QString _customIdentifier,
bool _deselect) {};
991 virtual void keyShortcutEvent(
int _key, Qt::KeyboardModifiers _modifiers = Qt::NoModifier) {};
1031 virtual void slotAddPrimitiveType(QString _handleName, QString _name, QString _icon, PrimitiveType& _typeHandle) {};
1045 PrimitiveType _associatedTypes, QString& _customIdentifier) {};
1058 PrimitiveType _associatedTypes, QString& _customIdentifier,
1059 DataType _objectTypeRestriction) {};
1206 #endif // SELECTIONINTERFACE_HH
virtual void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier, DataType _objectTypeRestriction)
Do not use. Implemented in SelectionBasePlugin.
virtual void slotRegisterKeyShortcut(int _key, Qt::KeyboardModifiers _modifiers)
virtual void slotComponentsSelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a connected components selection.
virtual void slotSaveSelection(INIFile &_file)
Save selection for all objects in the scene.
virtual void closestBoundarySelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Emitted by selection base plugin whenever the user performs a closest boundary selection.
virtual void getActivePrimitiveType(PrimitiveType &_type)
Get the primitive type that is selected.
virtual void slotShowToggleSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
virtual void selectionOperation(QString _operation)
Emitted by selection base plugin when a non-interactive selection operation is requested.
virtual void showSphereSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
Show sphere selection mode in a specified selection environment.
virtual void slotAddPrimitiveType(QString _handleName, QString _name, QString _icon, PrimitiveType &_typeHandle)
Do not use. Implemented in SelectionBasePlugin.
virtual void slotSurfaceLassoSelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a surface lasso selection.
virtual void slotComponentsSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
virtual void saveSelection(INIFile &_file)
Save selections into ini-file.
virtual void slotShowClosestBoundarySelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
Interface for all plugins which want to use selection functions.
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 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 showVolumeLassoSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
Show volume lasso selection mode in a specified selection environment.
virtual void slotFloodFillSelection(QMouseEvent *_event, double _maxAngle, PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a flood fill selection.
virtual void targetObjectsOnly(bool &_targetsOnly)
Indicates whether selection should be performed on target objects only.
virtual void slotLoadSelection(const INIFile &_file)
Load selection for specific objects in the scene.
virtual void slotShowSphereSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
virtual void showToggleSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
Show toggle selection mode in a specified selection environment.
virtual void registerType(QString _handleName, DataType _type)
Register data type for a selection environment.
virtual void surfaceLassoSelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Emitted by selection base plugin whenever the user performs a surface lasso selection.
virtual void slotGetActivePrimitiveType(PrimitiveType &_type)
virtual void slotKeyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers)
One of the previously registered keys has been pressed.
virtual void slotGetActiveDataTypes(TypeList &_types)
virtual void slotAddSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, PrimitiveType _type)
virtual void showFloodFillSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
Show flood fill selection mode in a specified selection environment.
virtual ~SelectionInterface()
Destructor.
Class for the handling of simple configuration files.
virtual void addCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier)
Add a custom interactive selection mode.
virtual void slotShowFloodFillSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
virtual void slotClosestBoundarySelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a closest boundary 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 addSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, PrimitiveType _type=0u)
Add non-interactive selection operations for a specific primitive type.
virtual void slotShowSurfaceLassoSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
virtual void showComponentsSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
Show connected components selection mode in a specified selection environment.
virtual void addPrimitiveType(QString _handleName, QString _name, QString _icon, PrimitiveType &_typeHandle)
Provide selection for primitives other than the standard ones.
virtual void componentsSelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Emitted by selection base plugin whenever the user performs a connected components selection...
virtual void slotVolumeLassoSelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a volume lasso selection.
virtual void slotAddCustomSelectionMode(QString _handleName, QString _modeName, QString _description, QString _icon, PrimitiveType _associatedTypes, QString &_customIdentifier)
Do not use. Implemented in SelectionBasePlugin.
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 slotRegisterType(QString _handleName, DataType _type)
Do not use. Implemented in SelectionBasePlugin.
virtual void slotSphereSelection(QMouseEvent *_event, double _radius, PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a sphere selection.
virtual void loadSelection(int _objId, const QString &_filename)
Scripting slot for loading selections.
virtual void keyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
Key shortcut event happened.
virtual void showLassoSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
Show lasso selection mode in a specified selection environment.
virtual void registerKeyShortcut(int _key, Qt::KeyboardModifiers _modifiers=Qt::NoModifier)
Register key shortcut.
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 slotShowVolumeLassoSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
virtual void slotToggleSelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a toggle selection.
virtual void slotSelectionOperation(QString _operation)
A specific operation is requested.
virtual void showSurfaceLassoSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
Show surface lasso selection mode in a specified selection environment.
virtual void slotTargetObjectsOnly(bool &_targetsOnly)
virtual void slotShowLassoSelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
virtual void slotAddSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString &_handleName)
Do not use. Implemented in SelectionBasePlugin.
virtual void floodFillSelection(QMouseEvent *_event, double _maxAngle, PrimitiveType _currentType, bool _deselect)
Emitted by selection base plugin whenever the user performs a flood fill selection.
virtual void lassoSelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Emitted by selection base plugin whenever the user performs a lasso selection.
virtual void showClosestBoundarySelectionMode(QString _handleName, bool _show, PrimitiveType _associatedTypes)
Show closest boundary selection mode in a specified selection environment.
virtual void toggleSelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Emitted by selection base plugin whenever the user performs a toggle selection.
virtual void slotCustomSelection(QMouseEvent *_event, PrimitiveType _currentType, QString _customIdentifier, bool _deselect)
Called whenever the user performs a custom selection.
virtual void loadSelection(const INIFile &_file)
Load selections from ini-file.
virtual void slotLassoSelection(QMouseEvent *_event, PrimitiveType _currentType, bool _deselect)
Called whenever the user performs a lasso selection.
virtual void getActiveDataTypes(TypeList &_types)
Get the data types that the currently active selection environment supports.