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 #if QT_VERSION < 0x050500 55 Q_PROPERTY(QPointer<ito::AddInBase> plugin READ plugin WRITE setPlugin)
56 Q_PROPERTY(
int indentation READ indentation WRITE setIndentation)
57 Q_PROPERTY(
bool rootIsDecorated READ rootIsDecorated WRITE setRootIsDecorated)
58 Q_PROPERTY(
bool alternatingRowColors READ alternatingRowColors WRITE setAlternatingRowColors)
59 Q_PROPERTY(
bool headerVisible READ isHeaderVisible WRITE setHeaderVisible)
60 Q_PROPERTY(ResizeMode resizeMode READ resizeMode WRITE setResizeMode)
61 Q_PROPERTY(
int splitterPosition READ splitterPosition WRITE setSplitterPosition)
62 Q_PROPERTY(
bool propertiesWithoutValueMarked READ propertiesWithoutValueMarked WRITE setPropertiesWithoutValueMarked)
63 Q_PROPERTY(
bool readonly READ readonly WRITE setReadonly)
64 Q_PROPERTY(
bool showDescriptions READ showDescriptions WRITE setShowDescriptions)
65 Q_PROPERTY(QStringList filteredCategories READ filteredCategories WRITE setFilteredCategories)
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.")
88 #if QT_VERSION >= 0x050500 103 virtual ~ParamEditorWidget();
105 QPointer<ito::AddInBase> plugin()
const;
106 void setPlugin(QPointer<ito::AddInBase> plugin);
110 int indentation()
const;
111 void setIndentation(
int i);
113 bool rootIsDecorated()
const;
114 void setRootIsDecorated(
bool show);
116 bool alternatingRowColors()
const;
117 void setAlternatingRowColors(
bool enable);
119 bool readonly()
const;
120 void setReadonly(
bool enable);
122 bool isHeaderVisible()
const;
123 void setHeaderVisible(
bool visible);
125 ResizeMode resizeMode()
const;
126 void setResizeMode(ResizeMode mode);
128 int splitterPosition()
const;
129 void setSplitterPosition(
int position);
131 void setPropertiesWithoutValueMarked(
bool mark);
132 bool propertiesWithoutValueMarked()
const;
134 void setShowDescriptions(
bool show);
135 bool showDescriptions()
const;
137 void setFilteredCategories(
const QStringList &filteredCategories);
138 QStringList filteredCategories()
const;
148 msgLevelErrorOnly = 1,
149 msgLevelWarningOnly = 2,
150 msgLevelWarningAndError = msgLevelErrorOnly | msgLevelWarningOnly
153 ito::RetVal setPluginParameter(QSharedPointer<ito::ParamBase> param,
MessageLevel msgLevel = msgLevelWarningAndError)
const;
154 ito::RetVal setPluginParameters(
const QVector<QSharedPointer<ito::ParamBase> > params,
MessageLevel msgLevel = msgLevelWarningAndError)
const;
169 ito::RetVal loadPlugin(QPointer<ito::AddInBase> plugin);
172 void timerEvent(QTimerEvent *event);
175 QScopedPointer<ParamEditorWidgetPrivate> d_ptr;
177 Q_DECLARE_PRIVATE(ParamEditorWidget);
178 Q_DISABLE_COPY(ParamEditorWidget);
181 void valueChanged(
QtProperty* prop,
int value);
182 void valueChanged(
QtProperty* prop,
char value);
183 void valueChanged(
QtProperty* prop,
double value);
184 void valueChanged(
QtProperty* prop,
int num,
const char* values);
185 void valueChanged(
QtProperty* prop,
int num,
const int* values);
186 void valueChanged(
QtProperty* prop,
int num,
const double* values);
187 void valueChanged(
QtProperty* prop,
const QByteArray &value);
188 void valueChanged(
QtProperty* prop,
int min,
int max);
189 void valueChanged(
QtProperty* prop,
int left,
int top,
int width,
int height);
193 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:251
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