|
QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
|
A reusable widget for formatting the contents of a QgsTableCell. More...
#include <qgstableeditorformattingwidget.h>

Signals | |
| void | backgroundColorChanged (const QColor &color) |
| Emitted whenever the cell background color is changed in the widget. | |
| void | cellPropertyChanged (const QgsProperty &property) |
| Emitted when the cell contents property shown in the widget is changed. | |
| void | columnWidthChanged (double width) |
| Emitted whenever the column width shown in the widget is changed. | |
| void | horizontalAlignmentChanged (Qt::Alignment alignment) |
| Emitted when the horizontal alignment shown in the widget is changed. | |
| void | numberFormatChanged () |
| Emitted whenever the numeric format shown in the widget is changed. | |
| void | rowHeightChanged (double height) |
| Emitted whenever the row height shown in the widget is changed. | |
| void | textFormatChanged () |
| Emitted whenever the text format shown in the widget is changed. | |
| void | verticalAlignmentChanged (Qt::Alignment alignment) |
| Emitted when the vertical alignment shown in the widget is changed. | |
Signals inherited from QgsPanelWidget | |
| void | panelAccepted (QgsPanelWidget *panel) |
| Emitted when the panel is accepted by the user. | |
| void | showPanel (QgsPanelWidget *panel) |
| Emit when you require a panel to be show in the interface. | |
| void | widgetChanged () |
| Emitted when the widget state changes. | |
Public Member Functions | |
| QgsTableEditorFormattingWidget (QWidget *parent=nullptr) | |
| Constructor for QgsTableEditorFormattingWidget with the specified parent widget. | |
| ~QgsTableEditorFormattingWidget () override | |
| QgsExpressionContext | createExpressionContext () const override |
| This method needs to be reimplemented in all classes which implement this interface and return an expression context. | |
| QgsNumericFormat * | numericFormat () |
Returns the current numeric format shown in the widget, or a nullptr if no numeric format is set. | |
| void | registerExpressionContextGenerator (QgsExpressionContextGenerator *generator) |
| Register an expression context generator class that will be used to retrieve an expression context for the widget when required. | |
| void | setBackgroundColor (const QColor &color) |
| Sets the cell background color to show in the widget. | |
| void | setCellProperty (const QgsProperty &property) |
| Sets the cell content's property to show in the widget. | |
| void | setColumnWidth (double width) |
| Sets the column width to show in the widget, or 0 for automatic width. | |
| void | setHorizontalAlignment (Qt::Alignment alignment) |
| Sets the horizontal alignment to show in the widget. | |
| void | setNumericFormat (QgsNumericFormat *format, bool isMixedFormat) |
Sets the numeric format to show in the widget, or nullptr if no numeric format is set. | |
| void | setRowHeight (double height) |
| Sets the row height to show in the widget, or 0 for automatic height. | |
| void | setTextFormat (const QgsTextFormat &format) |
| Sets the text format to show in the widget. | |
| void | setVerticalAlignment (Qt::Alignment alignment) |
| Sets the vertical alignment to show in the widget. | |
| QgsTextFormat | textFormat () const |
| Returns the current text format shown in the widget. | |
Public Member Functions inherited from QgsPanelWidget | |
| QgsPanelWidget (QWidget *parent=nullptr) | |
| Base class for any widget that can be shown as a inline panel. | |
| virtual bool | applySizeConstraintsToStack () const |
Returns true if the size constraints and hints for the panel widget should be applied to the parent QgsPanelWidgetStack which this panel is shown in. | |
| bool | autoDelete () |
| The the auto delete property on the widget. | |
| void | connectChildPanel (QgsPanelWidget *panel) |
| Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. | |
| void | connectChildPanels (const QList< QgsPanelWidget * > &panels) |
| Connect the given sub panel widgets showPanel signals to this current panels main showPanel event to bubble up to the user. | |
| bool | dockMode () |
| Returns the dock mode state. | |
| virtual QMenu * | menuButtonMenu () |
Returns the menu to use for the menu button for this panel, or nullptr if no menu button is required. | |
| virtual QString | menuButtonTooltip () const |
| Returns the (translated) tooltip text to use for the menu button for this panel. | |
| QString | panelTitle () |
| The title of the panel. | |
| void | setAutoDelete (bool autoDelete) |
| The the auto delete property on the widget. | |
| virtual void | setDockMode (bool dockMode) |
| Set the widget in dock mode which tells the widget to emit panel widgets and not open dialogs. | |
| void | setPanelTitle (const QString &panelTitle) |
| Set the title of the panel when shown in the interface. | |
Public Member Functions inherited from QgsExpressionContextGenerator | |
| virtual | ~QgsExpressionContextGenerator ()=default |
Additional Inherited Members | |
Public Slots inherited from QgsPanelWidget | |
| void | acceptPanel () |
| Accept the panel. | |
| void | openPanel (QgsPanelWidget *panel) |
Open a panel or dialog depending on dock mode setting If dock mode is true this method will emit the showPanel signal for connected slots to handle the open event. | |
Static Public Member Functions inherited from QgsPanelWidget | |
| static QgsPanelWidget * | findParentPanel (QWidget *widget) |
| Traces through the parents of a widget to find if it is contained within a QgsPanelWidget widget. | |
Protected Member Functions inherited from QgsPanelWidget | |
| void | keyPressEvent (QKeyEvent *event) override |
| Overridden key press event to handle the esc event on the widget. | |
A reusable widget for formatting the contents of a QgsTableCell.
The editor has support for table foreground and background colors, and numeric formats.
Definition at line 41 of file qgstableeditorformattingwidget.h.
| QgsTableEditorFormattingWidget::QgsTableEditorFormattingWidget | ( | QWidget * | parent = nullptr | ) |
Constructor for QgsTableEditorFormattingWidget with the specified parent widget.
Definition at line 23 of file qgstableeditorformattingwidget.cpp.
|
overridedefault |
|
signal |
Emitted whenever the cell background color is changed in the widget.
|
signal |
Emitted when the cell contents property shown in the widget is changed.
|
signal |
Emitted whenever the column width shown in the widget is changed.
|
overridevirtual |
This method needs to be reimplemented in all classes which implement this interface and return an expression context.
Implements QgsExpressionContextGenerator.
Definition at line 231 of file qgstableeditorformattingwidget.cpp.
|
signal |
Emitted when the horizontal alignment shown in the widget is changed.
|
signal |
Emitted whenever the numeric format shown in the widget is changed.
| QgsNumericFormat * QgsTableEditorFormattingWidget::numericFormat | ( | ) |
Returns the current numeric format shown in the widget, or a nullptr if no numeric format is set.
The caller takes ownership of the returned object.
Definition at line 138 of file qgstableeditorformattingwidget.cpp.
| void QgsTableEditorFormattingWidget::registerExpressionContextGenerator | ( | QgsExpressionContextGenerator * | generator | ) |
Register an expression context generator class that will be used to retrieve an expression context for the widget when required.
Definition at line 226 of file qgstableeditorformattingwidget.cpp.
|
signal |
Emitted whenever the row height shown in the widget is changed.
| void QgsTableEditorFormattingWidget::setBackgroundColor | ( | const QColor & | color | ) |
Sets the cell background color to show in the widget.
Definition at line 151 of file qgstableeditorformattingwidget.cpp.
| void QgsTableEditorFormattingWidget::setCellProperty | ( | const QgsProperty & | property | ) |
Sets the cell content's property to show in the widget.
Definition at line 216 of file qgstableeditorformattingwidget.cpp.
| void QgsTableEditorFormattingWidget::setColumnWidth | ( | double | width | ) |
Sets the column width to show in the widget, or 0 for automatic width.
Definition at line 185 of file qgstableeditorformattingwidget.cpp.
| void QgsTableEditorFormattingWidget::setHorizontalAlignment | ( | Qt::Alignment | alignment | ) |
Sets the horizontal alignment to show in the widget.
Definition at line 196 of file qgstableeditorformattingwidget.cpp.
| void QgsTableEditorFormattingWidget::setNumericFormat | ( | QgsNumericFormat * | format, |
| bool | isMixedFormat | ||
| ) |
Sets the numeric format to show in the widget, or nullptr if no numeric format is set.
if isMixedFormat is true then the widget will be set to indicate a "mixed format" setting.
Definition at line 158 of file qgstableeditorformattingwidget.cpp.
| void QgsTableEditorFormattingWidget::setRowHeight | ( | double | height | ) |
Sets the row height to show in the widget, or 0 for automatic height.
Definition at line 174 of file qgstableeditorformattingwidget.cpp.
| void QgsTableEditorFormattingWidget::setTextFormat | ( | const QgsTextFormat & | format | ) |
Sets the text format to show in the widget.
Definition at line 167 of file qgstableeditorformattingwidget.cpp.
| void QgsTableEditorFormattingWidget::setVerticalAlignment | ( | Qt::Alignment | alignment | ) |
Sets the vertical alignment to show in the widget.
Definition at line 206 of file qgstableeditorformattingwidget.cpp.
| QgsTextFormat QgsTableEditorFormattingWidget::textFormat | ( | ) | const |
Returns the current text format shown in the widget.
Definition at line 146 of file qgstableeditorformattingwidget.cpp.
|
signal |
Emitted whenever the text format shown in the widget is changed.
|
signal |
Emitted when the vertical alignment shown in the widget is changed.