QGIS API Documentation 3.99.0-Master (0c964c3d988)
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
23#include "ui_qgslayoutmanualtablewidgetbase.h"
24
25#include "qgslayoutitemwidget.h"
27
28#include <QPointer>
29
30#define SIP_NO_FILE
31
33class QgsLayoutFrame;
35
43class GUI_EXPORT QgsLayoutManualTableWidget : public QgsLayoutItemBaseWidget, public QgsExpressionContextGenerator, private Ui::QgsLayoutManualTableWidgetBase
44{
45 Q_OBJECT
46 public:
49
50 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
52
54 static void openTableDesigner( QgsLayoutFrame *frame, QWidget *parent = nullptr );
55
56
57 protected:
58 bool setNewItem( QgsLayoutItem *item ) override;
59
60 private:
61 QPointer<QgsLayoutItemManualTable> mTable;
62 QPointer<QgsLayoutFrame> mFrame;
63 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
64
66 void blockAllSignals( bool b );
67
68 static QPointer<QgsTableEditorDialog> sEditorDialog;
69
70 private slots:
71
72 void setTableContents();
73 void mMarginSpinBox_valueChanged( double d );
74 void mGridStrokeWidthSpinBox_valueChanged( double d );
75 void mGridColorButton_colorChanged( const QColor &newColor );
76 void mBackgroundColorButton_colorChanged( const QColor &newColor );
77 void headerFontChanged();
78 void contentFontChanged();
79 void mDrawHorizontalGrid_toggled( bool state );
80 void mDrawVerticalGrid_toggled( bool state );
81 void mShowGridGroupCheckBox_toggled( bool state );
82 void mHeaderHAlignmentComboBox_currentIndexChanged( int index );
83 void mHeaderModeComboBox_currentIndexChanged( int index );
84 void mAddFramePushButton_clicked();
85 void mResizeModeComboBox_currentIndexChanged( int index );
86 void mDrawEmptyCheckBox_toggled( bool checked );
87 void mEmptyFrameCheckBox_toggled( bool checked );
88 void mHideEmptyBgCheckBox_toggled( bool checked );
89 void mWrapBehaviorComboBox_currentIndexChanged( int index );
90 void mAdvancedCustomizationButton_clicked();
91 void updateGuiElements();
92};
93
94#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.
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.
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.
static void openTableDesigner(QgsLayoutFrame *frame, QWidget *parent=nullptr)
Creates and open the table editor dialog.
QgsLayoutManualTableWidget(QgsLayoutFrame *frame)
constructor
Interface for master layout type objects, such as print layouts and reports.
A reusable window for editing simple spreadsheet-style tables.