|
Quantum GIS API Documentation
master-ce49b66
|
#include <qgsattributeeditor.h>
Collaboration diagram for QgsAttributeEditor:Public Slots | |
| void | loadPixmap (const QString &) |
| void | loadUrl (const QString &) |
| void | selectDate () |
| void | selectFileName () |
| void | updateColor () |
| void | updateUrl () |
Public Member Functions | |
| QgsAttributeEditor (QObject *parent, QgsVectorLayer *vl=0, int idx=-1) | |
Static Public Member Functions | |
| static QWidget * | createAttributeEditor (QWidget *parent, QWidget *editor, QgsVectorLayer *vl, int idx, const QVariant &value, QMap< int, QWidget * > &proxyWidgets) |
| Creates or prepares a attributre editor widget. | |
| static QWidget * | createAttributeEditor (QWidget *parent, QWidget *editor, QgsVectorLayer *vl, int idx, const QVariant &value) |
| Creates or prepares a attributre editor widget. | |
| static QWidget * | createWidgetFromDef (const QgsAttributeEditorElement *widgetDef, QWidget *parent, QgsVectorLayer *vl, QgsAttributes &attrs, QMap< int, QWidget * > &proxyWidgets, bool createGroupBox) |
| Creates a widget form a QgsAttributeEditorElement definition. | |
| static bool | retrieveValue (QWidget *widget, QgsVectorLayer *vl, int idx, QVariant &value) |
| static bool | setValue (QWidget *widget, QgsVectorLayer *vl, int idx, const QVariant &value) |
Static Private Member Functions | |
| static QComboBox * | comboBox (QWidget *editor, QWidget *parent) |
| static QListWidget * | listWidget (QWidget *editor, QWidget *parent) |
Private Attributes | |
| int | mIdx |
| QgsVectorLayer * | mLayer |
Definition at line 33 of file qgsattributeeditor.h.
| QgsAttributeEditor::QgsAttributeEditor | ( | QObject * | parent, |
| QgsVectorLayer * | vl = 0, |
||
| int | idx = -1 |
||
| ) | [inline] |
Definition at line 38 of file qgsattributeeditor.h.
Referenced by createAttributeEditor().
| QComboBox * QgsAttributeEditor::comboBox | ( | QWidget * | editor, |
| QWidget * | parent | ||
| ) | [static, private] |
Definition at line 226 of file qgsattributeeditor.cpp.
Referenced by createAttributeEditor().
| QWidget * QgsAttributeEditor::createAttributeEditor | ( | QWidget * | parent, |
| QWidget * | editor, | ||
| QgsVectorLayer * | vl, | ||
| int | idx, | ||
| const QVariant & | value, | ||
| QMap< int, QWidget * > & | proxyWidgets | ||
| ) | [static] |
Creates or prepares a attributre editor widget.
| parent | The parent object |
| editor | The widget to prepare. Set to null if it should be generated |
| vl | The vector layer to use as data source |
| idx | The field index this widget refers to |
| value | the value to initiate this widget with |
| proxyWidgets | an array of widgets, which will act as a value proxy if the same field is inserted multiple times |
Definition at line 254 of file qgsattributeeditor.cpp.
References QgsStringRelay::appendProxy(), QgsFeature::attribute(), QgsVectorLayer::Calendar, QgsCategorizedSymbolRendererV2::categories(), QgsVectorLayer::CheckBox, QgsVectorLayer::Classification, QgsVectorLayer::Color, comboBox(), QgsVectorLayer::dataProvider(), QgsVectorLayer::dateFormat(), QgsVectorLayer::DialRange, QgsVectorLayer::EditRange, QgsVectorLayer::editType(), QgsVectorLayer::Enumeration, QgsVectorDataProvider::enumValues(), QgsExpression::evaluate(), QgsVectorLayer::fieldNameIndex(), QgsVectorLayer::FileName, QgsVectorLayer::getFeatures(), QgsExpression::hasParserError(), QgsVectorLayer::Hidden, QgsVectorLayer::Immutable, QgsMapLayerRegistry::instance(), QgsNetworkAccessManager::instance(), QgsVectorLayer::LineEdit, listWidget(), loadPixmap(), loadUrl(), QgsVectorLayer::ValueRelationData::mAllowMulti, QgsVectorLayer::ValueRelationData::mAllowNull, QgsMapLayerRegistry::mapLayer(), MathUtils::max(), QgsVectorLayer::ValueRelationData::mFilterExpression, MathUtils::min(), QgsVectorLayer::ValueRelationData::mKey, QgsVectorLayer::ValueRelationData::mLayer, QgsVectorLayer::RangeData::mMax, QgsVectorLayer::RangeData::mMin, QgsVectorLayer::ValueRelationData::mOrderByValue, QgsVectorLayer::RangeData::mStep, QgsVectorLayer::ValueRelationData::mValue, QgsExpression::needsGeometry(), QgsFeatureIterator::nextFeature(), QgsFeatureRequest::NoFlags, QgsFeatureRequest::NoGeometry, QgsVectorLayer::pendingFields(), QgsVectorLayer::Photo, QgsExpression::prepare(), QgsAttributeEditor(), QgsVectorLayer::range(), QgsExpression::referencedColumns(), QgsVectorLayer::rendererV2(), selectDate(), selectFileName(), setValue(), QgsVectorLayer::SliderRange, QgsVectorLayer::TextEdit, tr, QgsField::type(), QgsVectorDataProvider::uniqueValues(), QgsVectorLayer::UniqueValues, QgsVectorLayer::UniqueValuesEditable, updateColor(), updateUrl(), QgsVectorLayer::UuidGenerator, QgsVectorLayer::ValueMap, QgsVectorLayer::valueMap(), QgsVectorLayer::ValueRelation, QgsVectorLayer::valueRelation(), and QgsVectorLayer::WebView.
Referenced by createAttributeEditor(), QgsFormAnnotationItem::createDesignerWidget(), QgsAttributeTableDelegate::createEditor(), createWidgetFromDef(), and QgsAttributeDialog::QgsAttributeDialog().
| QWidget * QgsAttributeEditor::createAttributeEditor | ( | QWidget * | parent, |
| QWidget * | editor, | ||
| QgsVectorLayer * | vl, | ||
| int | idx, | ||
| const QVariant & | value | ||
| ) | [static] |
Creates or prepares a attributre editor widget.
| parent | The parent object |
| editor | The widget to prepare. Set to null if it should be generated |
| vl | The vector layer to use as data source |
| idx | The field index this widget refers to |
| value | the value to initiate this widget with |
Definition at line 248 of file qgsattributeeditor.cpp.
References createAttributeEditor().
| QWidget * QgsAttributeEditor::createWidgetFromDef | ( | const QgsAttributeEditorElement * | widgetDef, |
| QWidget * | parent, | ||
| QgsVectorLayer * | vl, | ||
| QgsAttributes & | attrs, | ||
| QMap< int, QWidget * > & | proxyWidgets, | ||
| bool | createGroupBox | ||
| ) | [static] |
Creates a widget form a QgsAttributeEditorElement definition.
Will recursively generate containers and widgets.
| widgetDef | The definition for the widget |
| parent | The parent object |
| vl | The vector layer to use as data source |
| attrs | Attributes for the current feature. |
| proxyWidgets | An array of widgets, which will act as a value proxy if the same field is inserted multiple times |
| createGroupBox | If the element is a container, should a GroupBox be created to hold the children? |
Definition at line 1270 of file qgsattributeeditor.cpp.
References QgsAttributeEditorElement::AeTypeContainer, QgsAttributeEditorElement::AeTypeField, QgsVectorLayer::attributeDisplayName(), QgsAttributeEditorContainer::children(), createAttributeEditor(), QgsVectorLayer::editType(), QgsAttributeEditorField::idx(), QgsVectorLayer::Immutable, QgsVectorLayer::isEditable(), QgsAttributeEditorElement::name(), QgsDebugMsg, and QgsAttributeEditorElement::type().
Referenced by QgsAttributeDialog::QgsAttributeDialog().
| QListWidget * QgsAttributeEditor::listWidget | ( | QWidget * | editor, |
| QWidget * | parent | ||
| ) | [static, private] |
Definition at line 237 of file qgsattributeeditor.cpp.
Referenced by createAttributeEditor().
| void QgsAttributeEditor::loadPixmap | ( | const QString & | name | ) | [slot] |
Definition at line 133 of file qgsattributeeditor.cpp.
References mIdx, mLayer, size, and QgsVectorLayer::widgetSize().
Referenced by createAttributeEditor().
| void QgsAttributeEditor::loadUrl | ( | const QString & | url | ) | [slot] |
Definition at line 116 of file qgsattributeeditor.cpp.
Referenced by createAttributeEditor().
| bool QgsAttributeEditor::retrieveValue | ( | QWidget * | widget, |
| QgsVectorLayer * | vl, | ||
| int | idx, | ||
| QVariant & | value | ||
| ) | [static] |
Definition at line 844 of file qgsattributeeditor.cpp.
References QgsVectorLayer::checkedState(), QgsVectorLayer::Classification, QgsVectorLayer::dateFormat(), QgsVectorLayer::editType(), QgsVectorLayer::pendingFields(), QgsField::type(), QgsVectorLayer::UniqueValues, QgsVectorLayer::ValueMap, and QgsVectorLayer::ValueRelation.
Referenced by QgsAttributeDialog::accept(), and QgsAttributeTableDelegate::setModelData().
| void QgsAttributeEditor::selectDate | ( | ) | [slot] |
Definition at line 74 of file qgsattributeeditor.cpp.
References QgsFieldValidator::dateFormat(), and tr.
Referenced by createAttributeEditor().
| void QgsAttributeEditor::selectFileName | ( | ) | [slot] |
Definition at line 53 of file qgsattributeeditor.cpp.
References tr.
Referenced by createAttributeEditor().
| bool QgsAttributeEditor::setValue | ( | QWidget * | widget, |
| QgsVectorLayer * | vl, | ||
| int | idx, | ||
| const QVariant & | value | ||
| ) | [static] |
Definition at line 1061 of file qgsattributeeditor.cpp.
References QgsVectorLayer::Calendar, QgsVectorLayer::CheckBox, QgsVectorLayer::checkedState(), QgsVectorLayer::Classification, QgsVectorLayer::Color, QgsVectorLayer::dateFormat(), QgsVectorLayer::DialRange, QgsField::displayString(), QgsVectorLayer::EditRange, QgsVectorLayer::editType(), QgsVectorLayer::Enumeration, QgsVectorLayer::FileName, QgsVectorLayer::Hidden, QgsVectorLayer::Immutable, QgsVectorLayer::LineEdit, QgsVectorLayer::pendingFields(), QgsVectorLayer::Photo, QgsColorButton::setColor(), QgsFilterLineEdit::setNullValue(), QgsVectorLayer::SliderRange, QgsVectorLayer::TextEdit, QgsField::type(), QgsVectorLayer::UniqueValues, QgsVectorLayer::UniqueValuesEditable, QgsVectorLayer::UuidGenerator, QgsVectorLayer::ValueMap, QgsVectorLayer::ValueRelation, and QgsVectorLayer::WebView.
Referenced by createAttributeEditor(), and QgsAttributeTableDelegate::setEditorData().
| void QgsAttributeEditor::updateColor | ( | ) | [slot] |
Definition at line 190 of file qgsattributeeditor.cpp.
References QgsColorButton::color(), and QgsColorButton::setColor().
Referenced by createAttributeEditor().
| void QgsAttributeEditor::updateUrl | ( | ) | [slot] |
Definition at line 167 of file qgsattributeeditor.cpp.
Referenced by createAttributeEditor().
int QgsAttributeEditor::mIdx [private] |
Definition at line 92 of file qgsattributeeditor.h.
Referenced by loadPixmap().
QgsVectorLayer* QgsAttributeEditor::mLayer [private] |
Definition at line 91 of file qgsattributeeditor.h.
Referenced by loadPixmap().