QGIS API Documentation  3.14.0-Pi (9f7028fd23)
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 mHeaderFontColorButton_colorChanged( const QColor &newColor );
75  void contentFontChanged();
76  void mContentFontColorButton_colorChanged( const QColor &newColor );
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 
115 #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
Definition: qgslayoutitemwidget.h:218
qgslayoutitemwidget.h
QgsLayoutFrame
Definition: qgslayoutframe.h:31
QgsLayoutAttributeTableWidget
Definition: qgslayoutattributetablewidget.h:38
QgsLayoutItemAttributeTable
Definition: qgslayoutitemattributetable.h:34
QgsLayoutItem
Base class for graphical items within a QgsLayout.
Definition: qgslayoutitem.h:112
QgsLayoutItemBaseWidget
Definition: qgslayoutitemwidget.h:122
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
Definition: qgsmaplayer.h:81
QgsMasterLayoutInterface
Interface for master layout type objects, such as print layouts and reports.
Definition: qgsmasterlayoutinterface.h:42