QGIS API Documentation 3.41.0-Master (57ec4277f5e)
|
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 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 28 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 311 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 51 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 306 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 93 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 61 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 316 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 238 of file qgslegendpatchshapebutton.cpp.
|
override |
Definition at line 56 of file qgslegendpatchshapebutton.cpp.
|
inline |
Returns the symbol type which the button requires.
Definition at line 63 of file qgslegendpatchshapebutton.h.