55 #include "../vpropertyexplorer/vproperty_p.h"
57 #include "../vpropertyexplorer/vproperties.h"
58 #include "../vpatterndb/vformula.h"
59 #include "../vmisc/vabstractapplication.h"
63 : VProperty(name, static_cast<QVariant::Type>(
VFormula::FormulaTypeId()))
78 if (column ==
DPC_Data && (Qt::DisplayRole == role || Qt::EditRole == role))
84 return VProperty::data(column, role);
93 return Qt::ItemIsEnabled | Qt::ItemIsSelectable;
97 return Qt::NoItemFlags;
104 const QAbstractItemDelegate* delegate)
111 formulaEditor->setLocale(parent->locale());
112 formulaEditor->setSizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed);
113 formulaEditor->SetFormula(formula);
114 VProperty::d_ptr->editor = formulaEditor;
115 return VProperty::d_ptr->editor;
162 if (!include_children)
165 foreach (
VProperty* tmpChild, tmpChildren)
167 container->removeChild(tmpChild);
173 return VProperty::clone(
false, container);
189 value.setValue(tmpFormula);
208 value.setValue(formula);
210 VProperty::d_ptr->VariantValue = value;
213 tmpFormula.convert(QVariant::String);
215 VProperty::d_ptr->Children.at(0)->setValue(tmpFormula);
217 if (VProperty::d_ptr->editor !=
nullptr)
225 Q_UNUSED(typeForParent)
Class for holding a plain text property.
void setOsSeparator(bool separator)
QList< VProperty * > Children
List of child properties.
virtual void setUpdateBehaviour(bool update_parent, bool update_children)
Sets whether the views should update Parents or children after this property changes.
VPropertyPrivate * d_ptr
The protected structure holding the member variables (to assure binary compatibility)
virtual QString getName() const
Gets the name of the property.
virtual int addChild(VProperty *child)
Adds a child to this property.
VProperty(const QString &name, QVariant::Type type=QVariant::String)
Standard constructor, takes a name and a parent property as argument.