45#define OVM_PROPERTY_VISUALIZER_BOOLEAN_CC
47#include <ACG/Utils/ColorConversion.hh>
48#include "OVMPropertyVisualizerBoolean.hh"
50template <
typename MeshT>
54 if (PropertyVisualizer::widget)
delete PropertyVisualizer::widget;
56 w->paramBool->setTitle(QString(
"Boolean Parameters of ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
57 PropertyVisualizer::widget = w;
61template <
typename MeshT>
62template <
typename PropType,
typename HandleIterable>
71 colorTrue = ACG::to_Vec4f(booleanWidget->colorTrue->color());
72 colorFalse = ACG::to_Vec4f(booleanWidget->colorFalse->color());
77 for (
const auto &h: handles)
79 object->colors()[h] = colorTrue;
81 object->colors()[h] = colorFalse;
85template <
typename MeshT>
91template <
typename MeshT>
99 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
105 prop[ch] = this->strToBool(text);
108template <
typename MeshT>
116 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
122 prop[fh] = this->strToBool(text);
125template <
typename MeshT>
133 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
139 prop[hfh] = this->strToBool(text);
142template <
typename MeshT>
150 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
156 prop[eh] = this->strToBool(text);
159template <
typename MeshT>
167 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
173 prop[heh] = this->strToBool(text);
176template <
typename MeshT>
184 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
190 prop[vh] = this->strToBool(text);
194template <
typename MeshT>
QString getPropertyText(unsigned int index) override
Returns the value of a property in text form.
void duplicateProperty() override
Duplicates a property.
Cellection of information about a property.
bool getObject(const int _identifier, BaseObject *&_object)
Get the object which has the given identifier.