23 #ifndef PARAMEDITORWIDGET_H
24 #define PARAMEDITORWIDGET_H
27 #include "commonWidgets.h"
29 #include "common/sharedStructuresQt.h"
30 #include "common/param.h"
33 #include <qscopedpointer.h>
37 class ParamEditorModel;
51 Q_PROPERTY(QPointer<ito::AddInBase> plugin READ plugin WRITE setPlugin)
52 Q_PROPERTY(
int indentation READ indentation WRITE setIndentation)
53 Q_PROPERTY(
bool rootIsDecorated READ rootIsDecorated WRITE setRootIsDecorated)
54 Q_PROPERTY(
bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors)
55 Q_PROPERTY(
bool headerVisible READ isHeaderVisible WRITE setHeaderVisible)
56 Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
57 Q_PROPERTY(
int splitterPosition READ splitterPosition WRITE setSplitterPosition)
58 Q_PROPERTY(
bool propertiesWithoutValueMarked READ propertiesWithoutValueMarked WRITE setPropertiesWithoutValueMarked)
59 Q_PROPERTY(
bool readonly READ readonly WRITE setReadonly)
60 Q_PROPERTY(
bool showDescriptions READ showDescriptions WRITE setShowDescriptions)
61 Q_PROPERTY(QStringList filteredCategories READ filteredCategories WRITE setFilteredCategories)
62 Q_PROPERTY(
bool immediatelyModifyPluginParamsAfterChange READ immediatelyModifyPluginParamsAfterChange WRITE setImmediatelyModifyPluginParamsAfterChange)
63 Q_PROPERTY(
int numChangedParameters READ numberOfChangedParameters)
64 Q_PROPERTY(
bool collapsed READ collapsed WRITE setCollapsed)
65 Q_PROPERTY(
bool popupSlider READ popupSlider WRITE setPopupSlider);
67 Q_CLASSINFO(
"prop://plugin",
"Actuator or dataIO instance whose parameters are observed and set by this widget.")
68 Q_CLASSINFO(
"prop://indentation",
"Indentation level of child items in the tree.")
69 Q_CLASSINFO(
"prop://rootIsDecorated",
"Slightly changes the visualization of root and child elements.")
70 Q_CLASSINFO(
"prop://alternatingRowColors",
"En- or disables alternating row colors.")
71 Q_CLASSINFO(
"prop://headerVisible",
"Indicates if the header line (property, value) is visible.")
72 Q_CLASSINFO(
"prop://resizeMode",
"Sets the mode how the columns can be resized.")
73 Q_CLASSINFO(
"prop://splitterPosition",
"Width of the first column (not possible if resizeMode is set to Stretch).")
74 Q_CLASSINFO(
"prop://propertiesWithoutValueMarked",
"If True, category values are marked with a dark gray background.")
75 Q_CLASSINFO(
"prop://readonly",
"Indicates if widget is readonly or if values can be changed.")
76 Q_CLASSINFO(
"prop://showDescriptions",
"If True, a text box is visible below the properties to show an information text about the currently set entry.")
77 Q_CLASSINFO(
"prop://filteredCategories",
"If empty, all categories are shown. Else pass a list of category names to only show these categories.")
78 Q_CLASSINFO(
"prop://immediatelyModifyPluginParamsAfterChange",
"If true (default), changed values in the widget will be immediately sent to the connected plugin, calling its 'setParam' method. Else, changed values will be stored in a temporary list and can be sent later (using applyChangedParameters).")
79 Q_CLASSINFO(
"prop://numChangedParameters",
"Number of changed parameters, that have not been applied to the plugin yet.")
80 Q_CLASSINFO(
"prop://collapsed",
"If true, collapse all items in the tree or load new items collapsed, else expand the full tree. (default: false)")
81 Q_CLASSINFO(
"prop://popupSlider",
"If a slider widget (slider + spinbox) is used for corresponding floating point number parameters, the slider is displayed as popup window when hovering the spinbox. If false, the slider is always displayed left to the spinbox.")
107 QPointer<ito::AddInBase> plugin()
const;
108 void setPlugin(QPointer<ito::AddInBase> plugin);
112 int indentation()
const;
113 void setIndentation(
int i);
115 bool collapsed()
const;
116 void setCollapsed(
bool c);
118 bool popupSlider()
const;
119 void setPopupSlider(
bool popup);
121 bool rootIsDecorated()
const;
122 void setRootIsDecorated(
bool show);
124 bool alternatingRowColors()
const;
125 void setAlternatingRowColors(
bool enable);
127 bool readonly()
const;
128 void setReadonly(
bool enable);
130 bool isHeaderVisible()
const;
131 void setHeaderVisible(
bool visible);
133 ResizeMode resizeMode()
const;
134 void setResizeMode(ResizeMode mode);
136 int splitterPosition()
const;
137 void setSplitterPosition(
int position);
139 void setPropertiesWithoutValueMarked(
bool mark);
140 bool propertiesWithoutValueMarked()
const;
142 void setShowDescriptions(
bool show);
143 bool showDescriptions()
const;
145 void setFilteredCategories(
const QStringList &filteredCategories);
146 QStringList filteredCategories()
const;
148 void setImmediatelyModifyPluginParamsAfterChange(
bool immediateChange);
149 bool immediatelyModifyPluginParamsAfterChange()
const;
151 int numberOfChangedParameters()
const;
153 QVector<QSharedPointer<ito::ParamBase> > getAndResetChangedParameters();
163 msgLevelErrorOnly = 1,
164 msgLevelWarningOnly = 2,
165 msgLevelWarningAndError = msgLevelErrorOnly | msgLevelWarningOnly
168 ito::RetVal setPluginParameter(QSharedPointer<ito::ParamBase> param, MessageLevel msgLevel = msgLevelWarningAndError)
const;
169 ito::RetVal setPluginParameters(
const QVector<QSharedPointer<ito::ParamBase> > params, MessageLevel msgLevel = msgLevelWarningAndError)
const;
184 ito::RetVal loadPlugin(QPointer<ito::AddInBase> plugin);
187 void timerEvent(QTimerEvent *event);
190 QScopedPointer<ParamEditorWidgetPrivate> d_ptr;
196 void valueChanged(
QtProperty* prop,
int value);
197 void valueChanged(
QtProperty* prop,
char value);
198 void valueChanged(
QtProperty* prop,
double value);
199 void valueChanged(
QtProperty* prop,
int num,
const char* values);
200 void valueChanged(
QtProperty* prop,
int num,
const int* values);
201 void valueChanged(
QtProperty* prop,
int num,
const double* values);
202 void valueChanged(
QtProperty* prop,
const QByteArray &value);
203 void valueChanged(
QtProperty* prop,
int min,
int max);
204 void valueChanged(
QtProperty* prop,
int left,
int top,
int width,
int height);
208 void parametersChanged(QMap<QString, ito::Param> parameters);
Class for managing status values (like errors or warning)
Definition: retVal.h:54
class for parameter handling e.g. to pass paramters to plugins
Definition: param.h:283
Definition: apiFunctionsGraph.cpp:39
semaphore which can be used for asychronous thread communication. By using this class it is possible ...
Definition: sharedStructuresQt.h:57
The QtBrowserItem class represents a property in a property browser instance.
Definition: qtpropertybrowser.h:238
The QtProperty class encapsulates an instance of a property.
Definition: qtpropertybrowser.h:60