QGIS API Documentation 3.99.0-Master (c22de0620c0)
Loading...
Searching...
No Matches
qgslayoutchartseriesdetailswidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayoutchartseriesdetailswidget.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 QGSLAYOUTCHARTSERIESDETAILSWIDGET_H
19#define QGSLAYOUTCHARTSERIESDETAILSWIDGET_H
20
21// We don't want to expose this in the public API
22
23#include "ui_qgslayoutchartseriesdetailswidgetbase.h"
24
25#include "qgis_gui.h"
26#include "qgslayoutitemchart.h"
27#include "qgspanelwidget.h"
28
29#define SIP_NO_FILE
30
36class GUI_EXPORT QgsLayoutChartSeriesDetailsWidget : public QgsPanelWidget, public QgsExpressionContextGenerator, private Ui::QgsLayoutChartSeriesDetailsWidgetBase
37{
38 Q_OBJECT
39
40 public:
48 QgsLayoutChartSeriesDetailsWidget( QgsVectorLayer *layer, int index, const QgsLayoutItemChart::SeriesDetails &seriesDetails, QWidget *parent = nullptr );
49
51 int index() const;
52
54 QString xExpression() const;
55
57 QString yExpression() const;
58
60 QString filterExpression() const;
61
67
69
70 private slots:
71 void mFilterButton_clicked();
72
73 private:
74 QPointer<QgsVectorLayer> mVectorLayer;
75 int mIndex = 0;
76
77 QgsExpressionContextGenerator *mExpressionContextGenerator = nullptr;
78};
79
80#endif // QGSLAYOUTCHARTSERIESDETAILSWIDGET_H
Abstract interface for generating an expression context.
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
QString yExpression() const
Returns the Y-axis expression.
QString filterExpression() const
Returns the filter expression.
QString xExpression() const
Returns the X-axis expression.
void registerExpressionContextGenerator(QgsExpressionContextGenerator *generator)
Register an expression context generator class that will be used to retrieve an expression context fo...
QgsLayoutChartSeriesDetailsWidget(QgsVectorLayer *layer, int index, const QgsLayoutItemChart::SeriesDetails &seriesDetails, QWidget *parent=nullptr)
Constructor for QgsLayoutChartSeriesDetailsWidget.
Chart series details covering all supported series types.
QgsPanelWidget(QWidget *parent=nullptr)
Base class for any widget that can be shown as an inline panel.
Represents a vector layer which manages a vector based dataset.