50 #ifndef PROPERTY_VISUALIZER_HH
51 #define PROPERTY_VISUALIZER_HH
58 #include "OpenMesh/Core/Geometry/VectorT.hh"
60 #ifdef ENABLE_SKELETON_SUPPORT
61 #include <ObjectTypes/Skeleton/BaseSkin.hh>
68 VizException(
const std::string &msg) : std::logic_error(msg) {}
85 void log(
Logtype _type, QString _message);
86 void log(QString _message);
96 propertyInfo(_propertyInfo),
105 virtual void visualize(
bool _setDrawMode, QWidget* _widget);
114 virtual void clear();
122 virtual QString
getName() {
return propertyInfo.toString(); }
160 static inline QString toStr(
bool b) {
return b ? QObject::tr(
"True") : QObject::tr(
"False"); }
161 static inline QString toStr(
double d) {
return QObject::tr(
"%1").arg(d); }
162 static inline QString toStr(
int i) {
return QObject::tr(
"%1").arg(i); }
163 static inline QString toStr(uint8_t i) {
return QObject::tr(
"%1").arg(i); }
164 static inline QString toStr(
unsigned int i) {
return QObject::tr(
"%1").arg(i); }
168 #ifdef ENABLE_SKELETON_SUPPORT
172 static inline bool strToBool (QString str) {
return (str.compare(QObject::tr(
"True"))==0); }
173 static inline double strToDouble(QString str) {
return str.toDouble() ; }
174 static inline int strToInt (QString str) {
return str.toInt(); }
175 static inline unsigned int strToUInt (QString str) {
return str.toUInt(); }
const PropertyInfo & getPropertyInfo() const
Returns the PropertyInfo.
This class vizualizes a property.
Logtype
Log types for Message Window.
virtual QString getPropertyText(unsigned int i)=0
Returns the value of a property in text form.
virtual QString getName()
Returns a beautiful name.
virtual void clear()
Clears the property visualization.
virtual int getEntityCount()=0
Returns the number of entities.
std::map< unsigned int, double > SkinWeights
Stores the joint weights per vertex.
virtual void removeProperty()
Removes the property.
virtual void visualize(bool _setDrawMode, QWidget *_widget)
Visualizes the property.
virtual void setPropertyFromText(unsigned int index, QString text)=0
Returns the value of a property in text form.
virtual void duplicateProperty()
Duplicates the property.
PropertyVisualizer(PropertyInfo _propertyInfo)
Constructor.
virtual QWidget * getWidget()
Returns the visualizer's widget.
virtual QString getHeader()=0
Returns the header for saving.
Cellection of information about a property.
virtual ~PropertyVisualizer()
Destructor.