17#ifndef QGSFIELDSITEM_H
18#define QGSFIELDSITEM_H
61 SIP_PYOBJECT __repr__();
63 QString str = QStringLiteral(
"<QgsFieldsItem: %1>" ).arg( sipCpp->path() );
64 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
70 QIcon
icon()
override;
109 QString mConnectionUri;
110 bool mCanRename =
false;
111 std::unique_ptr<QgsAbstractDatabaseProviderConnection::TableProperty> mTableProperty;
139 SIP_PYOBJECT __repr__();
141 QString str = QStringLiteral(
"<QgsFieldItem: %1>" ).arg( sipCpp->name() );
142 sipRes = PyUnicode_FromString( str.toUtf8().constData() );
146 QIcon
icon()
override;
Base class for all items in the model.
QgsDataItem(Qgis::BrowserItemType type, QgsDataItem *parent, const QString &name, const QString &path, const QString &providerKey=QString())
Constructor for QgsDataItem, with the specified parent item.
virtual QVector< QgsDataItem * > createChildren()
Create children.
QgsDataItem * parent() const
Gets item parent.
QString providerKey() const
Returns the provider key that created this item (e.g.
virtual bool equal(const QgsDataItem *other)
Returns true if this item is equal to another item (by testing item type and path).
QgsFieldItem(QgsDataItem *parent, const QgsField &field)
Constructor for QgsFieldItem, with the specified parent item and field.
QgsField field() const
Returns the field definition.
Encapsulate a field in an attribute table or data source.
QString tableName() const
Returns the table name.
QgsFieldsItem(QgsDataItem *parent, const QString &path, const QString &connectionUri, const QString &providerKey, const QString &schema, const QString &tableName)
Constructor for QgsFieldsItem, with the specified parent item.
QgsAbstractDatabaseProviderConnection::TableProperty * tableProperty() const
Returns the (possibly nullptr) properties of the table this fields belong to.
QString connectionUri() const
Returns the connection URI.
QgsVectorLayer * layer()
Creates and returns a (possibly nullptr) layer from the connection URI and schema/table information.
bool canRenameFields() const
Returns true if the connection supports renaming fields.
QString schema() const
Returns the schema name.
Represents a vector layer which manages a vector based dataset.
The TableProperty class represents a database table or view.