#include <PropertyItem.h>
Public Member Functions | |
void appendChild (PropertyItem *child) | |
virtual void assignProperty (const App::Property *) | |
virtual void bind (const App::ObjectIdentifier &_path) | |
virtual void bind (const App::Property &prop) | |
override the bind functions to ensure we issue the propertyBound() call, which is then overloaded by childs which like to be informed of a binding More... | |
PropertyItem * child (int row) | |
int childCount () const | |
int columnCount () const | |
virtual QWidget * createEditor (QWidget *parent, const QObject *receiver, const char *method) const | |
Creates the appropriate editor for this item and sets the editor to the value of overrideValue(). More... | |
QWidget * createExpressionEditor (QWidget *parent, const QObject *receiver, const char *method) const | |
virtual QVariant data (int column, int role) const | |
int decimals () const | |
virtual QVariant editorData (QWidget *editor) const | |
QString expressionAsString () const | |
QVariant expressionEditorData (QWidget *editor) const | |
Qt::ItemFlags flags (int column) const | |
App::Property * getFirstProperty () | |
const App::Property * getFirstProperty () const | |
const std::vector< App::Property * > & getPropertyData () const | |
bool hasAnyExpression () const | |
bool hasProperty (const App::Property *) const | |
void insertChild (int, PropertyItem *child) | |
bool isLinked () const | |
bool isReadOnly () const | |
virtual bool isSeparator () const | |
PropertyItem * parent () const | |
virtual void propertyBound () | |
QString propertyName () const | |
void removeChildren (int from, int to) | |
PropertyItem::removeChildren Deletes the children in the range of [from, to]. More... | |
bool removeProperty (const App::Property *) | |
void reset () | |
int row () const | |
bool setData (const QVariant &value) | |
void setDecimals (int) | |
virtual void setEditorData (QWidget *editor, const QVariant &data) const | |
void setExpressionEditorData (QWidget *editor, const QVariant &data) const | |
void setLinked (bool) | |
void setParent (PropertyItem *parent) | |
void setPropertyData (const std::vector< App::Property * > &) | |
Sets the current property objects. More... | |
void setPropertyName (const QString &) | |
void setPropertyValue (const QString &) | |
void setReadOnly (bool) | |
PropertyItem * takeChild (int) | |
PropertyItem::takeChild Removes the child at index row but doesn't delete it. More... | |
bool testStatus (App::Property::Status pos) const | |
void updateData () | |
~PropertyItem () | |
![]() | |
virtual bool apply () | |
virtual bool apply (const std::string &propName) | |
bool autoApply () const | |
ExpressionBinding () | |
QPixmap getIcon (const char *name, const QSize &size) const | |
bool hasExpression () const | |
bool isBound () const | |
void setAutoApply (bool value) | |
~ExpressionBinding () | |
Protected Member Functions | |
virtual QVariant decoration (const QVariant &) const | |
virtual QVariant displayName () const | |
virtual void initialize () | |
virtual void onChange () | |
PropertyItem () | |
virtual void setValue (const QVariant &) | |
virtual QVariant toolTip (const App::Property *) const | |
virtual QVariant toString (const QVariant &) const | |
virtual QVariant value (const App::Property *) const | |
![]() | |
void expressionChange (const App::ObjectIdentifier &id) | |
std::string getEscapedExpressionString () const | |
boost::shared_ptr< App::Expression > getExpression () const | |
std::string getExpressionString (bool no_throw=true) const | |
const App::ObjectIdentifier & getPath () const | |
virtual void setExpression (boost::shared_ptr< App::Expression > expr) | |
Protected Attributes | |
QList< PropertyItem * > childItems | |
bool cleared | |
QString displayText | |
bool linked | |
PropertyItem * parentItem | |
int precision | |
std::vector< App::Property * > propertyItems | |
QString propName | |
bool readonly | |
![]() | |
boost::signals2::scoped_connection connection | |
QPalette defaultPalette | |
int iconHeight | |
QLabel * iconLabel | |
bool m_autoApply | |
Constructor & Destructor Documentation
◆ ~PropertyItem()
PropertyItem::~PropertyItem | ( | ) |
◆ PropertyItem()
|
protected |
References Base::UnitsApi::getDecimals().
Member Function Documentation
◆ appendChild()
void PropertyItem::appendChild | ( | PropertyItem * | child | ) |
◆ assignProperty()
|
virtual |
Referenced by Gui::PropertyEditor::PropertyModel::updateProperty().
◆ bind() [1/2]
|
virtual |
Reimplemented from Gui::ExpressionBinding.
References Gui::ExpressionBinding::bind().
◆ bind() [2/2]
|
virtual |
override the bind functions to ensure we issue the propertyBound() call, which is then overloaded by childs which like to be informed of a binding
Reimplemented from Gui::ExpressionBinding.
References Gui::ExpressionBinding::bind().
Referenced by SketcherGui::PropertyConstraintListItem::initialize().
◆ child()
PropertyItem * PropertyItem::child | ( | int | row | ) |
References value().
Referenced by Gui::PropertyEditor::PropertyModel::appendProperty(), Gui::PropertyEditor::PropertyModel::index(), Gui::PropertyEditor::PropertyModel::removeProperty(), Gui::PropertyEditor::PropertyModel::updateProperty(), SketcherGui::PropertyConstraintListItem::value(), and Gui::PropertyEditor::PropertyPlacementItem::value().
◆ childCount()
int PropertyItem::childCount | ( | ) | const |
◆ columnCount()
int PropertyItem::columnCount | ( | ) | const |
Referenced by Gui::PropertyEditor::PropertyModel::columnCount().
◆ createEditor()
|
virtual |
Creates the appropriate editor for this item and sets the editor to the value of overrideValue().
Reimplemented in PartGui::PropertyEnumAttacherItem.
Referenced by Gui::PropertyEditor::PropertyItemDelegate::createEditor().
◆ createExpressionEditor()
QWidget * PropertyItem::createExpressionEditor | ( | QWidget * | parent, |
const QObject * | receiver, | ||
const char * | method | ||
) | const |
References Gui::ExpLineEdit::bind(), and Gui::ExpressionBinding::setAutoApply().
Referenced by Gui::PropertyEditor::PropertyItemDelegate::createEditor().
◆ data()
|
virtual |
Reimplemented in Gui::PropertyEditor::PropertyLinkItem.
References App::Property::LockDynamic, parent(), App::Property::PropDynamic, Gui::PropertyView::showAll(), and DraftVecUtils::toString().
Referenced by Gui::PropertyEditor::PropertyModel::data(), Gui::PropertyEditor::PropertyLinkItem::data(), ArchSchedule.CommandArchSchedule::IsActive(), Gui::PropertyEditor::PropertyModel::setData(), Gui::PropertyEditor::PropertyStringListItem::setValue(), Gui::PropertyEditor::PropertyFloatListItem::setValue(), Gui::PropertyEditor::PropertyIntegerListItem::setValue(), and Gui::PropertyEditor::PropertyMaterialListItem::setValue().
◆ decimals()
int PropertyItem::decimals | ( | ) | const |
References DraftVecUtils::precision().
Referenced by Gui::PropertyEditor::PropertyColorItem::setValue(), Gui::PropertyEditor::PropertyMaterialItem::setValue(), Gui::PropertyEditor::PropertyMaterialListItem::setValue(), Gui::PropertyEditor::PropertyPlacementItem::toolTip(), and Gui::PropertyEditor::PropertyFloatListItem::value().
◆ decoration()
|
protectedvirtual |
◆ displayName()
|
protectedvirtual |
◆ editorData()
|
virtual |
Reimplemented in PartGui::PropertyEnumAttacherItem.
Referenced by Gui::PropertyEditor::PropertyItemDelegate::setModelData().
◆ expressionAsString()
QString PropertyItem::expressionAsString | ( | ) | const |
Referenced by Gui::PropertyEditor::PropertyPlacementItem::value().
◆ expressionEditorData()
QVariant PropertyItem::expressionEditorData | ( | QWidget * | editor | ) | const |
Referenced by Gui::PropertyEditor::PropertyItemDelegate::setModelData().
◆ flags()
Qt::ItemFlags PropertyItem::flags | ( | int | column | ) | const |
Referenced by Gui::PropertyEditor::PropertyModel::flags().
◆ getFirstProperty() [1/2]
const App::Property * PropertyItem::getFirstProperty | ( | ) |
Referenced by PartGui::PropertyEnumAttacherItem::openTask().
◆ getFirstProperty() [2/2]
const App::Property* Gui::PropertyEditor::PropertyItem::getFirstProperty | ( | ) | const |
◆ getPropertyData()
const std::vector< App::Property * > & PropertyItem::getPropertyData | ( | ) | const |
◆ hasAnyExpression()
bool PropertyItem::hasAnyExpression | ( | ) | const |
References Gui::ExpressionBinding::hasExpression().
◆ hasProperty()
bool PropertyItem::hasProperty | ( | const App::Property * | prop | ) | const |
◆ initialize()
|
protectedvirtual |
Reimplemented in FemGui::PropertyFemMeshItem, SketcherGui::PropertyConstraintListItem, and MeshGui::PropertyMeshKernelItem.
◆ insertChild()
void PropertyItem::insertChild | ( | int | index, |
PropertyItem * | child | ||
) |
Referenced by Gui::PropertyEditor::PropertyModel::appendProperty().
◆ isLinked()
bool PropertyItem::isLinked | ( | ) | const |
◆ isReadOnly()
bool PropertyItem::isReadOnly | ( | ) | const |
◆ isSeparator()
|
virtual |
◆ onChange()
|
protectedvirtual |
Reimplemented from Gui::ExpressionBinding.
◆ parent()
PropertyItem * PropertyItem::parent | ( | ) | const |
◆ propertyBound()
|
virtual |
Reimplemented in Gui::PropertyEditor::PropertyVectorItem.
◆ propertyName()
QString PropertyItem::propertyName | ( | ) | const |
Referenced by PathScripts.PathSetupSheetGui.OpTaskPanel::accept(), Gui::PropertyEditor::PropertyModel::appendProperty(), Gui::PropertyEditor::PropertyModel::propertyIndexFromPath(), Gui::PropertyEditor::PropertyModel::propertyPathFromIndex(), and PathScripts.PathSetupSheetGui.OpTaskPanel::setupUi().
◆ removeChildren()
void PropertyItem::removeChildren | ( | int | from, |
int | to | ||
) |
PropertyItem::removeChildren Deletes the children in the range of [from, to].
Referenced by Gui::PropertyEditor::PropertyModel::removeRows().
◆ removeProperty()
bool PropertyItem::removeProperty | ( | const App::Property * | prop | ) |
References DraftVecUtils::find().
Referenced by Gui::PropertyEditor::PropertyModel::removeProperty().
◆ reset()
void PropertyItem::reset | ( | ) |
◆ row()
int PropertyItem::row | ( | ) | const |
Referenced by Gui::PropertyEditor::PropertyModel::parent().
◆ setData()
bool PropertyItem::setData | ( | const QVariant & | value | ) |
References parent().
Referenced by Gui::PropertyEditor::PropertyModel::setData().
◆ setDecimals()
void PropertyItem::setDecimals | ( | int | prec | ) |
◆ setEditorData()
|
virtual |
Reimplemented in Gui::PropertyEditor::PropertyAngleItem, and PartGui::PropertyEnumAttacherItem.
Referenced by Gui::PropertyEditor::PropertyItemDelegate::setEditorData().
◆ setExpressionEditorData()
void PropertyItem::setExpressionEditorData | ( | QWidget * | editor, |
const QVariant & | data | ||
) | const |
Referenced by Gui::PropertyEditor::PropertyItemDelegate::setEditorData().
◆ setLinked()
void PropertyItem::setLinked | ( | bool | l | ) |
Referenced by Gui::PropertyEditor::PropertyModel::buildUp().
◆ setParent()
void PropertyItem::setParent | ( | PropertyItem * | parent | ) |
Referenced by Gui::PropertyEditor::PropertyModel::appendProperty(), Gui::PropertyEditor::PropertyModel::buildUp(), SketcherGui::PropertyConstraintListItem::initialize(), FemGui::PropertyFemMeshItem::PropertyFemMeshItem(), Gui::PropertyEditor::PropertyMaterialItem::PropertyMaterialItem(), Gui::PropertyEditor::PropertyMaterialListItem::PropertyMaterialListItem(), Gui::PropertyEditor::PropertyMatrixItem::PropertyMatrixItem(), MeshGui::PropertyMeshKernelItem::PropertyMeshKernelItem(), Gui::PropertyEditor::PropertyPlacementItem::PropertyPlacementItem(), Gui::PropertyEditor::PropertyVectorDistanceItem::PropertyVectorDistanceItem(), Gui::PropertyEditor::PropertyVectorItem::PropertyVectorItem(), and takeChild().
◆ setPropertyData()
void PropertyItem::setPropertyData | ( | const std::vector< App::Property * > & | items | ) |
Sets the current property objects.
References App::PropertyContainer::isReadOnly().
Referenced by Gui::PropertyEditor::PropertyModel::appendProperty(), and Gui::PropertyEditor::PropertyModel::buildUp().
◆ setPropertyName()
void PropertyItem::setPropertyName | ( | const QString & | name | ) |
References femsolver.report::display().
Referenced by SketcherGui::PropertyConstraintListItem::initialize().
◆ setPropertyValue()
void PropertyItem::setPropertyValue | ( | const QString & | value | ) |
References Gui::Command::App, Base::Console(), Base::ConsoleSingleton::Error(), Base::Persistence::getClassTypeId(), App::PropertyContainer::getPropertyPrefix(), Base::BaseClass::isDerivedFrom(), App::PropertyContainer::isReadOnly(), and App::Property::ReadOnly.
Referenced by Gui::PropertyEditor::PropertyPlacementItem::setValue(), Gui::PropertyEditor::PropertyEnumItem::setValue(), Gui::PropertyEditor::PropertyStringListItem::setValue(), Gui::PropertyEditor::PropertyFloatListItem::setValue(), Gui::PropertyEditor::PropertyIntegerListItem::setValue(), Gui::PropertyEditor::PropertyColorItem::setValue(), Gui::PropertyEditor::PropertyMaterialItem::setValue(), Gui::PropertyEditor::PropertyMaterialListItem::setValue(), Gui::PropertyEditor::PropertyFileItem::setValue(), Gui::PropertyEditor::PropertyPathItem::setValue(), Gui::PropertyEditor::PropertyTransientFileItem::setValue(), and Gui::PropertyEditor::PropertyLinkItem::setValue().
◆ setReadOnly()
void PropertyItem::setReadOnly | ( | bool | ro | ) |
◆ setValue()
|
protectedvirtual |
Reimplemented in Gui::PropertyEditor::PropertyLinkItem, Gui::PropertyEditor::PropertyTransientFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyMaterialListItem, Gui::PropertyEditor::PropertyMaterialItem, Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyIntegerListItem, Gui::PropertyEditor::PropertyFloatListItem, Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyMatrixItem, Gui::PropertyEditor::PropertyVectorDistanceItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertyStringItem, FemGui::PropertyFemMeshItem, SketcherGui::PropertyConstraintListItem, and MeshGui::PropertyMeshKernelItem.
◆ takeChild()
PropertyItem * PropertyItem::takeChild | ( | int | row | ) |
PropertyItem::takeChild Removes the child at index row but doesn't delete it.
References setParent().
◆ testStatus()
bool PropertyItem::testStatus | ( | App::Property::Status | pos | ) | const |
◆ toolTip()
|
protectedvirtual |
Reimplemented in Gui::PropertyEditor::PropertyTransientFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyMaterialListItem, Gui::PropertyEditor::PropertyMaterialItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyMatrixItem, FemGui::PropertyFemMeshItem, and MeshGui::PropertyMeshKernelItem.
References App::Property::getDocumentation().
◆ toString()
|
protectedvirtual |
Reimplemented in Gui::PropertyEditor::PropertyLinkItem, Gui::PropertyEditor::PropertyMaterialListItem, Gui::PropertyEditor::PropertyMaterialItem, Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyIntegerListItem, Gui::PropertyEditor::PropertyFloatListItem, Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyMatrixItem, Gui::PropertyEditor::PropertyVectorDistanceItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyAngleItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyIntegerItem, and SketcherGui::PropertyConstraintListItem.
Referenced by Gui::PropertyEditor::PropertyIntegerItem::toString(), and Gui::PropertyEditor::PropertyIntegerConstraintItem::toString().
◆ updateData()
void PropertyItem::updateData | ( | ) |
References App::PropertyContainer::isReadOnly(), and App::Property::ReadOnly.
Referenced by PathScripts.PathJobDlg.JobCreate::exec_(), draftviewproviders.view_wire.ViewProviderWire::onChanged(), draftviewproviders.view_dimension.ViewProviderLinearDimension::onChanged(), draftviewproviders.view_dimension.ViewProviderAngularDimension::onChanged(), PathScripts.PathOpGui.TaskPanelPage::pageUpdateData(), PathScripts.PathSetupSheetGui.OpTaskPanel::setupUi(), Gui::PropertyEditor::PropertyEditor::updateEditorMode(), and Gui::PropertyEditor::PropertyModel::updateProperty().
◆ value()
|
protectedvirtual |
Reimplemented in Gui::PropertyEditor::PropertyLinkItem, Gui::PropertyEditor::PropertyTransientFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyMaterialListItem, Gui::PropertyEditor::PropertyMaterialItem, Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyIntegerListItem, Gui::PropertyEditor::PropertyFloatListItem, Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyMatrixItem, Gui::PropertyEditor::PropertyVectorDistanceItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertyStringItem, FemGui::PropertyFemMeshItem, SketcherGui::PropertyConstraintListItem, and MeshGui::PropertyMeshKernelItem.
Referenced by child(), Mod.PartDesign.WizardShaft.SegmentFunction.SegmentFunction::evaluate(), and Mod.PartDesign.WizardShaft.SegmentFunction.IntervalFunction::lowervalue().
Member Data Documentation
◆ childItems
|
protected |
◆ cleared
|
protected |
◆ displayText
|
protected |
◆ linked
|
protected |
◆ parentItem
|
protected |
◆ precision
|
protected |
◆ propertyItems
|
protected |
◆ propName
|
protected |
◆ readonly
|
protected |
The documentation for this class was generated from the following files:
- src/Gui/propertyeditor/PropertyItem.h
- src/Gui/propertyeditor/PropertyItem.cpp