/usr/include/qgis/qgssublayersdialog.h is in libqgis-dev 2.18.17+dfsg-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 | /***************************************************************************
qgssublayersdialog.h - dialog for selecting sublayers
---------------------
begin : January 2009
copyright : (C) 2009 by Florian El Ahdab
email : felahdab at gmail dot com
***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
***************************************************************************/
#ifndef QGSSUBLAYERSDIALOG_H
#define QGSSUBLAYERSDIALOG_H
#include <QDialog>
#include <ui_qgssublayersdialogbase.h>
#include "qgscontexthelp.h"
/** \ingroup gui
* \class QgsSublayersDialog
*/
class GUI_EXPORT QgsSublayersDialog : public QDialog, private Ui::QgsSublayersDialogBase
{
Q_OBJECT
public:
enum ProviderType
{
Ogr,
Gdal,
Vsifile
};
//! A structure that defines layers for the purpose of this dialog
//! @note added in 2.16
typedef struct LayerDefinition
{
LayerDefinition() : layerId( -1 ), count( -1 ) {}
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)
} LayerDefinition;
//! List of layer definitions for the purpose of this dialog
//! @note added in 2.16
typedef QList<LayerDefinition> LayerDefinitionList;
QgsSublayersDialog( ProviderType providerType, const QString& name, QWidget* parent = nullptr, const Qt::WindowFlags& fl = nullptr );
~QgsSublayersDialog();
//! Populate the table with layers
//! @note added in 2.16
void populateLayerTable( const LayerDefinitionList& list );
//! Returns list of selected layers
//! @note added in 2.16
LayerDefinitionList selection();
//! @deprecated since 2.16 - use other populateLayerTable() variant
Q_DECL_DEPRECATED void populateLayerTable( const QStringList& theList, const QString& delim = ":" );
//! @deprecated since 2.16 - use selection()
Q_DECL_DEPRECATED QStringList selectionNames();
//! @deprecated since 2.16 - use selection()
Q_DECL_DEPRECATED QList<int> selectionIndexes();
public slots:
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
int exec();
protected:
QString mName;
QStringList mSelectedSubLayers;
bool mShowCount; //!< whether to show number of features in the table
bool mShowType; //!< whether to show type in the table
};
#endif
|