QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
qgslayoutmanualtablewidget.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgslayoutmanualtablewidget.h
3  ---------------------------------
4  begin : January 2020
5  copyright : (C) 2020 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 QGSLAYOUTMANUALTABLEWIDGET_H
19 #define QGSLAYOUTMANUALTABLEWIDGET_H
20 
21 // We don't want to expose this in the public API
22 #define SIP_NO_FILE
23 
24 #include "ui_qgslayoutmanualtablewidgetbase.h"
25 #include "qgslayoutitemwidget.h"
26 #include "qgstableeditordialog.h"
27 #include <QPointer>
28 
30 class QgsLayoutFrame;
31 
39 class GUI_EXPORT QgsLayoutManualTableWidget: public QgsLayoutItemBaseWidget, private Ui::QgsLayoutManualTableWidgetBase
40 {
41  Q_OBJECT
42  public:
45 
46  void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
47 
48  protected:
49 
50  bool setNewItem( QgsLayoutItem *item ) override;
51 
52  private:
53  QPointer< QgsLayoutItemManualTable > mTable;
54  QPointer< QgsLayoutFrame > mFrame;
55  QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
56 
57  QPointer< QgsTableEditorDialog > mEditorDialog;
58 
60  void blockAllSignals( bool b );
61 
62  private slots:
63 
64  void setTableContents();
65  void mMarginSpinBox_valueChanged( double d );
66  void mGridStrokeWidthSpinBox_valueChanged( double d );
67  void mGridColorButton_colorChanged( const QColor &newColor );
68  void mBackgroundColorButton_colorChanged( const QColor &newColor );
69  void headerFontChanged();
70  void contentFontChanged();
71  void mDrawHorizontalGrid_toggled( bool state );
72  void mDrawVerticalGrid_toggled( bool state );
73  void mShowGridGroupCheckBox_toggled( bool state );
74  void mHeaderHAlignmentComboBox_currentIndexChanged( int index );
75  void mHeaderModeComboBox_currentIndexChanged( int index );
76  void mAddFramePushButton_clicked();
77  void mResizeModeComboBox_currentIndexChanged( int index );
78  void mDrawEmptyCheckBox_toggled( bool checked );
79  void mEmptyFrameCheckBox_toggled( bool checked );
80  void mHideEmptyBgCheckBox_toggled( bool checked );
81  void mWrapBehaviorComboBox_currentIndexChanged( int index );
82  void mAdvancedCustomizationButton_clicked();
83  void updateGuiElements();
84 
85 };
86 
87 #endif // QGSLAYOUTMANUALTABLEWIDGET_H
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
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
QgsLayoutManualTableWidget
A widget for configuring layout manual table items.
Definition: qgslayoutmanualtablewidget.h:40
QgsMasterLayoutInterface
Interface for master layout type objects, such as print layouts and reports.
Definition: qgsmasterlayoutinterface.h:43
QgsLayoutItemManualTable
A layout table subclass that displays manually entered (and formatted) content.
Definition: qgslayoutitemmanualtable.h:32