#include <PropertyModel.h>
Public Member Functions | |
QModelIndex | buddy (const QModelIndex &index) const |
void | buildUp (const std::map< std::string, std::vector< App::Property * > > &props) |
int | columnCount (const QModelIndex &parent=QModelIndex()) const |
QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const |
Qt::ItemFlags | flags (const QModelIndex &index) const |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
QModelIndex | parent (const QModelIndex &index) const |
QModelIndex | propertyIndexFromPath (const QStringList &) const |
PropertyModel (QObject *parent) | |
QStringList | propertyPathFromIndex (const QModelIndex &) const |
int | rowCount (const QModelIndex &parent=QModelIndex()) const |
bool | setData (const QModelIndex &idx, const QVariant &value, int role) |
bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole) |
virtual | ~PropertyModel () |
Definition at line 39 of file PropertyModel.h.
PropertyModel::PropertyModel | ( | QObject * | parent | ) |
Definition at line 38 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::create().
PropertyModel::~PropertyModel | ( | ) | [virtual] |
Definition at line 44 of file PropertyModel.cpp.
QModelIndex PropertyModel::buddy | ( | const QModelIndex & | index | ) | const |
Definition at line 49 of file PropertyModel.cpp.
void PropertyModel::buildUp | ( | const std::map< std::string, std::vector< App::Property * > > & | props | ) |
Definition at line 201 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::appendChild(), Gui::PropertyEditor::PropertySeparatorItem::create(), Base::Type::createInstanceByName(), Gui::PropertyEditor::PropertyItem::getClassTypeId(), App::Property::getEditorName(), App::Property::getGroup(), App::Property::getName(), Base::BaseClass::getTypeId(), group, Gui::PropertyEditor::PropertyItem::reset(), Gui::PropertyEditor::PropertyItem::setParent(), Gui::PropertyEditor::PropertyItem::setPropertyData(), and Gui::PropertyEditor::PropertyItem::setPropertyName().
Referenced by Gui::PropertyEditor::PropertyEditor::buildUp(), and Gui::PropertyEditor::PropertyEditor::commitData().
int PropertyModel::columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
Definition at line 56 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::columnCount().
QVariant PropertyModel::data | ( | const QModelIndex & | index, | |
int | role = Qt::DisplayRole | |||
) | const |
Definition at line 65 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::data().
Referenced by setData().
Qt::ItemFlags PropertyModel::flags | ( | const QModelIndex & | index | ) | const |
Definition at line 98 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::flags().
QVariant PropertyModel::headerData | ( | int | section, | |
Qt::Orientation | orientation, | |||
int | role = Qt::DisplayRole | |||
) | const |
Definition at line 146 of file PropertyModel.cpp.
References Sketcher::Horizontal.
QModelIndex PropertyModel::index | ( | int | row, | |
int | column, | |||
const QModelIndex & | parent = QModelIndex() | |||
) | const |
Definition at line 104 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::child().
Referenced by propertyIndexFromPath().
QModelIndex PropertyModel::parent | ( | const QModelIndex & | index | ) | const |
Definition at line 120 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::parent(), and Gui::PropertyEditor::PropertyItem::row().
Referenced by propertyIndexFromPath().
QModelIndex PropertyModel::propertyIndexFromPath | ( | const QStringList & | path | ) | const |
Definition at line 182 of file PropertyModel.cpp.
References index(), parent(), Gui::PropertyEditor::PropertyItem::propertyName(), and rowCount().
Referenced by Gui::PropertyEditor::PropertyEditor::buildUp().
QStringList PropertyModel::propertyPathFromIndex | ( | const QModelIndex & | index | ) | const |
Definition at line 165 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::isSeparator(), Gui::PropertyEditor::PropertyItem::parent(), and Gui::PropertyEditor::PropertyItem::propertyName().
Referenced by Gui::PropertyEditor::PropertyEditor::buildUp().
int PropertyModel::rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const |
Definition at line 134 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::childCount().
Referenced by propertyIndexFromPath().
bool PropertyModel::setData | ( | const QModelIndex & | idx, | |
const QVariant & | value, | |||
int | role | |||
) |
Definition at line 74 of file PropertyModel.cpp.
References Gui::PropertyEditor::PropertyItem::data(), data(), and Gui::PropertyEditor::PropertyItem::setData().
bool PropertyModel::setHeaderData | ( | int | section, | |
Qt::Orientation | orientation, | |||
const QVariant & | value, | |||
int | role = Qt::EditRole | |||
) |
Definition at line 160 of file PropertyModel.cpp.