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);
108 virtual void removeProperty();
111 virtual void duplicateProperty();
114 virtual void clear();
122 virtual QString
getName() {
return propertyInfo.toString(); }
139 virtual QString getPropertyText(
unsigned int i) = 0;
151 virtual void setPropertyFromText(
unsigned int index, QString text) = 0;
154 virtual int getEntityCount() = 0;
157 virtual QString getHeader() = 0;
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(); }
std::map< unsigned int, double > SkinWeights
Stores the joint weights per vertex.
Cellection of information about a property.
Logtype
Log types for Message Window.
const PropertyInfo & getPropertyInfo() const
Returns the PropertyInfo.
This class vizualizes a property.
PropertyVisualizer(PropertyInfo _propertyInfo)
Constructor.
virtual QString getName()
Returns a beautiful name.
virtual ~PropertyVisualizer()
Destructor.
virtual QWidget * getWidget()
Returns the visualizer's widget.