QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsProviderSublayerDialogModel Class Reference

A model for representing the sublayers present in a URI for the QgsProviderSublayersDialog. More...

#include <qgsprovidersublayersdialog.h>

Inheritance diagram for QgsProviderSublayerDialogModel:
Inheritance graph
[legend]

Public Member Functions

 QgsProviderSublayerDialogModel (QObject *parent=nullptr)
 Constructor.
 
QVariant data (const QModelIndex &index, int role) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
void setGeometryTypesResolved (bool resolved)
 Sets whether geometry types are resolved.
 
- Public Member Functions inherited from QgsProviderSublayerModel
 QgsProviderSublayerModel (QObject *parent=nullptr)
 Constructor for QgsProviderSublayerModel, with the specified parent object.
 
void addNonLayerItem (const QgsProviderSublayerModel::NonLayerItem &item)
 Adds a non-layer item (e.g.
 
int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
QVariant data (const QModelIndex &index, int role) const override
 
Qt::ItemFlags flags (const QModelIndex &index) const override
 
QVariant headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override
 
QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
QgsProviderSublayerModel::NonLayerItem indexToNonLayerItem (const QModelIndex &index) const
 Returns the non layer item corresponding to the given index.
 
QgsProviderSublayerDetails indexToSublayer (const QModelIndex &index) const
 Returns the sublayer corresponding to the given index.
 
QModelIndex parent (const QModelIndex &index) const override
 
int rowCount (const QModelIndex &parent) const override
 
void setSublayerDetails (const QList< QgsProviderSublayerDetails > &details)
 Sets the sublayer details to show in the model.
 
QList< QgsProviderSublayerDetailssublayerDetails () const
 Returns the sublayer details shown in the model.
 

Additional Inherited Members

- Public Types inherited from QgsProviderSublayerModel
enum class  Column : int { Name = 0 , Description = 1 }
 Model columns. More...
 
enum class  Role : int {
  ProviderKey = Qt::UserRole + 1 , LayerType , Uri , Name ,
  Description , Path , FeatureCount , WkbType ,
  GeometryColumnName , LayerNumber , IsNonLayerItem , NonLayerItemType ,
  Flags
}
 Custom model roles. More...
 
- Protected Attributes inherited from QgsProviderSublayerModel
std::unique_ptr< QgsProviderSublayerModelGroup > mRootNode
 
QList< QgsProviderSublayerDetailsmSublayers
 Sublayer list.
 

Detailed Description

A model for representing the sublayers present in a URI for the QgsProviderSublayersDialog.

Since
QGIS 3.30

Definition at line 39 of file qgsprovidersublayersdialog.h.

Constructor & Destructor Documentation

◆ QgsProviderSublayerDialogModel()

QgsProviderSublayerDialogModel::QgsProviderSublayerDialogModel ( QObject *  parent = nullptr)

Constructor.

Definition at line 33 of file qgsprovidersublayersdialog.cpp.

Member Function Documentation

◆ data()

QVariant QgsProviderSublayerDialogModel::data ( const QModelIndex &  index,
int  role 
) const
override

Definition at line 38 of file qgsprovidersublayersdialog.cpp.

◆ flags()

Qt::ItemFlags QgsProviderSublayerDialogModel::flags ( const QModelIndex &  index) const
override

Definition at line 88 of file qgsprovidersublayersdialog.cpp.

◆ setGeometryTypesResolved()

void QgsProviderSublayerDialogModel::setGeometryTypesResolved ( bool  resolved)

Sets whether geometry types are resolved.

Definition at line 109 of file qgsprovidersublayersdialog.cpp.


The documentation for this class was generated from the following files: