mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-28 00:17:30 -05:00
Move QgsColorButton::createMenuIcon to public API, make static
This commit is contained in:
parent
938adb8c17
commit
79d01a9b94
@ -303,6 +303,16 @@ that are shown in the button's drop-down menu.
|
||||
swatch grids are hidden from the button's drop-down menu.
|
||||
|
||||
.. seealso:: :py:func:`setColorSchemeRegistry`
|
||||
%End
|
||||
|
||||
static QPixmap createMenuIcon( const QColor &color, bool showChecks = true );
|
||||
%Docstring
|
||||
Creates an icon for displaying a ``color`` in a drop-down menu.
|
||||
|
||||
If ``showChecks`` set to true, then a checkboard pattern will be shown behind
|
||||
semi-transparent colors.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
%End
|
||||
|
||||
public slots:
|
||||
|
@ -271,6 +271,16 @@ class GUI_EXPORT QgsColorButton : public QToolButton
|
||||
*/
|
||||
QgsColorSchemeRegistry *colorSchemeRegistry() { return mColorSchemeRegistry; }
|
||||
|
||||
/**
|
||||
* Creates an icon for displaying a \a color in a drop-down menu.
|
||||
*
|
||||
* If \a showChecks set to true, then a checkboard pattern will be shown behind
|
||||
* semi-transparent colors.
|
||||
*
|
||||
* \since QGIS 3.6
|
||||
*/
|
||||
static QPixmap createMenuIcon( const QColor &color, bool showChecks = true );
|
||||
|
||||
public slots:
|
||||
|
||||
/**
|
||||
@ -448,14 +458,6 @@ class GUI_EXPORT QgsColorButton : public QToolButton
|
||||
*/
|
||||
void stopPicking( QPoint eventPos, bool samplingColor = true );
|
||||
|
||||
/**
|
||||
* Create a color icon for display in the drop-down menu
|
||||
* \param color for icon
|
||||
* \param showChecks set to true to display a checkboard pattern behind
|
||||
* transparent colors
|
||||
*/
|
||||
QPixmap createMenuIcon( const QColor &color, bool showChecks = true );
|
||||
|
||||
private slots:
|
||||
|
||||
void buttonClicked();
|
||||
|
Loading…
x
Reference in New Issue
Block a user