Developer Documentation
|
This class vizualizes a property. More...
#include <Plugin-PropertyVis/PropertyVisualizer/PropertyVisualizer.hh>
Signals | |
void | log (Logtype _type, QString _message) |
void | log (QString _message) |
Public Member Functions | |
PropertyVisualizer (const 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 Member Functions | |
virtual std::unique_ptr< ACG::IColorCoder > | buildColorCoder () |
template<typename PropType , typename Iterable > | |
void | showHistogramT (ACG::QtWidgets::QtHistogramWidget *widget, Iterable data) |
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 77 of file PropertyVisualizer.hh.
|
inlineexplicit |
Constructor.
_propertyInfo | Information about the property this visualizer should visualize. |
Definition at line 91 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 OVMPropertyVisualizer< MeshT >, OMPropertyVisualizer< MeshT >, OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVector2< MeshT, VectorType >, and OVMPropertyVisualizerVector< MeshT >.
Definition at line 89 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 OVMPropertyVisualizer< MeshT >, OMPropertyVisualizer< MeshT >, OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVector2< MeshT, VectorType >, OVMPropertyVisualizerVectorFieldDifference< MeshT >, OMPropertyVisualizerVectorFieldDifference< MeshT >, OMPropertyVisualizerDouble< MeshT >, OVMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerInteger< MeshT, T >, OMPropertyVisualizerBoolean< MeshT >, OVMPropertyVisualizerDouble< MeshT >, OVMPropertyVisualizerInteger< MeshT, T >, and OVMPropertyVisualizerBoolean< MeshT >.
Definition at line 77 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 OVMPropertyVisualizerVectorFieldDifference< MeshT >, and OMPropertyVisualizerVectorFieldDifference< MeshT >.
Definition at line 119 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 >, OVMPropertyVisualizer< MeshT >, OVMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVector2< MeshT, VectorType >, OVMPropertyVisualizerVectorFieldDifference< MeshT >, OVMPropertyVisualizerBoolean< MeshT >, OMPropertyVisualizerVectorFieldDifference< MeshT >, OVMPropertyVisualizerDouble< MeshT >, OMPropertyVisualizerInteger< MeshT, T >, OVMPropertyVisualizerInteger< 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 126 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 OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVector2< MeshT, VectorType >, OVMPropertyVisualizer< MeshT >, OMPropertyVisualizer< MeshT >, OMPropertyVisualizerVectorFieldDifference< MeshT >, OMPropertyVisualizerDouble< MeshT >, OMPropertyVisualizerInteger< MeshT, T >, and OMPropertyVisualizerBoolean< MeshT >.
Definition at line 65 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 >, and OVMPropertyVisualizer< 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 OVMPropertyVisualizer< MeshT >, and OMPropertyVisualizer< MeshT >.
Definition at line 53 of file PropertyVisualizer.cc.