|
QGIS API Documentation 3.99.0-Master (26c88405ac0)
|
A button for creating and modifying QgsLegendPatchShape settings. More...
#include <qgslegendpatchshapebutton.h>

Public Slots | |
| void | setShape (const QgsLegendPatchShape &shape) |
| Sets the shape for the button. | |
| void | setToDefault () |
| Resets the shape to the default shape. | |
Signals | |
| void | changed () |
| Emitted when the shape's settings are changed. | |
Public Member Functions | |
| QgsLegendPatchShapeButton (QWidget *parent=nullptr, const QString &dialogTitle=QString()) | |
| Construct a new patch shape button with the specified parent widget. | |
| ~QgsLegendPatchShapeButton () override | |
| QString | dialogTitle () const |
| Returns the title for the symbol settings dialog window. | |
| QgsMessageBar * | messageBar () const |
| Returns the message bar associated with the widget. | |
| QSize | minimumSizeHint () const override |
| void | setDialogTitle (const QString &title) |
| Sets the title for the symbol settings dialog window. | |
| void | setMessageBar (QgsMessageBar *bar) |
| Sets the message bar associated with the widget. | |
| void | setPreviewSymbol (QgsSymbol *symbol) |
| Sets the symbol to use for previewing the legend patch shape. | |
| void | setSymbolType (Qgis::SymbolType type) |
| Sets the symbol type which the button requires. | |
| QgsLegendPatchShape | shape () |
| Returns the current shape defined by the button. | |
| QSize | sizeHint () const override |
| Qgis::SymbolType | symbolType () const |
| Returns the symbol type which the button requires. | |
Protected Member Functions | |
| void | changeEvent (QEvent *e) override |
| void | mousePressEvent (QMouseEvent *e) override |
| void | resizeEvent (QResizeEvent *event) override |
| void | showEvent (QShowEvent *e) override |
A button for creating and modifying QgsLegendPatchShape settings.
Definition at line 38 of file qgslegendpatchshapebutton.h.
| QgsLegendPatchShapeButton::QgsLegendPatchShapeButton | ( | QWidget * | parent = nullptr, |
| const QString & | dialogTitle = QString() ) |
Construct a new patch shape button with the specified parent widget.
Use dialogTitle string to define the title to show in the legend patch shape widget.
Definition at line 30 of file qgslegendpatchshapebutton.cpp.
|
overridedefault |
|
signal |
Emitted when the shape's settings are changed.
|
overrideprotected |
Definition at line 231 of file qgslegendpatchshapebutton.cpp.
| QString QgsLegendPatchShapeButton::dialogTitle | ( | ) | const |
Returns the title for the symbol settings dialog window.
Definition at line 313 of file qgslegendpatchshapebutton.cpp.
| QgsMessageBar * QgsLegendPatchShapeButton::messageBar | ( | ) | const |
Returns the message bar associated with the widget.
Definition at line 144 of file qgslegendpatchshapebutton.cpp.
|
override |
Definition at line 53 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 178 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 246 of file qgslegendpatchshapebutton.cpp.
| void QgsLegendPatchShapeButton::setDialogTitle | ( | const QString & | title | ) |
Sets the title for the symbol settings dialog window.
Definition at line 308 of file qgslegendpatchshapebutton.cpp.
| void QgsLegendPatchShapeButton::setMessageBar | ( | QgsMessageBar * | bar | ) |
Sets the message bar associated with the widget.
This allows the widget to push feedback messages to the appropriate message bar.
Definition at line 139 of file qgslegendpatchshapebutton.cpp.
| void QgsLegendPatchShapeButton::setPreviewSymbol | ( | QgsSymbol * | symbol | ) |
Sets the symbol to use for previewing the legend patch shape.
Ownership is transferred to the button. It is the caller's responsibility to ensure that the symbol type matches the button's symbolType()
Definition at line 95 of file qgslegendpatchshapebutton.cpp.
|
slot |
Sets the shape for the button.
Definition at line 149 of file qgslegendpatchshapebutton.cpp.
| void QgsLegendPatchShapeButton::setSymbolType | ( | Qgis::SymbolType | type | ) |
Sets the symbol type which the button requires.
If the type differs from the current symbol type, the symbol will be reset to a default symbol style of the new type.
Definition at line 63 of file qgslegendpatchshapebutton.cpp.
|
slot |
Resets the shape to the default shape.
Definition at line 115 of file qgslegendpatchshapebutton.cpp.
| QgsLegendPatchShape QgsLegendPatchShapeButton::shape | ( | ) |
Returns the current shape defined by the button.
Definition at line 318 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 240 of file qgslegendpatchshapebutton.cpp.
|
override |
Definition at line 58 of file qgslegendpatchshapebutton.cpp.
|
inline |
Returns the symbol type which the button requires.
Definition at line 66 of file qgslegendpatchshapebutton.h.