QGIS/python/gui/qgssublayersdialog.sip
2017-03-17 17:19:51 +01:00

58 lines
1.7 KiB
Plaintext

class QgsSublayersDialog : QDialog
{
%TypeHeaderCode
#include <qgssublayersdialog.h>
%End
public:
enum ProviderType
{
Ogr,
Gdal,
Vsifile
};
//! A structure that defines layers for the purpose of this dialog
//! @note added in 2.16
struct LayerDefinition
{
LayerDefinition();
int layerId; //!< identifier of the layer (one unique layer id may have multiple types though)
QString layerName; //!< name of the layer (not necessarily unique)
int count; //!< number of features (might be unused)
QString type; //!< extra type depending on the use (e.g. geometry type for vector sublayers)
};
//! List of layer definitions for the purpose of this dialog
//! @note added in 2.16
typedef QList<QgsSublayersDialog::LayerDefinition> LayerDefinitionList;
QgsSublayersDialog( ProviderType providerType, const QString& name, QWidget* parent /TransferThis/ = 0, const Qt::WindowFlags& fl = 0 );
~QgsSublayersDialog();
//! Populate the table with layers
//! @note added in 2.16
void populateLayerTable( const QgsSublayersDialog::LayerDefinitionList& list );
//! Returns list of selected layers
//! @note added in 2.16
QgsSublayersDialog::LayerDefinitionList selection();
//! Set if we should display the add to group checkbox
//! @note added in 3.0
void setShowAddToGroupCheckbox( bool showAddToGroupCheckbox );
//! If we should display the add to group checkbox
//! @note added in 3.0
bool showAddToGroupCheckbox() const;
//! If we should add layers in a group
//! @note added in 3.0
bool addToGroupCheckbox() const;
public slots:
void on_buttonBox_helpRequested();
int exec();
};