QGIS API Documentation  2.14.0-Essen
qgsvectorlayerlabeling.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsvectorlayerlabeling.h
3  ---------------------
4  begin : September 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 #ifndef QGSVECTORLAYERLABELING_H
16 #define QGSVECTORLAYERLABELING_H
17 
18 class QDomDocument;
19 class QDomElement;
20 class QString;
21 
22 class QgsVectorLayer;
24 
33 {
34  public:
35 
37 
39  virtual QString type() const = 0;
40 
42  virtual QgsVectorLayerLabelProvider* provider( QgsVectorLayer* layer ) const = 0;
43 
45  virtual QDomElement save( QDomDocument& doc ) const = 0;
46 
47  // static stuff
48 
50  static QgsAbstractVectorLayerLabeling* create( const QDomElement& element );
51 };
52 
63 {
64  public:
65 
66  virtual QString type() const override;
67  virtual QgsVectorLayerLabelProvider* provider( QgsVectorLayer* layer ) const override;
68  virtual QDomElement save( QDomDocument& doc ) const override;
69 };
70 
71 #endif // QGSVECTORLAYERLABELING_H
The QgsVectorLayerLabelProvider class implements a label provider for vector layers.
virtual QDomElement save(QDomDocument &doc) const =0
Return labeling configuration as XML element.
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
Basic implementation of the labeling interface.
virtual QString type() const =0
Unique type string of the labeling configuration implementation.
Represents a vector layer which manages a vector based data sets.
virtual QgsVectorLayerLabelProvider * provider(QgsVectorLayer *layer) const =0
Factory for label provider implementation.