QGIS API Documentation  3.2.0-Bonn (bc43194)
qgsrendererpropertiesdialog.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsrendererpropertiesdialog.h
3 
4  ---------------------
5  begin : December 2009
6  copyright : (C) 2009 by Martin Dobias
7  email : wonder dot sk at gmail dot com
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 
17 #ifndef QGSRENDERERV2PROPERTIESDIALOG_H
18 #define QGSRENDERERV2PROPERTIESDIALOG_H
19 
20 #include <QDialog>
21 #include "qgis.h"
22 
23 #include "ui_qgsrendererv2propsdialogbase.h"
24 
25 #include "qgsfeaturerequest.h"
26 #include "qgis_gui.h"
27 
28 class QKeyEvent;
29 
30 class QgsVectorLayer;
31 class QgsStyle;
32 class QgsSymbol;
33 class QgsPaintEffect;
34 class QgsRendererWidget;
35 class QgsMapCanvas;
36 
41 class GUI_EXPORT QgsRendererPropertiesDialog : public QDialog, private Ui::QgsRendererPropsDialogBase
42 {
43  Q_OBJECT
44 
45  public:
46 
55  QgsRendererPropertiesDialog( QgsVectorLayer *layer, QgsStyle *style, bool embedded = false, QWidget *parent SIP_TRANSFERTHIS = nullptr );
56  ~QgsRendererPropertiesDialog() override;
57 
64  void setMapCanvas( QgsMapCanvas *canvas );
65 
71  void setDockMode( bool dockMode );
72 
73  signals:
74 
80  void layerVariablesChanged();
81 
86  void widgetChanged();
87 
94  void showPanel( QgsPanelWidget *panel );
95 
96  public slots:
98  void rendererChanged();
99 
101  void apply();
102 
104  void onOK();
105 
116  void openPanel( QgsPanelWidget *panel );
117 
118 
119  private slots:
120  void showOrderByDialog();
121 
122  void changeOrderBy( const QgsFeatureRequest::OrderBy &orderBy, bool orderByEnabled );
123 
124  void updateUIState( bool hidden );
125 
126  void syncToLayer();
127 
128  protected:
129 
138  void connectValueChanged( const QList<QWidget *> &widgets, const char *slot );
139 
140  // Reimplements dialog keyPress event so we can ignore it
141  void keyPressEvent( QKeyEvent *event ) override;
142 
143  QgsVectorLayer *mLayer = nullptr;
144  QgsStyle *mStyle = nullptr;
145 
146  QgsRendererWidget *mActiveWidget = nullptr;
147 
148  QgsPaintEffect *mPaintEffect = nullptr;
149 
150  QgsMapCanvas *mMapCanvas = nullptr;
151 
153 
154  private:
155  bool mDockMode;
156 };
157 
158 
159 #endif
#define SIP_TRANSFERTHIS
Definition: qgis_sip.h:46
Base class for renderer settings widgets.
Base class for visual effects which can be applied to QPicture drawings.
Base class for any widget that can be shown as a inline panel.
Map canvas is a class for displaying all GIS data types on a canvas.
Definition: qgsmapcanvas.h:74
QgsFeatureRequest::OrderBy mOrderBy
Represents a vector layer which manages a vector based data sets.
Represents a list of OrderByClauses, with the most important first and the least important last...