QGIS API Documentation 3.99.0-Master (7d2ca374f2d)
Loading...
Searching...
No Matches
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
23#include "ui_qgslayoutattributetablewidgetbase.h"
24
25#include "qgis_gui.h"
26#include "qgslayoutitemwidget.h"
27
28#define SIP_NO_FILE
29
31class QgsLayoutFrame;
32
40class GUI_EXPORT QgsLayoutAttributeTableWidget : public QgsLayoutItemBaseWidget, public QgsExpressionContextGenerator, private Ui::QgsLayoutAttributeTableWidgetBase
41{
42 Q_OBJECT
43 public:
46
47 void setReportTypeString( const QString &string ) override;
48 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
50
51 protected:
52 bool setNewItem( QgsLayoutItem *item ) override;
53
54 private:
55 QPointer<QgsLayoutItemAttributeTable> mTable;
56 QPointer<QgsLayoutFrame> mFrame;
57 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
58
60 void blockAllSignals( bool b );
61
62 void toggleSourceControls();
63
64 void toggleAtlasSpecificControls( bool atlasEnabled );
65
66 private slots:
67 void mRefreshPushButton_clicked();
68 void mAttributesPushButton_clicked();
69 void composerMapChanged( QgsLayoutItem *item );
70 void mMaximumRowsSpinBox_valueChanged( int i );
71 void mMarginSpinBox_valueChanged( double d );
72 void mGridStrokeWidthSpinBox_valueChanged( double d );
73 void mGridColorButton_colorChanged( const QColor &newColor );
74 void mBackgroundColorButton_colorChanged( const QColor &newColor );
75 void headerFontChanged();
76 void contentFontChanged();
77 void mDrawHorizontalGrid_toggled( bool state );
78 void mDrawVerticalGrid_toggled( bool state );
79 void mShowGridGroupCheckBox_toggled( bool state );
80 void mShowOnlyVisibleFeaturesCheckBox_stateChanged( int state );
81 void mFeatureFilterCheckBox_stateChanged( int state );
82 void mFeatureFilterEdit_editingFinished();
83 void mFeatureFilterButton_clicked();
84 void mHeaderHAlignmentComboBox_currentIndexChanged( int index );
85 void mHeaderModeComboBox_currentIndexChanged( int index );
86 void mWrapStringLineEdit_editingFinished();
87 void changeLayer( QgsMapLayer *layer );
88 void mAddFramePushButton_clicked();
89 void mResizeModeComboBox_currentIndexChanged( int index );
90 void mSourceComboBox_currentIndexChanged( int index );
91 void mRelationsComboBox_currentIndexChanged( int index );
92 void mEmptyModeComboBox_currentIndexChanged( int index );
93 void mDrawEmptyCheckBox_toggled( bool checked );
94 void mEmptyMessageLineEdit_editingFinished();
95 void mIntersectAtlasCheckBox_stateChanged( int state );
96 void mUniqueOnlyCheckBox_stateChanged( int state );
97 void mEmptyFrameCheckBox_toggled( bool checked );
98 void mHideEmptyBgCheckBox_toggled( bool checked );
99 void mWrapBehaviorComboBox_currentIndexChanged( int index );
100 void mAdvancedCustomizationButton_clicked();
101 void useConditionalStylingChanged( bool checked );
102
104 void setMaximumNumberOfFeatures( int n );
105
107 void updateGuiElements();
108
109 void atlasToggled();
110
111 void updateRelationsCombo();
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...
QgsLayoutAttributeTableWidget(QgsLayoutFrame *frame)
constructor
Base class for frame items, which form a layout multiframe item.
A layout table subclass that displays attributes from a vector layer.
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.
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:83
Interface for master layout type objects, such as print layouts and reports.