20#include "moc_qgsblendmodecombobox.cpp"
23#include <QAbstractItemView>
31 setSizeAdjustPolicy( QComboBox::AdjustToMinimumContentsLengthWithIcon );
44 insertSeparator( count() );
49 insertSeparator( count() );
53 insertSeparator( count() );
57 insertSeparator( count() );
63 insertSeparator( count() );
72 blockSignals(
false );
87 mShowClipModes = show;
88 const QPainter::CompositionMode mode =
blendMode();
96 return mShowClipModes;
BlendMode
Blending modes defining the available composition modes that can be used when painting.
@ DestinationOut
Destination out.
@ DestinationIn
Destination in.
@ DestinationAtop
Destination atop.
void setBlendMode(QPainter::CompositionMode blendMode)
Sets the selected blend mode.
void setShowClippingModes(bool show)
Sets whether composition modes which cause clipping are shown in the combo box.
QgsBlendModeComboBox(QWidget *parent=nullptr)
Constructor for QgsBlendModeComboBox.
void updateModes()
Populates the blend mode combo box, and sets up mapping for blend modes to combo box indexes.
bool showClippingModes() const
Returns true if composition modes which cause clipping are shown in the combo box.
QPainter::CompositionMode blendMode()
Returns the selected blend mode.
static Qgis::BlendMode getBlendModeEnum(QPainter::CompositionMode blendMode)
Returns a Qgis::BlendMode corresponding to a QPainter::CompositionMode.
static QPainter::CompositionMode getCompositionMode(Qgis::BlendMode blendMode)
Returns a QPainter::CompositionMode corresponding to a Qgis::BlendMode.