equal
deleted
inserted
replaced
20 #include <HbIcon> |
20 #include <HbIcon> |
21 |
21 |
22 #include "caentry.h" |
22 #include "caentry.h" |
23 #include "caentry_p.h" |
23 #include "caentry_p.h" |
24 #include "caobjectadapter.h" |
24 #include "caobjectadapter.h" |
|
25 #include "caiconcache.h" |
|
26 #include "caclienttest_global.h" |
25 |
27 |
26 |
28 |
27 // ======== MEMBER FUNCTIONS ======== |
29 // ======== MEMBER FUNCTIONS ======== |
28 |
30 |
29 /*! |
31 /*! |
405 icon.width() == 50 |
407 icon.width() == 50 |
406 icon.height() == 80 |
408 icon.height() == 80 |
407 icon.size() == iconSize; |
409 icon.size() == iconSize; |
408 \endcode |
410 \endcode |
409 */ |
411 */ |
410 HbIcon CaEntry::makeIcon(const QSize& size) const |
412 HbIcon CaEntry::makeIcon(const QSize &size) const |
411 { |
413 { |
412 return m_d->makeIcon(size); |
414 CACLIENTTEST_FUNC_ENTRY("CaEntry::makeIcon"); |
|
415 HbIcon icon; |
|
416 if (CaIconCache::cache()->exist(*this,size)) { |
|
417 icon = CaIconCache::cache()->icon(*this,size); |
|
418 } else { |
|
419 icon = m_d->makeIcon(size); |
|
420 CaIconCache::cache()->insert(*this, size, icon); |
|
421 } |
|
422 CACLIENTTEST_FUNC_EXIT("CaEntry::makeIcon"); |
|
423 return icon; |
413 } |
424 } |
414 |
425 |
415 /*! |
426 /*! |
416 Sets entry id. |
427 Sets entry id. |
417 \param id item id. |
428 \param id item id. |
458 /* |
469 /* |
459 Constructor |
470 Constructor |
460 \param entryPublic associated public entry |
471 \param entryPublic associated public entry |
461 */ |
472 */ |
462 CaEntryPrivate::CaEntryPrivate(CaEntry *entryPublic) : |
473 CaEntryPrivate::CaEntryPrivate(CaEntry *entryPublic) : |
463 m_q(entryPublic), mId(0), mText(), mDescription(), mIconDescription(), |
474 m_q(entryPublic), mId(0), mText(), mDescription(), mIconDescription(), |
464 mFlags(RemovableEntryFlag|VisibleEntryFlag),mEntryTypeName(), |
475 mFlags(RemovableEntryFlag|VisibleEntryFlag),mEntryTypeName(), |
465 mAttributes() |
476 mAttributes() |
466 { |
477 { |
467 } |
478 } |
468 /*! |
479 /*! |
614 /*! |
625 /*! |
615 Creates an icon. |
626 Creates an icon. |
616 \param size icon size to display |
627 \param size icon size to display |
617 \retval created icon (HbIcon). |
628 \retval created icon (HbIcon). |
618 */ |
629 */ |
619 HbIcon CaEntryPrivate::makeIcon(const QSize& size) const |
630 HbIcon CaEntryPrivate::makeIcon(const QSize &size) const |
620 { |
631 { |
621 return CaObjectAdapter::makeIcon(*m_q, size); |
632 return CaObjectAdapter::makeIcon(*m_q, size); |
622 } |
633 } |
623 |
634 |
624 /*! |
635 /*! |