QGIS API Documentation 3.41.0-Master (fda2aa46e9a)
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
25#include "ui_qgsdiagramwidget.h"
26
27#include <QWidget>
28
35class GUI_EXPORT QgsDiagramWidget : public QgsMapLayerConfigWidget, private Ui::QgsDiagramWidget
36{
37 Q_OBJECT
38
39 public:
41 QgsDiagramWidget( QgsVectorLayer *layer, QgsMapCanvas *canvas, QWidget *parent = nullptr );
42
46 void syncToOwnLayer();
47
48 public slots:
50 void apply() override;
51
52 signals:
55
56 private slots:
57 void mDiagramTypeComboBox_currentIndexChanged( int index );
58 void showEngineConfigDialog();
59
60 private:
61
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 auxiliaryFieldCreated()
Emitted when an auxiliary field is created.
Map canvas is a class for displaying all GIS data types on a canvas.
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 data sets.