QGIS API Documentation 3.41.0-Master (3440c17df1d)
|
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 230 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 143 of file qgslegendpatchshapebutton.cpp.
|
override |
Definition at line 51 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 177 of file qgslegendpatchshapebutton.cpp.
|
overrideprotected |
Definition at line 245 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 138 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 148 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 114 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 239 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 64 of file qgslegendpatchshapebutton.h.