QGIS API Documentation 4.1.0-Master (376402f9aeb)
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:
49 QgsLayoutChartSeriesDetailsWidget( QgsVectorLayer *layer, int index, const QgsLayoutItemChart::SeriesDetails &seriesDetails, bool yAxisOnly = false, QWidget *parent = nullptr );
50
52 int index() const;
53
55 QString xExpression() const;
56
58 QString yExpression() const;
59
61 QString filterExpression() const;
62
68
70
71 private slots:
72 void mFilterButton_clicked();
73
74 private:
75 QPointer<QgsVectorLayer> mVectorLayer;
76 int mIndex = 0;
77 bool mYAxisOnly = false;
78
79 QgsExpressionContextGenerator *mExpressionContextGenerator = nullptr;
80};
81
82#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.
QgsLayoutChartSeriesDetailsWidget(QgsVectorLayer *layer, int index, const QgsLayoutItemChart::SeriesDetails &seriesDetails, bool yAxisOnly=false, QWidget *parent=nullptr)
Constructor for QgsLayoutChartSeriesDetailsWidget.
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...
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.