QGIS API Documentation 3.99.0-Master (21b3aa880ba)
Loading...
Searching...
No Matches
qgsdiagramwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsdiagramwidget.h
3 Container widget for diagram layers
4 -------------------
5 begin : September 2024
6 copyright : (C) Germán Carrillo
7 email : german at opengis dot ch
8
9 ***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSDIAGRAMWIDGET_H
19#define QGSDIAGRAMWIDGET_H
20
21// We don't want to expose this in the public API
22#define SIP_NO_FILE
23
24#include "ui_qgsdiagramwidget.h"
25
27
28#include <QWidget>
29
36class GUI_EXPORT QgsDiagramWidget : public QgsMapLayerConfigWidget, private Ui::QgsDiagramWidget
37{
38 Q_OBJECT
39
40 public:
42 QgsDiagramWidget( QgsVectorLayer *layer, QgsMapCanvas *canvas, QWidget *parent = nullptr );
43
47 void syncToOwnLayer();
48
49 public slots:
51 void apply() override;
52
53 signals:
56
57 private slots:
58 void mDiagramTypeComboBox_currentIndexChanged( int index );
59 void showEngineConfigDialog();
60
61 private:
62 enum Mode
63 {
64 ModeNone,
65 ModePie,
66 ModeText,
67 ModeHistogram,
68 ModeStackedBar,
69 ModeStacked
70 };
71
72 QgsVectorLayer *mLayer = nullptr;
73 QgsMapCanvas *mCanvas = nullptr;
74
75 QWidget *mWidget = nullptr;
76};
77
78#endif // QGSDIAGRAMWIDGET_H
void syncToOwnLayer()
Updates the widget to reflect the layer's current diagram settings.
QgsDiagramWidget(QgsVectorLayer *layer, QgsMapCanvas *canvas, QWidget *parent=nullptr)
constructor
void auxiliaryFieldCreated()
Emitted when an auxiliary field is created.
Map canvas is a class for displaying all GIS data types on a canvas.
QgsMapLayerConfigWidget(QgsMapLayer *layer, QgsMapCanvas *canvas, QWidget *parent=nullptr)
A panel widget that can be shown in the map style dock.
virtual void apply()=0
Called when changes to the layer need to be made.
Represents a vector layer which manages a vector based dataset.