27#ifndef __QTPROPERTY_FIELD_EDITOR__
28#define __QTPROPERTY_FIELD_EDITOR__
117 bool eventFilter(QObject* obj, QEvent* event)
override;
138 QVariant initialValue;
141 QStringList enumValues;
156 QVariant minimum, maximum;
159 QString placeHolderText;
162 QString checkBoxText;
171 bool isTabWidgetTitle;
174 QLabel* labelToUpdate;
177 QLineEdit* comboBoxEditableLineEdit;
184 void buildProperty(QString
name, QVariant value, QStringList enumValues = {});
187 QTabWidget* findParentTabWidget();
Presenter for a CamiTK extension file model.
Definition CamiTKExtensionModelPresenter.h:47
Abstract class for field editor.
Definition FieldEditor.h:51
QString name
Name of the field (displayed as a label)
Definition FieldEditor.h:92
QString description
Description (displayed as tool tip / what's that)
Definition FieldEditor.h:95
CamiTKExtensionModelPresenter * presenter
The presenter that contains the full VariantDataModel.
Definition FieldEditor.h:83
VariantDataModel & dataModel
The edited data model (part of the presenter's full model)
Definition FieldEditor.h:86
Field editor for atomic type QVariant managed using a single line edit using QtPropertyBrowser.
Definition QtPropertyFieldEditor.h:65
void setMinimum(QVariant minimum)
for double/int: set the minimum value
Definition QtPropertyFieldEditor.cpp:104
void setDecimals(int decimals)
for double/int: set the number of decimal values
Definition QtPropertyFieldEditor.cpp:120
void setEnumValues(const QStringList &enumValues)
For enums: set the values.
Definition QtPropertyFieldEditor.cpp:59
void setEditableEnum(bool editableEnums)
if true, the last item is editable
Definition QtPropertyFieldEditor.cpp:94
void currentIndexChanged(int index)
for editable enum: called when the selected item has changed in order to let the user edit only the l...
Definition QtPropertyFieldEditor.cpp:347
void setMaximum(QVariant maximum)
for double/int: set the maximum value
Definition QtPropertyFieldEditor.cpp:112
bool eventFilter(QObject *obj, QEvent *event) override
filters wheel events for enum (edited as QComboBox) as it is too easy to modify the value when the mo...
Definition QtPropertyFieldEditor.cpp:248
void valueChangedInPropertyField(QtProperty *property, const QVariant &value)
for anything but enum: called when the edited value has changed
Definition QtPropertyFieldEditor.cpp:257
void setPlaceHolderText(const QString &placeHolderText)
set the displayed text when the field value is empty
Definition QtPropertyFieldEditor.cpp:74
virtual QWidget * getWidget() override
Build an line edit for the encapsulated VariantDataModel.
Definition QtPropertyFieldEditor.cpp:133
void setCheckBoxText(QString checkBoxText)
for boolean: set the text to appear besides the check box (instead of default True/False) (this is us...
Definition QtPropertyFieldEditor.cpp:99
void setReadOnly(bool isReadOnly)
if isReadOnly is true the field value cannot be modified
Definition QtPropertyFieldEditor.cpp:128
void setTitleCase(bool isTitleCase)
For strings: ensure the value has a title case format.
Definition QtPropertyFieldEditor.cpp:69
void editTextChanged(const QString &newValue)
for editable enum: called when the modifiable value has changed
Definition QtPropertyFieldEditor.cpp:339
void setLabelToUpdateWithFieldValue(QLabel *labelToUpdate)
set the label to update/synchronize when the current field is modified
Definition QtPropertyFieldEditor.cpp:89
void setRegExp(const QString ®Exp)
For strings: set the regexp validator for QString properties and editable enums.
Definition QtPropertyFieldEditor.cpp:64
void setTabWidgetTitle(bool isTabWidgetTitle)
it isTabWidgetTitle is true, look for a parent widget that is a TabWidget and sets its text to the cu...
Definition QtPropertyFieldEditor.cpp:84
void setMandatory(bool isMandatory)
if isMandatory is true, the presenter gets a warning message if the value becomes empty
Definition QtPropertyFieldEditor.cpp:79
The QtProperty class encapsulates an instance of a property.
Definition qtpropertybrowser.h:104
The QtVariantEditorFactory class provides widgets for properties created by QtVariantPropertyManager ...
Definition qtvariantproperty.h:212
The QtVariantPropertyManager class provides and manages QVariant based properties.
Definition qtvariantproperty.h:119
The QtVariantProperty class is a convenience class handling QVariant based properties.
Definition qtvariantproperty.h:97
VariantDataModel encapsulates QVariant and can be used as a model for any type of QVariant supported ...
Definition VariantDataModel.h:124