QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
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... | |
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 (QgsSymbol::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 |
QgsSymbol::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 22 of file qgslegendpatchshapebutton.cpp.
|
signal |
Emitted when the shape's settings are changed.
|
overrideprotected |
Definition at line 222 of file qgslegendpatchshapebutton.cpp.
QString QgsLegendPatchShapeButton::dialogTitle | ( | ) | const |
Returns the title for the symbol settings dialog window.
Definition at line 309 of file qgslegendpatchshapebutton.cpp.
QgsMessageBar * QgsLegendPatchShapeButton::messageBar | ( | ) | const |
Returns the message bar associated with the widget.
Definition at line 135 of file qgslegendpatchshapebutton.cpp.
|
override |
Definition at line 43 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 169 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 237 of file qgslegendpatchshapebutton.cpp.
void QgsLegendPatchShapeButton::setDialogTitle | ( | const QString & | title | ) |
Sets the title for the symbol settings dialog window.
Definition at line 304 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 130 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 85 of file qgslegendpatchshapebutton.cpp.
|
slot |
Sets the shape for the button.
Definition at line 140 of file qgslegendpatchshapebutton.cpp.
void QgsLegendPatchShapeButton::setSymbolType | ( | QgsSymbol::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 53 of file qgslegendpatchshapebutton.cpp.
|
slot |
Resets the shape to the default shape.
Definition at line 106 of file qgslegendpatchshapebutton.cpp.
QgsLegendPatchShape QgsLegendPatchShapeButton::shape | ( | ) |
Returns the current shape defined by the button.
Definition at line 314 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 231 of file qgslegendpatchshapebutton.cpp.
|
override |
Definition at line 48 of file qgslegendpatchshapebutton.cpp.
|
inline |
Returns the symbol type which the button requires.
Definition at line 63 of file qgslegendpatchshapebutton.h.