当前位置: 首页>>代码示例>>C++>>正文


C++ CContactItemField::IsHidden方法代码示例

本文整理汇总了C++中CContactItemField::IsHidden方法的典型用法代码示例。如果您正苦于以下问题:C++ CContactItemField::IsHidden方法的具体用法?C++ CContactItemField::IsHidden怎么用?C++ CContactItemField::IsHidden使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CContactItemField的用法示例。


在下文中一共展示了CContactItemField::IsHidden方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: RestoreTextL

/**
Utility method used to read text fields from blob and fill item field set,Provides a mechanism to restore a 
contact item field set from text blob field within contact database.
Blob informations are stored based on contact item field. At restore, a reference to a contact item field set
is provided. For every contact item field in the item field set, a text restore is made.

@param		aFieldSet Reference to CContactItemFieldSet. Item field set that has to be filled with informations from blob
@param		aHeaderStore Stream store containing the header informations
@param		aId Root id for the header stream store
@param		aValuesStore Read stream used to read text fields from text blob
@param		aViewDef View definition indicating which fields have to be read from blob
@param		aTemplate Template indicating if current field set should be filled based on a template
*/	
void TCntPersistenceUtility::RestoreTextL(CContactItemFieldSet& aFieldSet, CStreamStore& aHeaderStore, TStreamId aId, HBufC* textStream, const CContactItemViewDef& aViewDef, const CContactItem* aTemplate)
	{
	const TBool KIncludeFields = ( aViewDef.Use() == CContactItemViewDef::EIncludeFields );
	
	if (KIncludeFields && aViewDef.Count() == 0)
		{
		// If view definition does not contain any field we don't do anything (don't read from 
		// blob). We simply return from method without doing anything.
		// This is not an error condition
		return;	
		}
		
	RStoreReadStream stream;
	stream.OpenLC(aHeaderStore,aId);
	
	TCardinality fieldCount;
	stream>>fieldCount;
	
	TInt textFieldIndex=0;

	for (TInt ii = 0; ii < fieldCount; ++ii)
		{
		// Restore text for every CContactItemField in provided CContactItemFieldSet.
		CContactItemField* field = CContactItemField::NewLC();
		
		if(aTemplate)
		    {
    		field->RestoreFieldTypesL(stream, &(aTemplate->CardFields()));
		    }
		else
		    {
    		field->RestoreFieldTypesL(stream, NULL);
		    }    
		    
		ASSERT(field->StorageType() == KStorageTypeText);

		TBool fieldDefined = ETrue;
		if(!aViewDef.MatchesAll())
			{
			fieldDefined = (aViewDef.Find(field->ContentType()) != KErrNotFound);
			}

		if ((!((fieldDefined && KIncludeFields) || (!fieldDefined && !KIncludeFields))) || 
			(field->IsHidden() && aViewDef.Mode() == CContactItemViewDef::EMaskHiddenFields))
			{
    		CleanupStack::PopAndDestroy(field); 	
			}
		else
		    {
    		field->RestoreTextL(textStream, textFieldIndex);
			aFieldSet.AddL(*field);
    		CleanupStack::Pop(field); 	
		    }	
		    
        ++textFieldIndex;
		}
	CleanupStack::PopAndDestroy(&stream);	
	}
开发者ID:Esclapion,项目名称:qt-mobility,代码行数:71,代码来源:cntpersistenceutility.cpp

示例2: DoCompareCContactItemFieldAttribute

TBool CPackagerCntComparator::DoCompareCContactItemFieldAttribute(const CContactItemField& anItemField1, const CContactItemField& anItemField2) const
/** Compares two CContactItemField items' field attributes. 

@param anItemField1 The first CContactItemField to be compared.
@param anItemField2 The second CContactItemField to be compared.
@return ETrue if the two items are equal, EFalse otherwise. */
	{	
	return ((anItemField1.IsHidden()		==anItemField2.IsHidden())			&
		(anItemField1.IsReadOnly()			==anItemField2.IsReadOnly())		&
		(anItemField1.IsDisabled()			==anItemField2.IsDisabled())		&
		(anItemField1.IsTemplate()			==anItemField2.IsTemplate())		&
		(anItemField1.DoSynchronize()		==anItemField2.DoSynchronize())		&
		(anItemField1.IsDeleted()			==anItemField2.IsDeleted())			&
		(anItemField1.OverRidesLabel()		==anItemField2.OverRidesLabel())	&
		(anItemField1.HasExtraStream()		==anItemField2.HasExtraStream())	&
		(anItemField1.UsesTemplateTypes()	==anItemField2.UsesTemplateTypes())	&
		(anItemField1.LabelUnspecified()	==anItemField2.LabelUnspecified())	&
		(anItemField1.UserAddedField()		==anItemField2.UserAddedField())	&
		(anItemField1.IsReadOnly()			==anItemField2.IsReadOnly()));
	}
开发者ID:bavanisp,项目名称:qtmobility-1.1.0,代码行数:20,代码来源:t_packagertesthelper.cpp


注:本文中的CContactItemField::IsHidden方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。