QGIS API Documentation  2.12.0-Lyon
qgsdataitemproviderregistry.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsdataitemproviderregistry.h
3  --------------------------------------
4  Date : March 2015
5  Copyright : (C) 2015 by Martin Dobias
6  Email : wonder dot sk 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 QGSDATAITEMPROVIDERREGISTRY_H
17 #define QGSDATAITEMPROVIDERREGISTRY_H
18 
19 #include <QList>
20 
22 
29 class CORE_EXPORT QgsDataItemProviderRegistry
30 {
31  public:
32  static QgsDataItemProviderRegistry* instance();
33 
35 
37  QList<QgsDataItemProvider*> providers() const { return mProviders; }
38 
40  void addProvider( QgsDataItemProvider* provider );
41 
43  void removeProvider( QgsDataItemProvider* provider );
44 
45  private:
47 
49  QList<QgsDataItemProvider*> mProviders;
50 };
51 
52 #endif // QGSDATAITEMPROVIDERREGISTRY_H
This singleton class keeps a list of data item providers that may add items to the browser tree...
QList< QgsDataItemProvider * > providers() const
Get list of available providers.
This is the interface for those who want to add custom data items to the browser tree.