QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
qgslayoutattributetablewidget.h
Go to the documentation of this file.
1/***************************************************************************
2 qgslayoutattributetablewidget.h
3 ---------------------------------
4 begin : November 2017
5 copyright : (C) 2017 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
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 QGSLAYOUTATTRIBUTETABLEWIDGET_H
19#define QGSLAYOUTATTRIBUTETABLEWIDGET_H
20
21// We don't want to expose this in the public API
22#define SIP_NO_FILE
23
24#include "qgis_gui.h"
25#include "ui_qgslayoutattributetablewidgetbase.h"
26#include "qgslayoutitemwidget.h"
27
29class QgsLayoutFrame;
30
38class GUI_EXPORT QgsLayoutAttributeTableWidget: public QgsLayoutItemBaseWidget, public QgsExpressionContextGenerator, private Ui::QgsLayoutAttributeTableWidgetBase
39{
40 Q_OBJECT
41 public:
44
45 void setReportTypeString( const QString &string ) override;
46 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
48
49 protected:
50
51 bool setNewItem( QgsLayoutItem *item ) override;
52
53 private:
54 QPointer< QgsLayoutItemAttributeTable > mTable;
55 QPointer< QgsLayoutFrame > mFrame;
56 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
57
59 void blockAllSignals( bool b );
60
61 void toggleSourceControls();
62
63 void toggleAtlasSpecificControls( bool atlasEnabled );
64
65 private slots:
66 void mRefreshPushButton_clicked();
67 void mAttributesPushButton_clicked();
68 void composerMapChanged( QgsLayoutItem *item );
69 void mMaximumRowsSpinBox_valueChanged( int i );
70 void mMarginSpinBox_valueChanged( double d );
71 void mGridStrokeWidthSpinBox_valueChanged( double d );
72 void mGridColorButton_colorChanged( const QColor &newColor );
73 void mBackgroundColorButton_colorChanged( const QColor &newColor );
74 void headerFontChanged();
75 void contentFontChanged();
76 void mDrawHorizontalGrid_toggled( bool state );
77 void mDrawVerticalGrid_toggled( bool state );
78 void mShowGridGroupCheckBox_toggled( bool state );
79 void mShowOnlyVisibleFeaturesCheckBox_stateChanged( int state );
80 void mFeatureFilterCheckBox_stateChanged( int state );
81 void mFeatureFilterEdit_editingFinished();
82 void mFeatureFilterButton_clicked();
83 void mHeaderHAlignmentComboBox_currentIndexChanged( int index );
84 void mHeaderModeComboBox_currentIndexChanged( int index );
85 void mWrapStringLineEdit_editingFinished();
86 void changeLayer( QgsMapLayer *layer );
87 void mAddFramePushButton_clicked();
88 void mResizeModeComboBox_currentIndexChanged( int index );
89 void mSourceComboBox_currentIndexChanged( int index );
90 void mRelationsComboBox_currentIndexChanged( int index );
91 void mEmptyModeComboBox_currentIndexChanged( int index );
92 void mDrawEmptyCheckBox_toggled( bool checked );
93 void mEmptyMessageLineEdit_editingFinished();
94 void mIntersectAtlasCheckBox_stateChanged( int state );
95 void mUniqueOnlyCheckBox_stateChanged( int state );
96 void mEmptyFrameCheckBox_toggled( bool checked );
97 void mHideEmptyBgCheckBox_toggled( bool checked );
98 void mWrapBehaviorComboBox_currentIndexChanged( int index );
99 void mAdvancedCustomizationButton_clicked();
100 void useConditionalStylingChanged( bool checked );
101
103 void setMaximumNumberOfFeatures( int n );
104
106 void updateGuiElements();
107
108 void atlasToggled();
109
110 void updateRelationsCombo();
111
112};
113
114#endif // QGSLAYOUTATTRIBUTETABLEWIDGET_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...
A widget for configuring layout attribute table items.
Base class for frame items, which form a layout multiframe item.
A layout table subclass that displays attributes from a vector layer.
A base class for property widgets for layout items.
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.
virtual void setReportTypeString(const QString &string)
Sets the string to use to describe the current report type (e.g.
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:73
Interface for master layout type objects, such as print layouts and reports.