QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
qgssublayersdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgssublayersdialog.h - dialog for selecting sublayers
3  ---------------------
4  begin : January 2009
5  copyright : (C) 2009 by Florian El Ahdab
6  email : felahdab at gmail dot com
7  ***************************************************************************
8  * *
9  * This program is free software; you can redistribute it and/or modify *
10  * it under the terms of the GNU General Public License as published by *
11  * the Free Software Foundation; either version 2 of the License, or *
12  * (at your option) any later version. *
13  * *
14  ***************************************************************************/
15 
16 #ifndef QGSSUBLAYERSDIALOG_H
17 #define QGSSUBLAYERSDIALOG_H
18 
19 #include <QDialog>
20 #include <ui_qgssublayersdialogbase.h>
21 #include "qgscontexthelp.h"
22 
23 
24 class GUI_EXPORT QgsSublayersDialog : public QDialog, private Ui::QgsSublayersDialogBase
25 {
26  Q_OBJECT
27  public:
28 
30  {
31  Ogr,
33  Vsifile
34  };
35 
36  QgsSublayersDialog( ProviderType providerType, QString name, QWidget* parent = 0, Qt::WFlags fl = 0 );
38 
39  void populateLayerTable( QStringList theList, QString delim = ":" );
40  // Returns list of selected layers, if there are more layers with the same name,
41  // geometry type is appended separated by semicolon, example: <layer>:<geometryType>
42  QStringList selectionNames();
43  QList<int> selectionIndexes();
44 
45  public slots:
46  void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
47  int exec();
48 
49  protected:
50  QString mName;
51  QStringList mSelectedSubLayers;
52 };
53 
54 #endif