equal
deleted
inserted
replaced
148 { |
148 { |
149 return m_d->text(); |
149 return m_d->text(); |
150 } |
150 } |
151 |
151 |
152 /*! |
152 /*! |
153 Sets name of the item. |
153 Sets localized name of the item. |
154 \param text new name of the item. |
154 \param text new name of the item. |
|
155 \param localized set to true if its localized |
155 |
156 |
156 \code |
157 \code |
157 ... |
158 ... |
158 QString entryText( QString("EntryText") ); |
159 QString entryText( QString("EntryText") ); |
159 resultEntry->setText( entryText); |
160 resultEntry->setText( entryText, true); |
160 ... |
161 ... |
161 \endcode |
162 \endcode |
162 */ |
163 */ |
163 void CaEntry::setText(const QString &text) |
164 void CaEntry::setText(const QString &text, bool localized) |
164 { |
165 { |
165 m_d->setText(text); |
166 m_d->setText(text, localized); |
166 } |
167 } |
167 |
168 |
168 /*! |
169 /*! |
169 Returns item description. |
170 Returns item description. |
170 \retval description of the item. |
171 \retval description of the item. |
178 QString CaEntry::description() const |
179 QString CaEntry::description() const |
179 { |
180 { |
180 return m_d->description(); |
181 return m_d->description(); |
181 } |
182 } |
182 |
183 |
183 /*! |
184 |
184 Sets description of the item. |
185 /*! |
|
186 Sets localized description of the item. |
185 \param new description of the item. |
187 \param new description of the item. |
186 |
188 |
187 \code |
189 \code |
188 ... |
190 ... |
189 QString entryDescription( QString("EntryDescription") ); |
191 QString entryDescription( QString("EntryDescription") ); |
190 resultEntry->entryDescription(entryDescription); |
192 resultEntry->entryDescription(entryDescription); |
191 ... |
193 ... |
192 \endcode |
194 \endcode |
193 */ |
195 */ |
194 void CaEntry::setDescription(const QString &description) |
196 void CaEntry::setDescription(const QString &description, |
195 { |
197 bool localized) |
196 m_d->setDescription(description); |
198 { |
|
199 m_d->setDescription(description, localized); |
197 } |
200 } |
198 |
201 |
199 /*! |
202 /*! |
200 Returns copy of icon description of the entry. |
203 Returns copy of icon description of the entry. |
201 \retval icon Description (CaIconDescription). |
204 \retval icon Description (CaIconDescription). |
470 { |
473 { |
471 return m_d->role(); |
474 return m_d->role(); |
472 } |
475 } |
473 |
476 |
474 |
477 |
|
478 bool CaEntry::isLocalized(LocalizationType localized) const |
|
479 { |
|
480 return m_d->isLocalized(localized); |
|
481 } |
|
482 |
475 /* |
483 /* |
476 Constructor |
484 Constructor |
477 \param entryPublic associated public entry |
485 \param entryPublic associated public entry |
478 */ |
486 */ |
479 CaEntryPrivate::CaEntryPrivate(CaEntry *entryPublic) : |
487 CaEntryPrivate::CaEntryPrivate(CaEntry *entryPublic) : |
480 m_q(entryPublic), mId(0), mText(), mDescription(), mIconDescription(), |
488 m_q(entryPublic), mId(0), mText(), mDescription(), mIconDescription(), |
481 mFlags(RemovableEntryFlag|VisibleEntryFlag),mEntryTypeName(), |
489 mFlags(RemovableEntryFlag|VisibleEntryFlag),mEntryTypeName(), |
482 mAttributes(), mEntryRole(ItemEntryRole) |
490 mAttributes(), mEntryRole(ItemEntryRole), |
|
491 mTextLocalized(false), mDescriptionLocalized(false) |
483 { |
492 { |
484 } |
493 } |
485 /*! |
494 /*! |
486 Copy assignment operator. |
495 Copy assignment operator. |
487 \param entry const reference to CaEntryPrivate. |
496 \param entry const reference to CaEntryPrivate. |
495 mIconDescription = entry.mIconDescription; |
504 mIconDescription = entry.mIconDescription; |
496 mFlags = entry.mFlags; |
505 mFlags = entry.mFlags; |
497 mEntryTypeName = entry.mEntryTypeName; |
506 mEntryTypeName = entry.mEntryTypeName; |
498 mAttributes = entry.mAttributes; |
507 mAttributes = entry.mAttributes; |
499 mEntryRole = entry.mEntryRole; |
508 mEntryRole = entry.mEntryRole; |
|
509 mTextLocalized = entry.mTextLocalized; |
|
510 mDescriptionLocalized = entry.mDescriptionLocalized; |
500 return *this; |
511 return *this; |
501 } |
512 } |
502 |
513 |
503 /*! |
514 /*! |
504 Destructor |
515 Destructor |
522 { |
533 { |
523 return mText; |
534 return mText; |
524 } |
535 } |
525 |
536 |
526 /*! |
537 /*! |
527 Sets name of the item. |
538 Sets localized name of the item. |
528 \param text new name of the item. |
539 \param text new name of the item. |
529 */ |
540 */ |
530 void CaEntryPrivate::setText(const QString &text) |
541 void CaEntryPrivate::setText(const QString &text, bool localized) |
531 { |
542 { |
532 mText = text; |
543 mText = text; |
|
544 mTextLocalized = localized; |
533 } |
545 } |
534 |
546 |
535 /*! |
547 /*! |
536 \retval description of the item. |
548 \retval description of the item. |
537 */ |
549 */ |
542 |
554 |
543 /*! |
555 /*! |
544 Sets description of the item. |
556 Sets description of the item. |
545 \param text new name of the item. |
557 \param text new name of the item. |
546 */ |
558 */ |
547 void CaEntryPrivate::setDescription(const QString &description) |
559 void CaEntryPrivate::setDescription(const QString &description, |
|
560 bool localized) |
548 { |
561 { |
549 mDescription = description; |
562 mDescription = description; |
|
563 mDescriptionLocalized = localized; |
550 } |
564 } |
551 |
565 |
552 /*! |
566 /*! |
553 \retval icon Description (CaIconDescription). |
567 \retval icon Description (CaIconDescription). |
554 */ |
568 */ |
661 void CaEntryPrivate::setRole(const EntryRole &role) |
675 void CaEntryPrivate::setRole(const EntryRole &role) |
662 { |
676 { |
663 mEntryRole = role; |
677 mEntryRole = role; |
664 } |
678 } |
665 |
679 |
|
680 bool CaEntryPrivate::isLocalized(LocalizationType localized) const |
|
681 { |
|
682 if(localized == NameLocalized) |
|
683 { |
|
684 return mTextLocalized; |
|
685 } |
|
686 if(localized == DescriptionLocalized) |
|
687 { |
|
688 return mDescriptionLocalized; |
|
689 } |
|
690 return false; |
|
691 |
|
692 } |
|
693 |
|
694 |