QGIS API Documentation 3.99.0-Master (26c88405ac0)
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
26#include "qgslayoutitemwidget.h"
28
29#include <QPointer>
30
32class QgsLayoutFrame;
34
42class GUI_EXPORT QgsLayoutManualTableWidget : public QgsLayoutItemBaseWidget, public QgsExpressionContextGenerator, private Ui::QgsLayoutManualTableWidgetBase
43{
44 Q_OBJECT
45 public:
48
49 void setMasterLayout( QgsMasterLayoutInterface *masterLayout ) override;
51
53 static void openTableDesigner( QgsLayoutFrame *frame, QWidget *parent = nullptr );
54
55
56 protected:
57 bool setNewItem( QgsLayoutItem *item ) override;
58
59 private:
60 QPointer<QgsLayoutItemManualTable> mTable;
61 QPointer<QgsLayoutFrame> mFrame;
62 QgsLayoutItemPropertiesWidget *mItemPropertiesWidget = nullptr;
63
65 void blockAllSignals( bool b );
66
67 static QPointer<QgsTableEditorDialog> sEditorDialog;
68
69 private slots:
70
71 void setTableContents();
72 void mMarginSpinBox_valueChanged( double d );
73 void mGridStrokeWidthSpinBox_valueChanged( double d );
74 void mGridColorButton_colorChanged( const QColor &newColor );
75 void mBackgroundColorButton_colorChanged( const QColor &newColor );
76 void headerFontChanged();
77 void contentFontChanged();
78 void mDrawHorizontalGrid_toggled( bool state );
79 void mDrawVerticalGrid_toggled( bool state );
80 void mShowGridGroupCheckBox_toggled( bool state );
81 void mHeaderHAlignmentComboBox_currentIndexChanged( int index );
82 void mHeaderModeComboBox_currentIndexChanged( int index );
83 void mAddFramePushButton_clicked();
84 void mResizeModeComboBox_currentIndexChanged( int index );
85 void mDrawEmptyCheckBox_toggled( bool checked );
86 void mEmptyFrameCheckBox_toggled( bool checked );
87 void mHideEmptyBgCheckBox_toggled( bool checked );
88 void mWrapBehaviorComboBox_currentIndexChanged( int index );
89 void mAdvancedCustomizationButton_clicked();
90 void updateGuiElements();
91};
92
93#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.