Developer Documentation
|
This class manages the visualizers for a single object. More...
#include <Plugin-PropertyVis/Models/SingleObjectPropertyModel.hh>
Signals | |
void | log (Logtype _type, QString _message) |
void | log (QString _message) |
Public Member Functions | |
virtual void | pickModeChanged (const std::string &_mode) |
virtual void | mouseEvent (QMouseEvent *_event) |
SingleObjectPropertyModel (QObject *parent=0) | |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
virtual void | objectUpdated () |
Revisualizes visualized properties. | |
virtual void | visualize (QModelIndexList selectedIndices, QWidgetList widgets=QWidgetList()) |
Visualizes the selected properties. More... | |
virtual void | removeProperty (QModelIndexList selectedIndices) |
Removes the selected properties. | |
virtual void | duplicateProperty (QModelIndexList selectedIndices) |
Duplicates the selected properties. | |
virtual void | gatherProperties () |
Searches for properties and creates PropertyVisualizers. | |
virtual void | clear (QModelIndexList selectedIndices) |
Clears the selected property visualization. | |
void | hideWidget () |
Hides the widget. | |
QWidget * | getWidget () |
Returns the widget. | |
virtual void | updateWidget (const QModelIndexList &selectedIndices) |
Updates the widget. | |
void | connectLogs (PropertyVisualizer *propViz) |
Connects the PropertyVisualizer log signals with the log slot. | |
virtual PropertyInfo | getPropertyInfo (const QModelIndex index) const |
Returns the property info for the property with the given index. | |
virtual QScriptValue | getScriptObject (const QModelIndex index, QScriptContext *ctx) |
Returns a qscript object that can be used to access visualisation parameters. | |
Public Member Functions inherited from PropertyModel | |
PropertyModel (QObject *parent=0) | |
QModelIndex | indexFromFancyPropName (const QString &propName) const |
Returns the index of the property with the given name. | |
QModelIndex | indexFromPlainPropName (const QString &propName) const |
Returns the index of the property with the given name. | |
Protected Member Functions | |
PropertyVisualizer * | getPropertyVisualizer (QString propName, PropertyInfo::ENTITY_FILTER filter, TypeInfoWrapper typeInfo) |
Returns a PropertyVisualizer. | |
bool | isPropertyFree (QString propName, PropertyInfo::ENTITY_FILTER filter, TypeInfoWrapper typeInfo) |
Checks if the property name is still available. | |
QString | getLoadFilename () |
Asks the user for a file to load. | |
virtual QString | getLoadFilenameFilter () |
Returns the filename filter for loading. | |
QString | getSaveFilename (unsigned int propId) |
Asks the user for a file to load. | |
virtual QString | getSaveFilenameFilter (unsigned int propId) |
Returns the filename filter for saving. | |
virtual QString | getDefaultSaveFilename (unsigned int propId) |
Returns the default file name. | |
void | saveProperty (unsigned int propId) |
Saves property. | |
void | loadProperty () |
Loads property. | |
virtual void | setPropertyFromFile (QTextStream &file_stream, unsigned int n, PropertyVisualizer *propVis) |
Sets the property values from a given file. | |
virtual bool | parseHeader (QString header, PropertyVisualizer *&propVis, unsigned int &n) |
Parses the property file header. More... | |
Protected Attributes | |
std::vector< PropertyVisualizer * > | propertyVisualizers |
QWidget * | widgets |
QModelIndexList | currentlySelectedIndices |
std::vector< unsigned int > | currentlyVisualizedIndices |
Private Slots | |
void | slotLog (Logtype _type, QString _message) |
void | slotLog (QString _message) |
This class manages the visualizers for a single object.
For each mesh object a SingleObjectPropertyModel is created. It searches for properties and creates a PropertyVisualizer for each of them. It provides the GUI for all selected properties. Also loading and saving of properties is handled here.
Note that for each type of object (OpenMesh, OpenVolumeMesh and others that might follow) a subclass should be derived from this class.
Definition at line 74 of file SingleObjectPropertyModel.hh.
|
inlineprotectedvirtual |
Parses the property file header.
header | The header. | |
[out] | propVis | The PropertyVisualizer that will visualize the new property. |
[out] | n | The number of values stored in the file |
When loading a property from a file this method parses the header placed in the file's first line. If parsing was successfull a new property and a PropertyVisualizer will be created.
Reimplemented in OVMPropertyModel< MeshT >, and OMPropertyModel< MeshT >.
Definition at line 178 of file SingleObjectPropertyModel.hh.
|
virtual |
Visualizes the selected properties.
selectedIndices | The |
Implements PropertyModel.
Definition at line 70 of file SingleObjectPropertyModel.cc.