18#ifndef QGSLAYOUTLEGENDWIDGET_H
19#define QGSLAYOUTLEGENDWIDGET_H
25#include "ui_qgslayoutlegendwidgetbase.h"
26#include "ui_qgslayoutlegendmapfilteringwidgetbase.h"
30#include <QItemDelegate>
32class QgsLayoutLegendMapFilteringWidget;
61 void resetLayerNodeToDefaults();
67 void setCurrentNodeStyleFromAction();
74 void mWrapCharLineEdit_textChanged(
const QString &text );
75 void mTitleLineEdit_textChanged(
const QString &text );
76 void mColumnCountSpinBox_valueChanged(
int c );
77 void mSplitLayerCheckBox_toggled(
bool checked );
78 void mEqualColumnWidthCheckBox_toggled(
bool checked );
79 void mSymbolWidthSpinBox_valueChanged(
double d );
80 void mSymbolHeightSpinBox_valueChanged(
double d );
81 void mMaxSymbolSizeSpinBox_valueChanged(
double d );
82 void mMinSymbolSizeSpinBox_valueChanged(
double d );
83 void mWmsLegendWidthSpinBox_valueChanged(
double d );
84 void mWmsLegendHeightSpinBox_valueChanged(
double d );
85 void mTitleSpaceBottomSpinBox_valueChanged(
double d );
86 void mGroupSpaceSpinBox_valueChanged(
double d );
87 void mGroupIndentSpinBox_valueChanged(
double d );
88 void mSubgroupIndentSpinBox_valueChanged(
double d );
89 void mLayerSpaceSpinBox_valueChanged(
double d );
90 void mSymbolSpaceSpinBox_valueChanged(
double d );
91 void mIconLabelSpaceSpinBox_valueChanged(
double d );
92 void mBoxSpaceSpinBox_valueChanged(
double d );
93 void mColumnSpaceSpinBox_valueChanged(
double d );
94 void mCheckBoxAutoUpdate_stateChanged(
int state,
bool userTriggered =
true );
96 void mCheckboxResizeContents_toggled(
bool checked );
98 void mRasterStrokeGroupBox_toggled(
bool state );
99 void mRasterStrokeWidthSpinBox_valueChanged(
double d );
100 void mRasterStrokeColorButton_colorChanged(
const QColor &newColor );
103 void mMoveDownToolButton_clicked();
104 void mMoveUpToolButton_clicked();
105 void mRemoveToolButton_clicked();
106 void mAddToolButton_clicked();
107 void mEditPushButton_clicked();
108 void mCountToolButton_clicked(
bool checked );
109 void mExpressionFilterButton_toggled(
bool checked );
110 void mFilterByMapCheckBox_toggled(
bool checked );
111 void mUpdateAllPushButton_clicked();
112 void mAddGroupToolButton_clicked();
113 void mLayerExpressionButton_clicked();
115 void mFilterLegendByAtlasCheckBox_toggled(
bool checked );
117 void selectedChanged(
const QModelIndex ¤t,
const QModelIndex &previous );
119 void setLegendMapViewData();
121 void expandLegendTree();
122 void collapseLegendTree();
126 void setGuiElements();
129 void updateFilterLegendByAtlasButton();
131 void mItemTreeView_doubleClicked(
const QModelIndex &index );
132 void titleFontChanged();
133 void groupFontChanged();
134 void layerFontChanged();
135 void itemFontChanged();
137 void titleAlignmentChanged();
138 void groupAlignmentChanged();
139 void subgroupAlignmentChanged();
140 void itemAlignmentChanged();
141 void arrangementChanged();
143 void spaceBelowSubGroupHeadingChanged(
double space );
144 void spaceBelowGroupHeadingChanged(
double space );
146 void spaceGroupSideChanged(
double space );
147 void spaceSubGroupSideChanged(
double space );
149 void spaceSymbolSideChanged(
double space );
152 QgsLayoutLegendWidget() =
delete;
153 void blockAllSignals(
bool b );
155 QPointer<QgsLayoutItemLegend> mLegend;
159 QPointer<QgsLayoutLegendMapFilteringWidget> mMapFilteringWidget;
173 QgsLayoutLegendMenuProvider(
QgsLayerTreeView *view, QgsLayoutLegendWidget *w );
175 QMenu *createContextMenu()
override;
179 QgsLayoutLegendWidget *mWidget =
nullptr;
182#include "ui_qgslayoutlegendnodewidgetbase.h"
191class GUI_EXPORT QgsLayoutLegendNodeWidget :
public QgsPanelWidget,
private Ui::QgsLayoutLegendNodeWidgetBase
204 void insertExpression();
205 void sizeChanged(
double );
206 void customSymbolChanged();
207 void colorRampLegendChanged();
208 void columnBreakToggled(
bool checked );
209 void columnSplitChanged();
216 int mOriginalLegendNodeIndex = -1;
227class GUI_EXPORT QgsLayoutLegendMapFilteringModel :
public QSortFilterProxyModel
235 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
236 QVariant data(
const QModelIndex &index,
int role )
const override;
237 bool setData(
const QModelIndex &index,
const QVariant &value,
int role )
override;
238 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
241 bool filterAcceptsRow(
int source_row,
const QModelIndex &source_parent )
const override;
245 QPointer<QgsLayoutItemLegend> mLegendItem;
255class GUI_EXPORT QgsLayoutLegendMapFilteringWidget :
public QgsLayoutItemBaseWidget,
private Ui::QgsLayoutLegendMapFilteringWidgetBase
267 void updateGuiElements();
270 QPointer<QgsLayoutItemLegend> mLegendItem;
271 bool mBlockUpdates =
false;
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...
Layer tree node points to a map layer.
The QgsLegendRendererItem class is abstract interface for legend items returned from QgsMapLayerLegen...
This class is a base class for nodes in a layer tree.
The QgsLayerTreeView class extends QTreeView and provides some additional functionality when working ...
A common interface for layout designer dialogs and widgets.
A layout item subclass for map legends.
Base class for graphical items within a QgsLayout.
A model for items attached to a layout.
Map canvas is a class for displaying all GIS data types on a canvas.
Interface for master layout type objects, such as print layouts and reports.
As part of the API refactoring and improvements which landed in the Processing API was substantially reworked from the x version This was done in order to allow much of the underlying Processing framework to be ported into c