Developer Documentation
|
This class vizualizes a property. More...
#include <Plugin-PropertyVis/PropertyVisualizer.hh>
Signals | |
void | log (Logtype _type, QString _message) |
void | log (QString _message) |
Public Member Functions | |
PropertyVisualizer (PropertyInfo _propertyInfo) | |
Constructor. More... | |
virtual | ~PropertyVisualizer () |
Destructor. | |
virtual void | visualize (bool _setDrawMode, QWidget *_widget) |
Visualizes the property. More... | |
virtual void | removeProperty () |
Removes the property. More... | |
virtual void | duplicateProperty () |
Duplicates the property. More... | |
virtual void | clear () |
Clears the property visualization. More... | |
virtual QString | getName () |
Returns a beautiful name. More... | |
virtual QWidget * | getWidget () |
Returns the visualizer's widget. More... | |
const PropertyInfo & | getPropertyInfo () const |
Returns the PropertyInfo. | |
virtual QString | getPropertyText (unsigned int i)=0 |
Returns the value of a property in text form. More... | |
virtual void | setPropertyFromText (unsigned int index, QString text)=0 |
Returns the value of a property in text form. More... | |
virtual int | getEntityCount ()=0 |
Returns the number of entities. | |
virtual QString | getHeader ()=0 |
Returns the header for saving. | |
Static Public Member Functions | |
static QString | toStr (bool b) |
static QString | toStr (double d) |
static QString | toStr (int i) |
static QString | toStr (uint8_t i) |
static QString | toStr (unsigned int i) |
static QString | toStr (OpenMesh::Vec3d v) |
static QString | toStr (OpenMesh::Vec2d v) |
static QString | toStr (OpenMesh::Vec2f v) |
static bool | strToBool (QString str) |
static double | strToDouble (QString str) |
static int | strToInt (QString str) |
static unsigned int | strToUInt (QString str) |
static OpenMesh::Vec3d | strToVec3d (QString str) |
static OpenMesh::Vec2d | strToVec2d (QString str) |
static OpenMesh::Vec2f | strToVec2f (QString str) |
Public Attributes | |
QWidget * | widget |
Protected Attributes | |
PropertyInfo | propertyInfo |
This class vizualizes a property.
For each property one object of this class is created. It is responsible for the visualization of that property. It provides a widget that can be used to set options for the visualization.
Definition at line 80 of file PropertyVisualizer.hh.
|
inline |
Constructor.
_propertyInfo | Information about the property this visualizer should visualize. |
Definition at line 94 of file PropertyVisualizer.hh.
|
virtual |
Clears the property visualization.
This method should be implemented by a subclass that specializes on clearing property visualizations for a specific object type. This method here only implements a warning which will tell the user that clearing the property visualitaion is not implemented yet for that object type.
Reimplemented in OMPropertyVisualizer< MeshT >, OMPropertyVisualizerVector2< MeshT, VectorType >, and OMPropertyVisualizerVector< MeshT >.
Definition at line 95 of file PropertyVisualizer.cc.
|
virtual |
Duplicates the property.
This method should be implemented by a subclass that specializes on duplicating properties for a specific object type. This method here only implements a warning which will tell the user that removing the property is not implemented yet for that object type.
Reimplemented in OMPropertyVisualizerVector2< MeshT, VectorType >, OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizer< MeshT >, OMPropertyVisualizerDouble< MeshT >, OMPropertyVisualizerInteger< MeshT, T >, and OMPropertyVisualizerBoolean< MeshT >.
Definition at line 83 of file PropertyVisualizer.cc.
|
inlinevirtual |
Returns a beautiful name.
The beautiful name consists of a symbol representing the entity type, the property's name and the property's type.
Reimplemented in OMPropertyVisualizerVectorFieldDifference< MeshT >.
Definition at line 122 of file PropertyVisualizer.hh.
|
pure virtual |
Returns the value of a property in text form.
i | The id of the entity whose property we want to know. |
Implemented in OMPropertyVisualizer< MeshT >, OMPropertyVisualizerVector2< MeshT, VectorType >, OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVectorFieldDifference< MeshT >, OMPropertyVisualizerInteger< MeshT, T >, OMPropertyVisualizerDouble< MeshT >, and OMPropertyVisualizerBoolean< MeshT >.
|
inlinevirtual |
Returns the visualizer's widget.
Returns the visualizer's widget that can be used to set some options for the visualization.
Definition at line 129 of file PropertyVisualizer.hh.
|
virtual |
Removes the property.
This method should be implemented by a subclass that specializes on removing properties for a specific object type. This method here only implements a warning which will tell the user that removing the property is not implemented yet for that object type.
Reimplemented in OMPropertyVisualizerVector2< MeshT, VectorType >, OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVectorFieldDifference< MeshT >, OMPropertyVisualizer< MeshT >, OMPropertyVisualizerDouble< MeshT >, OMPropertyVisualizerInteger< MeshT, T >, and OMPropertyVisualizerBoolean< MeshT >.
Definition at line 71 of file PropertyVisualizer.cc.
|
pure virtual |
Returns the value of a property in text form.
index | The id of the entity whose property should be set. |
text | The value in text form. |
This method sets the porperty of a given entity by transforming the text into the correct type. This is used when a property is loaded from a file.
Implemented in OMPropertyVisualizer< MeshT >.
|
virtual |
Visualizes the property.
This method should be implemented by a subclass that specializes on visualizing a specific property type for a specific object type. This method here only implements a warning which will tell the user that visualizing the property for that object type is not implemented yet.
Reimplemented in OMPropertyVisualizer< MeshT >.
Definition at line 59 of file PropertyVisualizer.cc.