QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
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"
27#include <QPointer>
28
30class QgsLayoutFrame;
32
40class GUI_EXPORT QgsLayoutManualTableWidget : public QgsLayoutItemBaseWidget, public QgsExpressionContextGenerator, private Ui::QgsLayoutManualTableWidgetBase
41{
42 Q_OBJECT
43 public:
46
47 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
49
51 static void openTableDesigner( QgsLayoutFrame *frame, QWidget *parent = nullptr );
52
53
54 protected:
55 bool setNewItem( QgsLayoutItem *item ) override;
56
57 private:
58 QPointer<QgsLayoutItemManualTable> mTable;
59 QPointer<QgsLayoutFrame> mFrame;
60 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
61
63 void blockAllSignals( bool b );
64
65 static QPointer<QgsTableEditorDialog> sEditorDialog;
66
67 private slots:
68
69 void setTableContents();
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 mHeaderHAlignmentComboBox_currentIndexChanged( int index );
80 void mHeaderModeComboBox_currentIndexChanged( int index );
81 void mAddFramePushButton_clicked();
82 void mResizeModeComboBox_currentIndexChanged( int index );
83 void mDrawEmptyCheckBox_toggled( bool checked );
84 void mEmptyFrameCheckBox_toggled( bool checked );
85 void mHideEmptyBgCheckBox_toggled( bool checked );
86 void mWrapBehaviorComboBox_currentIndexChanged( int index );
87 void mAdvancedCustomizationButton_clicked();
88 void updateGuiElements();
89};
90
91#endif // QGSLAYOUTMANUALTABLEWIDGET_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...
Base class for frame items, which form a layout multiframe item.
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.
A layout table subclass that displays manually entered (and formatted) content.
A widget for controlling the common properties of layout items (e.g.
Base class for graphical items within a QgsLayout.
A widget for configuring layout manual table items.
Interface for master layout type objects, such as print layouts and reports.
A reusable window for editing simple spreadsheet-style tables.