22 #include <QAbstractItemView> 41 QStringList QgsBlendModeComboBox::blendModesList()
const 43 return QStringList() <<
tr(
"Normal" )
70 QStringList myBlendModesList = blendModesList();
71 QStringList::const_iterator blendModeIt = myBlendModesList.constBegin();
73 mBlendModeToListIndex.resize( myBlendModesList.count() );
74 mListIndexToBlendMode.resize( myBlendModesList.count() );
78 int blendModeIndex = 0;
79 for ( ; blendModeIt != myBlendModesList.constEnd(); ++blendModeIt )
81 if ( *blendModeIt ==
"-" )
84 insertSeparator( index );
90 addItem( *blendModeIt );
91 mListIndexToBlendMode[
index ] = blendModeIndex;
92 mBlendModeToListIndex[ blendModeIndex ] =
index;
98 blockSignals(
false );
QgsBlendModeComboBox(QWidget *parent=0)
BlendMode
Blending modes enum defining the available composition modes that can be used when rendering a layer...
void setBlendMode(QPainter::CompositionMode blendMode)
Function to set the selected blend mode from QPainter::CompositionMode.
static QPainter::CompositionMode getCompositionMode(const QgsMapRenderer::BlendMode &blendMode)
Returns a QPainter::CompositionMode corresponding to a BlendMode.
QPainter::CompositionMode blendMode()
Function to read the selected blend mode as QPainter::CompositionMode.
virtual ~QgsBlendModeComboBox()
static QgsMapRenderer::BlendMode getBlendModeEnum(const QPainter::CompositionMode &blendMode)
Returns a BlendMode corresponding to a QPainter::CompositionMode.