QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
qgslayoutchartwidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayoutchartwidget.h
3 --------------------------
4 begin : August 2025
5 copyright : (C) 2025 by Mathieu
6 email : mathieu at opengis dot ch
7 ***************************************************************************/
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 QGSLAYOUTCHARTWIDGET_H
19#define QGSLAYOUTCHARTWIDGET_H
20
21// We don't want to expose this in the public API
22#define SIP_NO_FILE
23
24#include "ui_qgslayoutchartwidgetbase.h"
25
26#include "qgis_gui.h"
27#include "qgslayoutitemwidget.h"
28
30
38class GUI_EXPORT QgsLayoutChartWidget : public QgsLayoutItemBaseWidget, private Ui::QgsLayoutChartWidgetBase
39{
40 Q_OBJECT
41
42 public:
44 explicit QgsLayoutChartWidget( QgsLayoutItemChart *chartItem );
45 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
46
47 protected:
48 bool setNewItem( QgsLayoutItem *item ) override;
49
50 private slots:
51 void changeLayer( QgsMapLayer *layer );
52 void changeSortExpression( const QString &expression, bool valid );
53
54 void mChartTypeComboBox_currentIndexChanged( int index );
55 void mChartPropertiesButton_clicked();
56 void mSortCheckBox_stateChanged( int state );
57 void mSortDirectionButton_clicked();
58
59 void mSeriesListWidget_currentItemChanged( QListWidgetItem *current, QListWidgetItem *previous );
60 void mSeriesListWidget_itemChanged( QListWidgetItem *item );
61 void mAddSeriesPushButton_clicked();
62 void mRemoveSeriesPushButton_clicked();
63 void mSeriesPropertiesButton_clicked();
64
65 private:
67 void setGuiElementValues();
68
70 QListWidgetItem *addSeriesListItem( const QString &name );
71
72 QPointer<QgsLayoutItemChart> mChartItem;
73 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
74};
75
76#endif // QGSLAYOUTCHARTWIDGET_H
QgsLayoutChartWidget(QgsLayoutItemChart *chartItem)
constructor
virtual bool setNewItem(QgsLayoutItem *item)
Attempts to update the widget to show the properties for the specified item.
virtual void setMasterLayout(QgsMasterLayoutInterface *masterLayout)
Sets the master layout associated with the item.
QgsLayoutItemBaseWidget(QWidget *parent SIP_TRANSFERTHIS, QgsLayoutObject *layoutObject)
Constructor for QgsLayoutItemBaseWidget, linked with the specified layoutObject.
A layout item subclass that renders chart plots.
A widget for controlling the common properties of layout items (e.g.
Base class for graphical items within a QgsLayout.
Base class for all map layer types.
Definition qgsmaplayer.h:80
Interface for master layout type objects, such as print layouts and reports.