本文整理汇总了C++中qgscategorylist::iterator::value方法的典型用法代码示例。如果您正苦于以下问题:C++ iterator::value方法的具体用法?C++ iterator::value怎么用?C++ iterator::value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qgscategorylist::iterator
的用法示例。
在下文中一共展示了iterator::value方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: rebuildHash
void QgsCategorizedSymbolRendererV2::startRender( QgsRenderContext& context, const QgsFields& fields )
{
// make sure that the hash table is up to date
rebuildHash();
// find out classification attribute index from name
mAttrNum = fields.fieldNameIndex( mAttrName );
if ( mAttrNum == -1 )
{
mExpression.reset( new QgsExpression( mAttrName ) );
mExpression->prepare( fields );
}
QgsCategoryList::iterator it = mCategories.begin();
for ( ; it != mCategories.end(); ++it )
{
it->symbol()->startRender( context, &fields );
if ( mRotation.data() || mSizeScale.data() )
{
QgsSymbolV2* tempSymbol = it->symbol()->clone();
tempSymbol->setRenderHints(( mRotation.data() ? QgsSymbolV2::DataDefinedRotation : 0 ) |
( mSizeScale.data() ? QgsSymbolV2::DataDefinedSizeScale : 0 ) );
tempSymbol->startRender( context, &fields );
mTempSymbols[ it->value().toString()] = tempSymbol;
}
}
}
示例2: rebuildHash
void QgsCategorizedSymbolRendererV2::startRender( QgsRenderContext& context, const QgsVectorLayer *vlayer )
{
// make sure that the hash table is up to date
rebuildHash();
// find out classification attribute index from name
mAttrNum = vlayer ? vlayer->fieldNameIndex( mAttrName ) : -1;
mRotationFieldIdx = ( mRotationField.isEmpty() ? -1 : vlayer->fieldNameIndex( mRotationField ) );
mSizeScaleFieldIdx = ( mSizeScaleField.isEmpty() ? -1 : vlayer->fieldNameIndex( mSizeScaleField ) );
QgsCategoryList::iterator it = mCategories.begin();
for ( ; it != mCategories.end(); ++it )
{
it->symbol()->startRender( context, vlayer );
if ( mRotationFieldIdx != -1 || mSizeScaleFieldIdx != -1 )
{
QgsSymbolV2* tempSymbol = it->symbol()->clone();
tempSymbol->setRenderHints(( mRotationFieldIdx != -1 ? QgsSymbolV2::DataDefinedRotation : 0 ) |
( mSizeScaleFieldIdx != -1 ? QgsSymbolV2::DataDefinedSizeScale : 0 ) );
tempSymbol->startRender( context, vlayer );
mTempSymbols[ it->value().toString()] = tempSymbol;
}
}
}