#include <PropertyItem.h>
Public Member Functions | |
void | appendChild (PropertyItem *child) |
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(). | |
QVariant | data (int column, int role) const |
virtual QVariant | editorData (QWidget *editor) const |
Qt::ItemFlags | flags (int column) const |
const std::vector < App::Property * > & | getPropertyData () const |
virtual Base::Type | getTypeId (void) const |
bool | isReadOnly () const |
virtual bool | isSeparator () const |
PropertyItem * | parent () const |
QString | propertyName () const |
void | reset () |
int | row () const |
bool | setData (const QVariant &value) |
virtual void | setEditorData (QWidget *editor, const QVariant &data) const |
void | setParent (PropertyItem *parent) |
void | setPropertyData (const std::vector< App::Property * > &) |
Sets the current property objects. | |
void | setPropertyName (const QString &) |
void | setPropertyValue (const QString &) |
void | setReadOnly (bool) |
~PropertyItem () | |
Static Public Member Functions | |
static void * | create (void) |
static Base::Type | getClassTypeId (void) |
static void | init (void) |
Protected Member Functions | |
virtual QVariant | decoration (const App::Property *) const |
PropertyItem () | |
QString | pythonIdentifier (const App::Property *) const |
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 |
Definition at line 47 of file PropertyItem.h.
PropertyItem::~PropertyItem | ( | ) |
Definition at line 62 of file PropertyItem.cpp.
PropertyItem::PropertyItem | ( | ) | [protected] |
Definition at line 58 of file PropertyItem.cpp.
void PropertyItem::appendChild | ( | PropertyItem * | child | ) |
Definition at line 101 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyModel::buildUp(), Gui::PropertyEditor::PropertyDoubleVectorItem::PropertyDoubleVectorItem(), MeshGui::PropertyMeshKernelItem::PropertyMeshKernelItem(), Gui::PropertyEditor::PropertyPlacementItem::PropertyPlacementItem(), and Gui::PropertyEditor::PropertyVectorItem::PropertyVectorItem().
PropertyItem * PropertyItem::child | ( | int | row | ) |
Definition at line 106 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyModel::index().
int PropertyItem::childCount | ( | ) | const |
Definition at line 111 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyModel::rowCount().
int PropertyItem::columnCount | ( | ) | const |
Definition at line 116 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyModel::columnCount().
void * Gui::PropertyEditor::PropertyItem::create | ( | void | ) | [static] |
Reimplemented from Base::BaseClass.
Reimplemented in Gui::PropertyEditor::PropertyStringItem, Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertySeparatorItem, Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyAngleItem, Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyDoubleVectorItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyTransientFileItem, and MeshGui::PropertyMeshKernelItem.
Definition at line 56 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyModel::PropertyModel().
QWidget * PropertyItem::createEditor | ( | QWidget * | parent, | |
const QObject * | receiver, | |||
const char * | method | |||
) | const [virtual] |
Creates the appropriate editor for this item and sets the editor to the value of overrideValue().
Definition at line 185 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyItemDelegate::createEditor().
QVariant PropertyItem::data | ( | int | column, | |
int | role | |||
) | const |
Definition at line 236 of file PropertyItem.cpp.
References decoration(), parent(), propertyName(), toolTip(), toString(), and value().
Referenced by Gui::PropertyEditor::PropertyModel::data(), Gui::PropertyEditor::PropertyModel::setData(), and Gui::PropertyEditor::PropertyStringItem::setValue().
QVariant PropertyItem::decoration | ( | const App::Property * | ) | const [protected, virtual] |
Reimplemented in Gui::PropertyEditor::PropertyColorItem.
Definition at line 136 of file PropertyItem.cpp.
Referenced by data().
QVariant PropertyItem::editorData | ( | QWidget * | editor | ) | const [virtual] |
Definition at line 194 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyItemDelegate::setModelData().
Qt::ItemFlags PropertyItem::flags | ( | int | column | ) | const |
Definition at line 298 of file PropertyItem.cpp.
References isReadOnly().
Referenced by Gui::PropertyEditor::PropertyModel::flags().
Base::Type Gui::PropertyEditor::PropertyItem::getClassTypeId | ( | void | ) | [static] |
Reimplemented from Base::BaseClass.
Reimplemented in Gui::PropertyEditor::PropertyStringItem, Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertySeparatorItem, Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyAngleItem, Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyDoubleVectorItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyTransientFileItem, and MeshGui::PropertyMeshKernelItem.
Definition at line 56 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyModel::buildUp(), and pythonIdentifier().
const std::vector< App::Property * > & PropertyItem::getPropertyData | ( | void | ) | const |
Definition at line 86 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyAngleItem::setEditorData(), Gui::PropertyEditor::PropertyFloatItem::toString(), and MeshGui::PropertyMeshKernelItem::value().
Base::Type Gui::PropertyEditor::PropertyItem::getTypeId | ( | void | ) | const [virtual] |
Reimplemented from Base::BaseClass.
Reimplemented in Gui::PropertyEditor::PropertyStringItem, Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertySeparatorItem, Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyAngleItem, Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyDoubleVectorItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyTransientFileItem, and MeshGui::PropertyMeshKernelItem.
Definition at line 56 of file PropertyItem.cpp.
void Gui::PropertyEditor::PropertyItem::init | ( | void | ) | [static] |
Reimplemented from Base::BaseClass.
Reimplemented in Gui::PropertyEditor::PropertyStringItem, Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertySeparatorItem, Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyAngleItem, Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyDoubleVectorItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyTransientFileItem, and MeshGui::PropertyMeshKernelItem.
Definition at line 56 of file PropertyItem.cpp.
bool PropertyItem::isReadOnly | ( | ) | const |
Definition at line 126 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyItemDelegate::createEditor(), and flags().
virtual bool Gui::PropertyEditor::PropertyItem::isSeparator | ( | ) | const [inline, virtual] |
Definition at line 64 of file PropertyItem.h.
Referenced by Gui::PropertyEditor::PropertyModel::propertyPathFromIndex().
PropertyItem * PropertyItem::parent | ( | ) | const |
Definition at line 96 of file PropertyItem.cpp.
Referenced by data(), Gui::PropertyEditor::PropertyModel::parent(), Gui::PropertyEditor::PropertyModel::propertyPathFromIndex(), pythonIdentifier(), setData(), setPropertyData(), and setPropertyValue().
QString PropertyItem::propertyName | ( | ) | const |
Definition at line 199 of file PropertyItem.cpp.
Referenced by data(), Gui::PropertyEditor::PropertyModel::propertyIndexFromPath(), and Gui::PropertyEditor::PropertyModel::propertyPathFromIndex().
QString PropertyItem::pythonIdentifier | ( | const App::Property * | prop | ) | const [protected] |
Definition at line 155 of file PropertyItem.cpp.
References App::GetApplication(), Gui::ViewProviderDocumentObject::getClassTypeId(), App::PropertyContainer::getClassTypeId(), getClassTypeId(), App::Property::getContainer(), App::DocumentObject::getDocument(), App::PropertyContainer::getName(), App::DocumentObject::getNameInDocument(), App::PropertyContainer::getTypeId(), Base::Type::isDerivedFrom(), and parent().
Referenced by setPropertyValue().
void PropertyItem::reset | ( | ) |
Definition at line 67 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyModel::buildUp().
int PropertyItem::row | ( | ) | const |
Definition at line 307 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyModel::parent().
bool PropertyItem::setData | ( | const QVariant & | value | ) |
Definition at line 279 of file PropertyItem.cpp.
References parent(), and setValue().
Referenced by Gui::PropertyEditor::PropertyModel::setData().
void PropertyItem::setEditorData | ( | QWidget * | editor, | |
const QVariant & | data | |||
) | const [virtual] |
Reimplemented in Gui::PropertyEditor::PropertyAngleItem.
Definition at line 190 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyItemDelegate::setEditorData().
void PropertyItem::setParent | ( | PropertyItem * | parent | ) |
Definition at line 91 of file PropertyItem.cpp.
Referenced by Gui::PropertyEditor::PropertyModel::buildUp(), Gui::PropertyEditor::PropertyDoubleVectorItem::PropertyDoubleVectorItem(), MeshGui::PropertyMeshKernelItem::PropertyMeshKernelItem(), Gui::PropertyEditor::PropertyPlacementItem::PropertyPlacementItem(), and Gui::PropertyEditor::PropertyVectorItem::PropertyVectorItem().
void PropertyItem::setPropertyData | ( | const std::vector< App::Property * > & | items | ) |
Sets the current property objects.
Definition at line 73 of file PropertyItem.cpp.
References App::PropertyContainer::isReadOnly(), parent(), and setReadOnly().
Referenced by Gui::PropertyEditor::PropertyModel::buildUp().
void PropertyItem::setPropertyName | ( | const QString & | name | ) |
Definition at line 206 of file PropertyItem.cpp.
References upper().
Referenced by Gui::PropertyEditor::PropertyModel::buildUp(), Gui::PropertyEditor::PropertyDoubleVectorItem::PropertyDoubleVectorItem(), MeshGui::PropertyMeshKernelItem::PropertyMeshKernelItem(), Gui::PropertyEditor::PropertyPlacementItem::PropertyPlacementItem(), and Gui::PropertyEditor::PropertyVectorItem::PropertyVectorItem().
void PropertyItem::setPropertyValue | ( | const QString & | value | ) |
Definition at line 224 of file PropertyItem.cpp.
References macros::cmd, Gui::Application::Instance, App::PropertyContainer::isReadOnly(), parent(), pythonIdentifier(), and Gui::Application::runPythonCode().
Referenced by Gui::PropertyEditor::PropertyTransientFileItem::setValue(), Gui::PropertyEditor::PropertyPathItem::setValue(), Gui::PropertyEditor::PropertyFileItem::setValue(), Gui::PropertyEditor::PropertyColorItem::setValue(), Gui::PropertyEditor::PropertyStringListItem::setValue(), Gui::PropertyEditor::PropertyEnumItem::setValue(), Gui::PropertyEditor::PropertyPlacementItem::setValue(), Gui::PropertyEditor::PropertyDoubleVectorItem::setValue(), Gui::PropertyEditor::PropertyVectorItem::setValue(), Gui::PropertyEditor::PropertyBoolItem::setValue(), Gui::PropertyEditor::PropertyFloatConstraintItem::setValue(), Gui::PropertyEditor::PropertyUnitItem::setValue(), Gui::PropertyEditor::PropertyFloatItem::setValue(), Gui::PropertyEditor::PropertyIntegerConstraintItem::setValue(), Gui::PropertyEditor::PropertyIntegerItem::setValue(), Gui::PropertyEditor::PropertyFontItem::setValue(), and Gui::PropertyEditor::PropertyStringItem::setValue().
void PropertyItem::setReadOnly | ( | bool | ro | ) |
Definition at line 121 of file PropertyItem.cpp.
Referenced by MeshGui::PropertyMeshKernelItem::PropertyMeshKernelItem(), Gui::PropertyEditor::PropertyPlacementItem::PropertyPlacementItem(), and setPropertyData().
void PropertyItem::setValue | ( | const QVariant & | ) | [protected, virtual] |
Reimplemented in Gui::PropertyEditor::PropertyStringItem, Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyDoubleVectorItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyTransientFileItem, and MeshGui::PropertyMeshKernelItem.
Definition at line 151 of file PropertyItem.cpp.
Referenced by setData().
QVariant PropertyItem::toolTip | ( | const App::Property * | prop | ) | const [protected, virtual] |
Reimplemented in Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyTransientFileItem, and MeshGui::PropertyMeshKernelItem.
Definition at line 131 of file PropertyItem.cpp.
References App::Property::getDocumentation().
Referenced by data().
QVariant PropertyItem::toString | ( | const QVariant & | prop | ) | const [protected, virtual] |
Reimplemented in Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyAngleItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyDoubleVectorItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyStringListItem, and Gui::PropertyEditor::PropertyColorItem.
Definition at line 141 of file PropertyItem.cpp.
Referenced by data().
QVariant PropertyItem::value | ( | const App::Property * | ) | const [protected, virtual] |
Reimplemented in Gui::PropertyEditor::PropertyStringItem, Gui::PropertyEditor::PropertyFontItem, Gui::PropertyEditor::PropertyIntegerItem, Gui::PropertyEditor::PropertyIntegerConstraintItem, Gui::PropertyEditor::PropertyFloatItem, Gui::PropertyEditor::PropertyUnitItem, Gui::PropertyEditor::PropertyFloatConstraintItem, Gui::PropertyEditor::PropertyBoolItem, Gui::PropertyEditor::PropertyVectorItem, Gui::PropertyEditor::PropertyDoubleVectorItem, Gui::PropertyEditor::PropertyPlacementItem, Gui::PropertyEditor::PropertyEnumItem, Gui::PropertyEditor::PropertyStringListItem, Gui::PropertyEditor::PropertyColorItem, Gui::PropertyEditor::PropertyFileItem, Gui::PropertyEditor::PropertyPathItem, Gui::PropertyEditor::PropertyTransientFileItem, and MeshGui::PropertyMeshKernelItem.
Definition at line 146 of file PropertyItem.cpp.
Referenced by data().