Developer Documentation
Loading...
Searching...
No Matches
PropertyVisualizer Class Referenceabstract

This class vizualizes a property. More...

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

Inheritance diagram for PropertyVisualizer:
OMPropertyVisualizer< MeshT > OVMPropertyVisualizer< MeshT > OMPropertyVisualizerBoolean< MeshT > OMPropertyVisualizerDouble< MeshT > OMPropertyVisualizerInteger< MeshT, T > OMPropertyVisualizerVector< MeshT > OMPropertyVisualizerVector2< MeshT, VectorType > OMPropertyVisualizerVectorFieldDifference< MeshT > OVMPropertyVisualizerBoolean< MeshT > OVMPropertyVisualizerDouble< MeshT > OVMPropertyVisualizerInteger< MeshT, T > OVMPropertyVisualizerMatrix3x3< MeshT > OVMPropertyVisualizerVector< MeshT, VectorT > OVMPropertyVisualizerVectorFieldDifference< MeshT >

Signals

void log (Logtype _type, QString _message)
 
void log (QString _message)
 

Public Member Functions

 PropertyVisualizer (const PropertyInfo &_propertyInfo)
 Constructor.
 
virtual ~PropertyVisualizer ()
 Destructor.
 
virtual void visualize (bool _setDrawMode, QWidget *_widget)
 Visualizes the property.
 
virtual void removeProperty ()
 Removes the property.
 
virtual void duplicateProperty ()
 Duplicates the property.
 
virtual void clear ()
 Clears the property visualization.
 
virtual QString getName ()
 Returns a beautiful name.
 
virtual QWidget * getWidget ()
 Returns the visualizer's widget.
 
const PropertyInfogetPropertyInfo () const
 Returns the PropertyInfo.
 
virtual QString getPropertyText (unsigned int i)=0
 Returns the value of a property in text form.
 
virtual void setPropertyFromText (unsigned int index, QString text)=0
 Returns the value of a property in text form.
 
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 QString toStr (const ACG::Matrix3x3d &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)
 
template<typename Vec3T >
static Vec3T strToVec3 (QString str)
 

Public Attributes

QWidget * widget
 

Protected Member Functions

virtual std::unique_ptr< ACG::IColorCoderbuildColorCoder ()
 
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)
inlineexplicit

Constructor.

Parameters
_propertyInfoInformation about the property this visualizer should visualize.

Definition at line 91 of file PropertyVisualizer.hh.

◆ ~PropertyVisualizer()

virtual PropertyVisualizer::~PropertyVisualizer ( )
inlinevirtual

Destructor.

Definition at line 99 of file PropertyVisualizer.hh.

Member Function Documentation

◆ buildColorCoder()

std::unique_ptr< ACG::IColorCoder > PropertyVisualizer::buildColorCoder ( )
protectedvirtual

Definition at line 171 of file PropertyVisualizer.cc.

◆ clear()

void PropertyVisualizer::clear ( )
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 >, OVMPropertyVisualizer< MeshT >, OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVector2< MeshT, VectorType >, OVMPropertyVisualizerMatrix3x3< MeshT >, and OVMPropertyVisualizerVector< MeshT, VectorT >.

Definition at line 90 of file PropertyVisualizer.cc.

◆ duplicateProperty()

void PropertyVisualizer::duplicateProperty ( )
virtual

◆ getEntityCount()

virtual int PropertyVisualizer::getEntityCount ( )
pure virtual

Returns the number of entities.

Implemented in OMPropertyVisualizer< MeshT >, and OVMPropertyVisualizer< MeshT >.

◆ getHeader()

virtual QString PropertyVisualizer::getHeader ( )
pure virtual

Returns the header for saving.

Implemented in OMPropertyVisualizer< MeshT >, and OVMPropertyVisualizer< MeshT >.

◆ getName()

virtual QString PropertyVisualizer::getName ( )
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 >, and OVMPropertyVisualizerVectorFieldDifference< MeshT >.

Definition at line 119 of file PropertyVisualizer.hh.

◆ getPropertyInfo()

const PropertyInfo & PropertyVisualizer::getPropertyInfo ( ) const
inline

Returns the PropertyInfo.

Definition at line 129 of file PropertyVisualizer.hh.

◆ getPropertyText()

◆ getWidget()

virtual QWidget * PropertyVisualizer::getWidget ( )
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.

◆ 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 OMPropertyVisualizer< MeshT >, OVMPropertyVisualizer< MeshT >, OMPropertyVisualizerBoolean< MeshT >, OMPropertyVisualizerDouble< MeshT >, OMPropertyVisualizerInteger< MeshT, T >, OMPropertyVisualizerVector< MeshT >, OMPropertyVisualizerVector2< MeshT, VectorType >, and OMPropertyVisualizerVectorFieldDifference< MeshT >.

Definition at line 66 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
indexThe id of the entity whose property should be set.
textThe 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 >.

◆ showHistogramT()

template<typename PropType , typename Iterable >
void PropertyVisualizer::showHistogramT ( ACG::QtWidgets::QtHistogramWidget widget,
Iterable  data 
)
protected

Definition at line 196 of file PropertyVisualizer.hh.

◆ strToBool()

static bool PropertyVisualizer::strToBool ( QString  str)
inlinestatic

Definition at line 172 of file PropertyVisualizer.hh.

◆ strToDouble()

static double PropertyVisualizer::strToDouble ( QString  str)
inlinestatic

Definition at line 173 of file PropertyVisualizer.hh.

◆ strToInt()

static int PropertyVisualizer::strToInt ( QString  str)
inlinestatic

Definition at line 174 of file PropertyVisualizer.hh.

◆ strToUInt()

static unsigned int PropertyVisualizer::strToUInt ( QString  str)
inlinestatic

Definition at line 175 of file PropertyVisualizer.hh.

◆ strToVec2d()

OpenMesh::Vec2d PropertyVisualizer::strToVec2d ( QString  str)
static

Definition at line 153 of file PropertyVisualizer.cc.

◆ strToVec2f()

OpenMesh::Vec2f PropertyVisualizer::strToVec2f ( QString  str)
static

Definition at line 162 of file PropertyVisualizer.cc.

◆ strToVec3()

template<typename Vec3T >
Vec3T PropertyVisualizer::strToVec3 ( QString  str)
static

Definition at line 206 of file PropertyVisualizer.hh.

◆ strToVec3d()

OpenMesh::Vec3d PropertyVisualizer::strToVec3d ( QString  str)
static

Definition at line 143 of file PropertyVisualizer.cc.

◆ toStr() [1/9]

static QString PropertyVisualizer::toStr ( bool  b)
inlinestatic

Definition at line 156 of file PropertyVisualizer.hh.

◆ toStr() [2/9]

QString PropertyVisualizer::toStr ( const ACG::Matrix3x3d v)
static

Definition at line 111 of file PropertyVisualizer.cc.

◆ toStr() [3/9]

static QString PropertyVisualizer::toStr ( double  d)
inlinestatic

Definition at line 157 of file PropertyVisualizer.hh.

◆ toStr() [4/9]

static QString PropertyVisualizer::toStr ( int  i)
inlinestatic

Definition at line 158 of file PropertyVisualizer.hh.

◆ toStr() [5/9]

QString PropertyVisualizer::toStr ( OpenMesh::Vec2d  v)
static

Definition at line 101 of file PropertyVisualizer.cc.

◆ toStr() [6/9]

QString PropertyVisualizer::toStr ( OpenMesh::Vec2f  v)
static

Definition at line 106 of file PropertyVisualizer.cc.

◆ toStr() [7/9]

QString PropertyVisualizer::toStr ( OpenMesh::Vec3d  v)
static

Definition at line 95 of file PropertyVisualizer.cc.

◆ toStr() [8/9]

static QString PropertyVisualizer::toStr ( uint8_t  i)
inlinestatic

Definition at line 159 of file PropertyVisualizer.hh.

◆ toStr() [9/9]

static QString PropertyVisualizer::toStr ( unsigned int  i)
inlinestatic

Definition at line 160 of file PropertyVisualizer.hh.

◆ 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 OMPropertyVisualizer< MeshT >, and OVMPropertyVisualizer< MeshT >.

Definition at line 54 of file PropertyVisualizer.cc.

Member Data Documentation

◆ propertyInfo

PropertyInfo PropertyVisualizer::propertyInfo
protected

Definition at line 189 of file PropertyVisualizer.hh.

◆ widget

QWidget* PropertyVisualizer::widget

Definition at line 192 of file PropertyVisualizer.hh.


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