50#ifndef BSPLINESURFACESELECTIONPLUGIN_HH
51#define BSPLINESURFACESELECTIONPLUGIN_HH
62#include <OpenFlipper/BasePlugin/INIInterface.hh>
67#include <OpenFlipper/INIFile/INIFile.hh>
83 Q_PLUGIN_METADATA(IID
"org.OpenFlipper.Plugins.Plugin-SelectionBSplineSurface")
96 void updateView()
override;
97 void updatedObject(
int,
const UpdateType&)
override;
98 void nodeVisibilityChanged(
int _identifier)
override;
99 void setSlotDescription(QString _slotName, QString _slotDescription,
100 QStringList _parameters, QStringList _descriptions)
override;
103 void log(
Logtype _type, QString _message)
override;
104 void log(QString _message)
override;
110 void scriptInfo(QString _functionName);
113 void addSelectionEnvironment(QString _modeName, QString _description, QString _icon, QString& _handleName)
override;
114 void registerType(QString _handleName,
DataType _type)
override;
115 void addPrimitiveType(QString _handleName, QString _name, QString _icon, SelectionInterface::PrimitiveType& _typeHandle)
override;
116 void addSelectionOperations(QString _handleName, QStringList _operationsList, QString _category, SelectionInterface::PrimitiveType _type = 0u)
override;
117 void showToggleSelectionMode(QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes)
override;
118 void showVolumeLassoSelectionMode(QString _handleName,
bool _show, SelectionInterface::PrimitiveType _associatedTypes)
override;
120 void getActiveDataTypes(SelectionInterface::TypeList& _types)
override;
121 void getActivePrimitiveType(SelectionInterface::PrimitiveType& _type)
override;
122 void targetObjectsOnly(
bool& _targetsOnly)
override;
124 void registerKeyShortcut(
int _key, Qt::KeyboardModifiers _modifiers = Qt::NoModifier)
override;
129 void loadIniFile(
INIFile& _ini,
int _id)
override;
130 void saveIniFile(
INIFile& _ini,
int _id)
override;
133 void initializePlugin()
override;
134 void pluginsInitialized()
override;
135 void noguiSupported()
override {};
139 void slotToggleSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType,
bool _deselect)
override;
140 void slotVolumeLassoSelection(QMouseEvent* _event, SelectionInterface::PrimitiveType _currentType,
bool _deselect)
override;
150 void loadSelection(
int _objId,
const QString& _filename)
override;
156 return (QString(tr(
"BSplineSurface Selection")));
160 return (QString(tr(
"Allows to select B-Spline surfaces")));
181 QString version()
override {
182 return QString(
"1.0");
std::vector< int > IdList
Standard Type for id Lists used for scripting.
Logtype
Log types for Message Window.
~BSplineSurfaceSelectionPlugin()
Default destructor.
unsigned int controlPointType_
Primitive type handles:
void selectAllKnots(int _objectId)
Select all knots of a curve.
void deselectAllKnots(int _objectId)
Deselect all knots of a curve.
void selectControlPoints(int _objectId, const IdList &_ids, bool _deselect=false)
Delete selected control points.
QString description() override
Return a description of what the plugin is doing.
void selectKnots(int _objectId, const IdList &_ids_u, const IdList &_ids_v, bool _deselect=false)
Select specific knots of a curve.
void deselectAllControlPoints(int _objectId)
Deselect all control points of a curve.
void slotVolumeLassoSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect) override
Called whenever the user performs a volume lasso selection.
void deleteSelectedKnotsU(int _objectId)
Delete selected knots.
IdList getKnotSelectionV(int _objectId)
Select all control points of a curve.
void slotSaveSelection(INIFile &_file) override
Save selection for all objects in the scene.
void deleteSelectedKnotsV(int _objectId)
Select all control points of a curve.
QString name() override
Return a name for the plugin.
BSplineSurfaceSelectionPlugin()
Default constructor.
void updateSlotDescriptions()
Set slot descriptions for scripting functions.
void invertControlPointSelection(int _objectId)
Invert control point selection.
void slotSelectionOperation(const QString _operation) override
A specific operation is requested.
unsigned int knotType_
Handle to selection environment.
void slotLoadSelection(const INIFile &_file) override
Load selection for specific objects in the scene.
IdList getKnotSelectionU(int _objectId)
Get current knot selection.
void slotToggleSelection(QMouseEvent *_event, SelectionInterface::PrimitiveType _currentType, bool _deselect) override
Called whenever the user performs a toggle selection.
void setSelectionViewMode(const SelectionViewMode _mode)
Change selection view mode for every B-spline surface in the scene.
IdList getControlPointSelection(int _objectId)
Get current control point selection.
void selectAllControlPoints(int _objectId)
Select all control points of a curve.
SelectionViewMode
Change selection view mode for every B-spline surface in the scene.
unsigned int allSupportedTypes_
Handle to selection environment.
QVector< QPoint > volumeLassoPoints_
Keep volume lasso points.
void slotKeyShortcutEvent(int _key, Qt::KeyboardModifiers _modifiers) override
One of the previously registered keys has been pressed.
QString environmentHandle_
Handle to selection environment.
void invertKnotSelection(int _objectId)
Invert knot selection.
Interface class for backup handling.
Interface class from which all plugins have to be created.
Class for the handling of simple configuration files.
Interface class for Plugins which have to store information in ini files.
Keyboard Event Interface.
Interface for all Plugins which do logging to the logging window of the framework.
Interface for all Plugins which provide scriptable Functions.
Interface for all plugins which want to use selection functions.
const UpdateType UPDATE_ALL(UpdateTypeSet(1))
Identifier for all updates.