QGIS API Documentation 3.28.0-Firenze (ed3ad0430f)
|
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. More... | |
void | setToDefault () |
Resets the shape to the default shape. More... | |
Signals | |
void | changed () |
Emitted when the shape's settings are changed. More... | |
Public Member Functions | |
QgsLegendPatchShapeButton (QWidget *parent=nullptr, const QString &dialogTitle=QString()) | |
Construct a new patch shape button with the specified parent widget. More... | |
~QgsLegendPatchShapeButton () override | |
QString | dialogTitle () const |
Returns the title for the symbol settings dialog window. More... | |
QgsMessageBar * | messageBar () const |
Returns the message bar associated with the widget. More... | |
QSize | minimumSizeHint () const override |
void | setDialogTitle (const QString &title) |
Sets the title for the symbol settings dialog window. More... | |
void | setMessageBar (QgsMessageBar *bar) |
Sets the message bar associated with the widget. More... | |
void | setPreviewSymbol (QgsSymbol *symbol) |
Sets the symbol to use for previewing the legend patch shape. More... | |
void | setSymbolType (Qgis::SymbolType type) |
Sets the symbol type which the button requires. More... | |
QgsLegendPatchShape | shape () |
Returns the current shape defined by the button. More... | |
QSize | sizeHint () const override |
Qgis::SymbolType | symbolType () const |
Returns the symbol type which the button requires. More... | |
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 36 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 27 of file qgslegendpatchshapebutton.cpp.
|
overridedefault |
|
signal |
Emitted when the shape's settings are changed.
|
overrideprotected |
Definition at line 229 of file qgslegendpatchshapebutton.cpp.
QString QgsLegendPatchShapeButton::dialogTitle | ( | ) | const |
Returns the title for the symbol settings dialog window.
Definition at line 312 of file qgslegendpatchshapebutton.cpp.
QgsMessageBar * QgsLegendPatchShapeButton::messageBar | ( | ) | const |
Returns the message bar associated with the widget.
Definition at line 142 of file qgslegendpatchshapebutton.cpp.
|
override |
Definition at line 50 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 176 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 244 of file qgslegendpatchshapebutton.cpp.
void QgsLegendPatchShapeButton::setDialogTitle | ( | const QString & | title | ) |
Sets the title for the symbol settings dialog window.
Definition at line 307 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 137 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 92 of file qgslegendpatchshapebutton.cpp.
|
slot |
Sets the shape for the button.
Definition at line 147 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 60 of file qgslegendpatchshapebutton.cpp.
|
slot |
Resets the shape to the default shape.
Definition at line 113 of file qgslegendpatchshapebutton.cpp.
QgsLegendPatchShape QgsLegendPatchShapeButton::shape | ( | ) |
Returns the current shape defined by the button.
Definition at line 317 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 238 of file qgslegendpatchshapebutton.cpp.
|
override |
Definition at line 55 of file qgslegendpatchshapebutton.cpp.
|
inline |
Returns the symbol type which the button requires.
Definition at line 64 of file qgslegendpatchshapebutton.h.