50 #ifndef OM_PROPERTY_MODEL_H
51 #define OM_PROPERTY_MODEL_H
53 #include "SingleObjectPropertyModel.hh"
54 #include "OMPropertyVisualizer.hh"
56 #include "Widgets/LoadSaveWidget.hh"
57 #include "Widgets/PickWidget.hh"
82 virtual void slotCombine(){ combine(); }
83 virtual void slotSaveProperty(){ saveProperty(); }
85 virtual void slotPickProperty(){ pickProperty(); }
88 virtual void combine(){}
89 virtual void saveProperty(){}
90 virtual void pickProperty(){}
94 template<
typename MeshT>
101 virtual void updateWidget(
const QModelIndexList& selectedIndices);
138 typename MeshT::prop_iterator props_first,
139 typename MeshT::prop_iterator props_last,
140 PropertyInfo::ENTITY_FILTER filter);
163 void addProperty(QString propName, QString friendlyTypeName, PropertyInfo::ENTITY_FILTER filter);
165 void initializeSupportedPropertyTypes();
177 #ifdef ENABLE_SKELETON_SUPPORT
186 QPushButton bCombine;
194 std::string lastPickMode;
195 Viewer::ActionMode lastActionMode;
197 typedef std::set<TypeInfoWrapper> TypeInfoWrapperSet;
198 TypeInfoWrapperSet supportedPropertyTypes;
222 #ifdef ENABLE_SKELETON_SUPPORT
228 #if defined(INCLUDE_TEMPLATES) && !defined(OM_PROPERTY_MODEL_CC)
229 #include "OMPropertyModelT.cc"
This class manages the visualizers for a single object.
Added for signal/slot support.
This class vizualizes a property.
virtual void saveProperty()
Saves the currently slected properties.
void loadProperty()
Loads property.
Default property class for any type T.
Wraps the information of a type.
void gatherProperties()
Searches for all properties and creates the visualizers.
bool isNew(OpenMesh::BaseProperty *const baseProp, PropertyInfo::ENTITY_FILTER filter)
Checks if we already created a PropertyVisualizer for this property.
void addPropertyVisualizer(OpenMesh::BaseProperty *const baseProp, MeshT *mesh, PropertyInfo::ENTITY_FILTER filter)
Adds a new PropertyVisualizer.
bool isSupported(OpenMesh::BaseProperty *const baseProp) const
Checks if visualizing this property is supported.
virtual void setPropertyFromFile(QTextStream *&file_stream_, unsigned int n, PropertyVisualizer *propVis)
Sets the property values from a given file.
virtual QString getLoadFilenameFilter()
Returns the filename filter for loading.
virtual void mouseEvent(QMouseEvent *_event)
Handles mouse events for picking.
void resetPicking()
Disables picking.
TypeInfoWrapper getSupportedTypeInfoWrapper(OpenMesh::BaseProperty *const baseProp)
Returns the TypeInfoWrapper for the property if it is supported.
virtual void updateWidget(const QModelIndexList &selectedIndices)
Updates the widget.
virtual bool parseHeader(QString header, PropertyVisualizer *&propVis, unsigned int &n)
Parses the property file header.
virtual QString getSaveFilenameFilter(unsigned int propId)
Returns the filename filter for saving.
virtual void combine()
Combines two properties.
virtual void pickProperty()
Toggle picking on and off.
virtual void pickModeChanged(const std::string &_mode)
Handles changing of pick mode.
Cellection of information about a property.
void addProperty(QString propName, QString friendlyTypeName, PropertyInfo::ENTITY_FILTER filter)
Adds a new property to the mesh.
bool combinable(PropertyVisualizer *propertyVisualizer1, PropertyVisualizer *propertyVisualizer2)
Checks if two properties are combinable.