22 #include <QAbstractItemView>
41 QStringList QgsBlendModeComboBox::blendModesList()
const
73 mBlendModeToListIndex.resize( myBlendModesList.
count() );
74 mListIndexToBlendMode.resize( myBlendModesList.
count() );
78 int blendModeIndex = 0;
79 for ( ; blendModeIt != myBlendModesList.
constEnd(); ++blendModeIt )
81 if ( *blendModeIt ==
"-" )
91 mListIndexToBlendMode[
index ] = blendModeIndex;
92 mBlendModeToListIndex[ blendModeIndex ] =
index;
QgsBlendModeComboBox(QWidget *parent=0)
QString tr(const char *sourceText, const char *disambiguation, int n)
BlendMode
Blending modes enum defining the available composition modes that can be used when rendering a layer...
void addItem(const QString &text, const QVariant &userData)
int count(const T &value) const
void insertSeparator(int index)
void setBlendMode(QPainter::CompositionMode blendMode)
Function to set the selected blend mode from QPainter::CompositionMode.
bool blockSignals(bool block)
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.
const_iterator constEnd() const
const_iterator constBegin() const