45 #include "Models/PropertyModel.hh" 46 #include "PropertyVisualizer/PropertyVisualizer.hh" 57 #include <QPushButton> 58 #include <QScriptValue> 59 #include <QScriptContext> 61 #include <Widgets/VectorWidget.hh> 79 void log(
Logtype _type, QString _message);
80 void log(QString _message);
83 void slotLog(
Logtype _type, QString _message){ emit log(_type, _message); }
84 void slotLog(QString _message){ emit log(_message);}
87 virtual void pickModeChanged(
const std::string& _mode) {}
88 virtual void mouseEvent(QMouseEvent* _event) {}
93 virtual int rowCount(
const QModelIndex & parent = QModelIndex())
const;
94 virtual QVariant data(
const QModelIndex & index,
int role = Qt::DisplayRole)
const;
95 virtual QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole)
const;
101 virtual void visualize(QModelIndexList selectedIndices, QWidgetList widgets = QWidgetList());
113 virtual void clear(QModelIndexList selectedIndices);
122 virtual void updateWidget(
const QModelIndexList& selectedIndices);
131 virtual QScriptValue
getScriptObject(
const QModelIndex index, QScriptContext *ctx);
181 std::vector<PropertyVisualizer*> propertyVisualizers;
183 QModelIndexList currentlySelectedIndices;
184 std::vector<unsigned int> currentlyVisualizedIndices;
virtual QString getDefaultSaveFilename(unsigned int propId)
Returns the default file name.
virtual void duplicateProperty(QModelIndexList selectedIndices)
Duplicates the selected properties.
QString getLoadFilename()
Asks the user for a file to load.
Logtype
Log types for Message Window.
void connectLogs(PropertyVisualizer *propViz)
Connects the PropertyVisualizer log signals with the log slot.
virtual void objectUpdated()
Revisualizes visualized properties.
PropertyVisualizer * getPropertyVisualizer(QString propName, PropertyInfo::ENTITY_FILTER filter, TypeInfoWrapper typeInfo)
Returns a PropertyVisualizer.
virtual QString getSaveFilenameFilter(unsigned int propId)
Returns the filename filter for saving.
QString getSaveFilename(unsigned int propId)
Asks the user for a file to load.
QWidget * getWidget()
Returns the widget.
This class manages the visualizers for a single object.
void loadProperty()
Loads property.
Wraps the information of a type.
virtual void updateWidget(const QModelIndexList &selectedIndices)
Updates the widget.
virtual void visualize(QModelIndexList selectedIndices, QWidgetList widgets=QWidgetList())
Visualizes the selected properties.
virtual bool parseHeader(QString header, PropertyVisualizer *&propVis, unsigned int &n)
Parses the property file header.
virtual void gatherProperties()
Searches for properties and creates PropertyVisualizers.
virtual void setPropertyFromFile(QTextStream &file_stream, unsigned int n, PropertyVisualizer *propVis)
Sets the property values from a given file.
void hideWidget()
Hides the widget.
This class vizualizes a property.
virtual void removeProperty(QModelIndexList selectedIndices)
Removes the selected properties.
bool isPropertyFree(QString propName, PropertyInfo::ENTITY_FILTER filter, TypeInfoWrapper typeInfo)
Checks if the property name is still available.
void saveProperty(unsigned int propId)
Saves property.
virtual QScriptValue getScriptObject(const QModelIndex index, QScriptContext *ctx)
Returns a qscript object that can be used to access visualisation parameters.
virtual PropertyInfo getPropertyInfo(const QModelIndex index) const
Returns the property info for the property with the given index.
Cellection of information about a property.
virtual void clear(QModelIndexList selectedIndices)
Clears the selected property visualization.
virtual QString getLoadFilenameFilter()
Returns the filename filter for loading.