50 #ifdef ENABLE_OPENVOLUMEMESH_SUPPORT 52 #define OVM_PROPERTY_VISUALIZER_BOOLEAN_CC 54 #include "OVMPropertyVisualizerBoolean.hh" 56 template <
typename MeshT>
57 OVMPropertyVisualizerBoolean<MeshT>::OVMPropertyVisualizerBoolean(MeshT* _mesh,
int objectID,
PropertyInfo _propertyInfo)
58 : OVMPropertyVisualizer<MeshT>(_mesh, objectID, _propertyInfo)
60 if (PropertyVisualizer::widget)
delete PropertyVisualizer::widget;
62 w->paramBool->setTitle(QString(
"Boolean Parameters of ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
63 PropertyVisualizer::widget = w;
67 template <
typename MeshT>
68 template <
typename PropType,
typename EntityIterator>
69 void OVMPropertyVisualizerBoolean<MeshT>::visualizeProp(PropType prop, EntityIterator e_begin, EntityIterator e_end)
77 colorTrue = OVMPropertyVisualizer<MeshT>::convertColor(booleanWidget->colorTrue->color());
78 colorFalse = OVMPropertyVisualizer<MeshT>::convertColor(booleanWidget->colorFalse->color());
83 for (EntityIterator e_it = e_begin ; e_it != e_end; ++e_it)
85 object->colors()[*e_it] = colorTrue;
87 object->colors()[*e_it] = colorFalse;
89 CALLS_TO_VISUALIZE_PROP(OVMPropertyVisualizerBoolean<MeshT>,
typename MeshT,
bool)
91 template <typename MeshT>
94 OVMPropertyVisualizer<MeshT>::template duplicateProperty_stage1<bool>();
97 template <
typename MeshT>
98 void OVMPropertyVisualizerBoolean<MeshT>::setCellPropertyFromText(
unsigned int index, QString text)
100 MeshT* mesh = OVMPropertyVisualizer<MeshT>::mesh;
105 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
111 prop[ch] = this->strToBool(text);
114 template <
typename MeshT>
115 void OVMPropertyVisualizerBoolean<MeshT>::setFacePropertyFromText(
unsigned int index, QString text)
117 MeshT* mesh = OVMPropertyVisualizer<MeshT>::mesh;
122 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
128 prop[fh] = this->strToBool(text);
131 template <
typename MeshT>
132 void OVMPropertyVisualizerBoolean<MeshT>::setHalffacePropertyFromText(
unsigned int index, QString text)
134 MeshT* mesh = OVMPropertyVisualizer<MeshT>::mesh;
139 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
145 prop[hfh] = this->strToBool(text);
148 template <
typename MeshT>
149 void OVMPropertyVisualizerBoolean<MeshT>::setEdgePropertyFromText(
unsigned int index, QString text)
151 MeshT* mesh = OVMPropertyVisualizer<MeshT>::mesh;
156 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
162 prop[eh] = this->strToBool(text);
165 template <
typename MeshT>
166 void OVMPropertyVisualizerBoolean<MeshT>::setHalfedgePropertyFromText(
unsigned int index, QString text)
168 MeshT* mesh = OVMPropertyVisualizer<MeshT>::mesh;
173 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
179 prop[heh] = this->strToBool(text);
182 template <
typename MeshT>
183 void OVMPropertyVisualizerBoolean<MeshT>::setVertexPropertyFromText(
unsigned int index, QString text)
185 MeshT* mesh = OVMPropertyVisualizer<MeshT>::mesh;
190 emit this->log(
LOGERR, QObject::tr(
"Error: No property with name ").append(PropertyVisualizer::propertyInfo.propName().c_str()));
196 prop[vh] = this->strToBool(text);
200 template <
typename MeshT>
201 QString OVMPropertyVisualizerBoolean<MeshT>::getPropertyText(
unsigned int index)
203 return OVMPropertyVisualizer<MeshT>::template getPropertyText_<bool>(index);
Cellection of information about a property.
bool getObject(int _identifier, BSplineCurveObject *&_object)
Property classes for the different entity types.
virtual void duplicateProperty()
Duplicates the property.