2013-05-29 01:31:09 +02:00
|
|
|
class QgsSublayersDialog : QDialog
|
|
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
|
|
#include <qgssublayersdialog.h>
|
|
|
|
%End
|
|
|
|
public:
|
2013-06-23 16:00:16 +02:00
|
|
|
|
2013-05-29 01:31:09 +02:00
|
|
|
enum ProviderType
|
|
|
|
{
|
|
|
|
Ogr,
|
|
|
|
Gdal,
|
|
|
|
Vsifile
|
|
|
|
};
|
|
|
|
|
2016-06-30 14:26:00 +02:00
|
|
|
//! 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;
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QgsSublayersDialog( ProviderType providerType, const QString &name, QWidget *parent /TransferThis/ = 0, const Qt::WindowFlags &fl = 0 );
|
2013-05-29 01:31:09 +02:00
|
|
|
~QgsSublayersDialog();
|
|
|
|
|
2016-06-30 14:26:00 +02:00
|
|
|
//! Populate the table with layers
|
|
|
|
//! @note added in 2.16
|
2017-05-01 16:42:33 +02:00
|
|
|
void populateLayerTable( const QgsSublayersDialog::LayerDefinitionList &list );
|
2016-06-30 14:26:00 +02:00
|
|
|
|
|
|
|
//! Returns list of selected layers
|
|
|
|
//! @note added in 2.16
|
|
|
|
QgsSublayersDialog::LayerDefinitionList selection();
|
|
|
|
|
2017-03-17 16:16:33 +01:00
|
|
|
//! 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;
|
|
|
|
|
2013-05-29 01:31:09 +02:00
|
|
|
public slots:
|
|
|
|
void on_buttonBox_helpRequested();
|
|
|
|
int exec();
|
|
|
|
};
|