本文整理汇总了C++中propertytopropertymap::iterator类的典型用法代码示例。如果您正苦于以下问题:C++ iterator类的具体用法?C++ iterator怎么用?C++ iterator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了iterator类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: removeAntialiasingProperty
void FontPropertyManager::removeAntialiasingProperty(QtProperty *property)
{
const PropertyToPropertyMap::iterator ait = m_antialiasingToProperty.find(property);
if (ait == m_antialiasingToProperty.end())
return;
m_propertyToAntialiasing[ait.value()] = 0;
m_antialiasingToProperty.erase(ait);
}
示例2: slotPropertyDestroyed
void BrushPropertyManager::slotPropertyDestroyed(QtProperty *property)
{
PropertyToPropertyMap::iterator subit = m_brushStyleSubPropertyToProperty.find(property);
if (subit != m_brushStyleSubPropertyToProperty.end()) {
m_brushPropertyToStyleSubProperty[subit.value()] = 0;
m_brushStyleSubPropertyToProperty.erase(subit);
}
subit = m_brushColorSubPropertyToProperty.find(property);
if (subit != m_brushColorSubPropertyToProperty.end()) {
m_brushPropertyToColorSubProperty[subit.value()] = 0;
m_brushColorSubPropertyToProperty.erase(subit);
}
}
示例3: resetFontSubProperty
bool FontPropertyManager::resetFontSubProperty(QtVariantPropertyManager *vm, QtProperty *property)
{
const PropertyToPropertyMap::iterator it = m_fontSubPropertyToProperty.find(property);
if (it == m_fontSubPropertyToProperty.end())
return false;
QtVariantProperty *fontProperty = vm->variantProperty(it.value());
QVariant v = fontProperty->value();
QFont font = qvariant_cast<QFont>(v);
unsigned mask = font.resolve();
const unsigned flag = fontFlag(m_fontSubPropertyToFlag.value(property));
mask &= ~flag;
font.resolve(mask);
qVariantSetValue(v, font);
fontProperty->setValue(v);
return true;
}
示例4: uninitializeProperty
bool FontPropertyManager::uninitializeProperty(QtProperty *property)
{
const PropertyToPropertyMap::iterator ait = m_propertyToAntialiasing.find(property);
if (ait != m_propertyToAntialiasing.end()) {
QtProperty *antialiasing = ait.value();
m_antialiasingToProperty.remove(antialiasing);
m_propertyToAntialiasing.erase(ait);
delete antialiasing;
}
PropertyToSubPropertiesMap::iterator sit = m_propertyToFontSubProperties.find(property);
if (sit == m_propertyToFontSubProperties.end())
return false;
m_propertyToFontSubProperties.erase(sit);
m_fontSubPropertyToFlag.remove(property);
m_fontSubPropertyToProperty.remove(property);
return true;
}