--- a/contentstorage/caclient/src/caentry.cpp Fri Jun 11 13:58:37 2010 +0300
+++ b/contentstorage/caclient/src/caentry.cpp Wed Jun 23 18:33:40 2010 +0300
@@ -150,19 +150,20 @@
}
/*!
- Sets name of the item.
+ Sets localized name of the item.
\param text new name of the item.
+ \param localized set to true if its localized
\code
...
QString entryText( QString("EntryText") );
- resultEntry->setText( entryText);
+ resultEntry->setText( entryText, true);
...
\endcode
*/
-void CaEntry::setText(const QString &text)
+void CaEntry::setText(const QString &text, bool localized)
{
- m_d->setText(text);
+ m_d->setText(text, localized);
}
/*!
@@ -180,8 +181,9 @@
return m_d->description();
}
+
/*!
-Sets description of the item.
+Sets localized description of the item.
\param new description of the item.
\code
@@ -191,9 +193,10 @@
...
\endcode
*/
-void CaEntry::setDescription(const QString &description)
+void CaEntry::setDescription(const QString &description,
+ bool localized)
{
- m_d->setDescription(description);
+ m_d->setDescription(description, localized);
}
/*!
@@ -472,6 +475,11 @@
}
+bool CaEntry::isLocalized(LocalizationType localized) const
+{
+ return m_d->isLocalized(localized);
+}
+
/*
Constructor
\param entryPublic associated public entry
@@ -479,7 +487,8 @@
CaEntryPrivate::CaEntryPrivate(CaEntry *entryPublic) :
m_q(entryPublic), mId(0), mText(), mDescription(), mIconDescription(),
mFlags(RemovableEntryFlag|VisibleEntryFlag),mEntryTypeName(),
- mAttributes(), mEntryRole(ItemEntryRole)
+ mAttributes(), mEntryRole(ItemEntryRole),
+ mTextLocalized(false), mDescriptionLocalized(false)
{
}
/*!
@@ -497,6 +506,8 @@
mEntryTypeName = entry.mEntryTypeName;
mAttributes = entry.mAttributes;
mEntryRole = entry.mEntryRole;
+ mTextLocalized = entry.mTextLocalized;
+ mDescriptionLocalized = entry.mDescriptionLocalized;
return *this;
}
@@ -524,12 +535,13 @@
}
/*!
- Sets name of the item.
+ Sets localized name of the item.
\param text new name of the item.
*/
-void CaEntryPrivate::setText(const QString &text)
+void CaEntryPrivate::setText(const QString &text, bool localized)
{
mText = text;
+ mTextLocalized = localized;
}
/*!
@@ -544,9 +556,11 @@
Sets description of the item.
\param text new name of the item.
*/
-void CaEntryPrivate::setDescription(const QString &description)
+void CaEntryPrivate::setDescription(const QString &description,
+ bool localized)
{
mDescription = description;
+ mDescriptionLocalized = localized;
}
/*!
@@ -663,3 +677,18 @@
mEntryRole = role;
}
+bool CaEntryPrivate::isLocalized(LocalizationType localized) const
+{
+ if(localized == NameLocalized)
+ {
+ return mTextLocalized;
+ }
+ if(localized == DescriptionLocalized)
+ {
+ return mDescriptionLocalized;
+ }
+ return false;
+
+}
+
+