Developer Documentation

Signals | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
PropertyVisualizer Class Referenceabstract

This class vizualizes a property. More...

`#include <Plugin-PropertyVis/PropertyVisualizer/PropertyVisualizer.hh>`

Inheritance diagram for PropertyVisualizer:

## 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

## Detailed Description

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.

## Constructor & Destructor Documentation

## ◆ PropertyVisualizer()

PropertyVisualizer::PropertyVisualizer | ( | const PropertyInfo & | _propertyInfo | ) |
| inline explicit

Constructor.

Parameters

  _propertyInfo | Information about the property this visualizer should visualize.

Definition at line 91 of file PropertyVisualizer.hh.

## Member Function Documentation

## ◆ clear()

void PropertyVisualizer::clear | ( | void |  | ) |
| 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.

## ◆ duplicateProperty()

void PropertyVisualizer::duplicateProperty | ( |  | ) |
| 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.

## ◆ getName()

virtual QString PropertyVisualizer::getName | ( |  | ) |
| inline virtual

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.

## ◆ getPropertyText()

virtual QString PropertyVisualizer::getPropertyText | ( | unsigned int | i | ) |
| pure virtual

Returns the value of a property in text form.

Parameters

  i | The id of the entity whose property we want to know.

Returns
  The property value in text form.

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 >.

## ◆ getWidget()

virtual QWidget* PropertyVisualizer::getWidget | ( |  | ) |
| inline virtual

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.

## ◆ removeProperty()

void PropertyVisualizer::removeProperty | ( |  | ) |
| 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.

## ◆ setPropertyFromText()

virtual void PropertyVisualizer::setPropertyFromText | ( | unsigned int | index,
|  | QString | text
| ) |  |
| pure virtual

Returns the value of a property in text form.

Parameters

  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 >.

## ◆ visualize()

void PropertyVisualizer::visualize | ( | bool | _setDrawMode,
|  | QWidget * | _widget
| ) |  |
| 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.

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

- Plugin-PropertyVis/PropertyVisualizer/PropertyVisualizer.hh
- Plugin-PropertyVis/PropertyVisualizer/PropertyVisualizer.cc