QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
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 
29 class QgsLayoutFrame;
30 
38 class GUI_EXPORT QgsLayoutAttributeTableWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutAttributeTableWidgetBase
39 {
40  Q_OBJECT
41  public:
44 
45  void setReportTypeString( const QString &string ) override;
46  void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
47 
48  protected:
49 
50  bool setNewItem( QgsLayoutItem *item ) override;
51 
52  private:
53  QPointer< QgsLayoutItemAttributeTable > mTable;
54  QPointer< QgsLayoutFrame > mFrame;
55  QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
56 
58  void blockAllSignals( bool b );
59 
60  void toggleSourceControls();
61 
62  void toggleAtlasSpecificControls( bool atlasEnabled );
63 
64  private slots:
65  void mRefreshPushButton_clicked();
66  void mAttributesPushButton_clicked();
67  void composerMapChanged( QgsLayoutItem *item );
68  void mMaximumRowsSpinBox_valueChanged( int i );
69  void mMarginSpinBox_valueChanged( double d );
70  void mGridStrokeWidthSpinBox_valueChanged( double d );
71  void mGridColorButton_colorChanged( const QColor &newColor );
72  void mBackgroundColorButton_colorChanged( const QColor &newColor );
73  void headerFontChanged();
74  void contentFontChanged();
75  void mDrawHorizontalGrid_toggled( bool state );
76  void mDrawVerticalGrid_toggled( bool state );
77  void mShowGridGroupCheckBox_toggled( bool state );
78  void mShowOnlyVisibleFeaturesCheckBox_stateChanged( int state );
79  void mFeatureFilterCheckBox_stateChanged( int state );
80  void mFeatureFilterEdit_editingFinished();
81  void mFeatureFilterButton_clicked();
82  void mHeaderHAlignmentComboBox_currentIndexChanged( int index );
83  void mHeaderModeComboBox_currentIndexChanged( int index );
84  void mWrapStringLineEdit_editingFinished();
85  void changeLayer( QgsMapLayer *layer );
86  void mAddFramePushButton_clicked();
87  void mResizeModeComboBox_currentIndexChanged( int index );
88  void mSourceComboBox_currentIndexChanged( int index );
89  void mRelationsComboBox_currentIndexChanged( int index );
90  void mEmptyModeComboBox_currentIndexChanged( int index );
91  void mDrawEmptyCheckBox_toggled( bool checked );
92  void mEmptyMessageLineEdit_editingFinished();
93  void mIntersectAtlasCheckBox_stateChanged( int state );
94  void mUniqueOnlyCheckBox_stateChanged( int state );
95  void mEmptyFrameCheckBox_toggled( bool checked );
96  void mHideEmptyBgCheckBox_toggled( bool checked );
97  void mWrapBehaviorComboBox_currentIndexChanged( int index );
98  void mAdvancedCustomizationButton_clicked();
99  void useConditionalStylingChanged( bool checked );
100 
102  void setMaximumNumberOfFeatures( int n );
103 
105  void updateGuiElements();
106 
107  void atlasToggled();
108 
109  void updateRelationsCombo();
110 
111 };
112 
113 #endif // QGSLAYOUTATTRIBUTETABLEWIDGET_H
QgsLayoutItemBaseWidget::setReportTypeString
virtual void setReportTypeString(const QString &string)
Sets the string to use to describe the current report type (e.g.
Definition: qgslayoutitemwidget.cpp:184
QgsLayoutItemPropertiesWidget
A widget for controlling the common properties of layout items (e.g.
Definition: qgslayoutitemwidget.h:219
qgslayoutitemwidget.h
QgsLayoutFrame
Base class for frame items, which form a layout multiframe item.
Definition: qgslayoutframe.h:32
QgsLayoutAttributeTableWidget
A widget for configuring layout attribute table items.
Definition: qgslayoutattributetablewidget.h:39
QgsLayoutItemAttributeTable
A layout table subclass that displays attributes from a vector layer.
Definition: qgslayoutitemattributetable.h:35
QgsLayoutItem
Base class for graphical items within a QgsLayout.
Definition: qgslayoutitem.h:113
QgsLayoutItemBaseWidget
A base class for property widgets for layout items.
Definition: qgslayoutitemwidget.h:123
QgsLayoutItemBaseWidget::setNewItem
virtual bool setNewItem(QgsLayoutItem *item)
Attempts to update the widget to show the properties for the specified item.
Definition: qgslayoutitemwidget.cpp:222
QgsLayoutItemBaseWidget::setMasterLayout
virtual void setMasterLayout(QgsMasterLayoutInterface *masterLayout)
Sets the master layout associated with the item.
Definition: qgslayoutitemwidget.cpp:202
QgsMapLayer
Base class for all map layer types.
Definition: qgsmaplayer.h:83
QgsMasterLayoutInterface
Interface for master layout type objects, such as print layouts and reports.
Definition: qgsmasterlayoutinterface.h:43