23 #include <QAbstractItemView>
33 QStringList QgsBlendModeComboBox::blendModesList()
const
35 return QStringList() << tr(
"Normal" )
36 << QStringLiteral(
"-" )
41 << QStringLiteral(
"-" )
45 << QStringLiteral(
"-" )
49 << QStringLiteral(
"-" )
59 QStringList myBlendModesList = blendModesList();
60 QStringList::const_iterator blendModeIt = myBlendModesList.constBegin();
62 mBlendModeToListIndex.resize( myBlendModesList.count() );
63 mListIndexToBlendMode.resize( myBlendModesList.count() );
67 int blendModeIndex = 0;
68 for ( ; blendModeIt != myBlendModesList.constEnd(); ++blendModeIt )
70 if ( *blendModeIt == QLatin1String(
"-" ) )
73 insertSeparator( index );
79 addItem( *blendModeIt );
80 mListIndexToBlendMode[ index ] = blendModeIndex;
81 mBlendModeToListIndex[ blendModeIndex ] = index;
87 blockSignals(
false );