QGIS API Documentation  2.18.21-Las Palmas (9fba24a)
qgsmaplayerconfigwidgetfactory.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsmaplayerconfigwidgetfactoryfactory.h
3  --------------------------------------
4  Date : 9.7.2013
5  Copyright : (C) 2013 Matthias Kuhn
6  Email : matthias dot kuhn at gmx dot ch
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 QGSMAPLAYERCONFIGWIDGETFACTORY_H
17 #define QGSMAPLAYERCONFIGWIDGETFACTORY_H
18 
19 #include <QListWidgetItem>
20 
22 
29 {
30  public:
31 
34 
37 
40 
45  virtual QIcon icon() const { return mIcon; }
46 
51  void setIcon( const QIcon& icon ) { mIcon = icon; }
52 
58  virtual QString title() const { return mTitle; }
59 
66  void setTitle( const QString& title ) { mTitle = title; }
67 
72  virtual bool supportsStyleDock() const { return false; }
73 
78  void setSupportsStyleDock( bool supports ) { mSuppprtsDock = supports; }
79 
84  virtual bool supportLayerPropertiesDialog() const { return false; }
85 
90  void setSupportLayerPropertiesDialog( bool supports ) { mSuppprtsProperties = supports; }
91 
96  virtual bool supportsLayer( QgsMapLayer *layer ) const;
97 
107  virtual QgsMapLayerConfigWidget* createWidget( QgsMapLayer* layer, QgsMapCanvas *canvas, bool dockWidget = true, QWidget* parent = 0 ) const = 0;
108 
109  private:
110  QIcon mIcon;
111  QString mTitle;
112  bool mSuppprtsDock;
113  bool mSuppprtsProperties;
114 };
115 
116 #endif // QGSMAPLAYERCONFIGWIDGETFACTORY_H
A panel widget that can be shown in the map style dock.
Base class for all map layer types.
Definition: qgsmaplayer.h:49
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:109
void setSupportsStyleDock(bool supports)
Set support flag for style dock.
void setTitle(const QString &title)
Set the title for the interface.
virtual QString title() const
The title of the panel.
virtual bool supportsStyleDock() const
Flag if widget is supported for use in style dock.
void setIcon(const QIcon &icon)
Set the icon for the factory object.
virtual QIcon icon() const
The icon that will be shown in the UI for the panel.
void setSupportLayerPropertiesDialog(bool supports)
Set support flag for style dock.
virtual bool supportLayerPropertiesDialog() const
Flag if widget is supported for use in layer properties dialog.