diff -r 45e72b57a2fd -r e3cecb93e76a videocollection/videocollectionview/src/videohintwidget.cpp --- a/videocollection/videocollectionview/src/videohintwidget.cpp Tue Jul 06 14:17:50 2010 +0300 +++ b/videocollection/videocollectionview/src/videohintwidget.cpp Wed Aug 18 09:50:14 2010 +0300 @@ -15,7 +15,7 @@ * */ -// Version : %version: 14 % +// Version : %version: 15 % // INCLUDE FILES #include @@ -26,6 +26,7 @@ #include "videohintwidget.h" #include "videocollectionuiloader.h" #include "videocollectionviewutils.h" +#include "videocollectioncenrepdefs.h" #include "videocollectiontrace.h" // --------------------------------------------------------------------------- @@ -35,7 +36,6 @@ VideoHintWidget::VideoHintWidget( VideoCollectionUiLoader *uiLoader, QGraphicsItem *parent ) : HbWidget( parent ) , mUiLoader( uiLoader ) - , mServiceIcon( 0 ) , mCurrentLevel( AllVideos ) , mButtonShown( false ) , mActivated( false ) @@ -51,18 +51,22 @@ VideoHintWidget::~VideoHintWidget() { FUNC_LOG; - delete mServiceIcon; } // --------------------------------------------------------------------------- // initialize // --------------------------------------------------------------------------- // -int VideoHintWidget::initialize() +void VideoHintWidget::initialize() { FUNC_LOG; VideoCollectionViewUtils& utils = VideoCollectionViewUtils::instance(); - return utils.getServiceIconStrings(mServiceIconString, mServiceIconPressedString); + + QString textId = utils.getCenRepStringValue(KVideoCollectionViewCenrepServiceItem1Text); + if(!textId.isEmpty()) + { + mHintText = hbTrId(textId.toLatin1().constData()); + } } // --------------------------------------------------------------------------- @@ -118,15 +122,6 @@ mainWnd, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChangedSlot(Qt::Orientation))); - if(!mServiceIconString.isEmpty()) - { - mServiceIcon = new HbIcon(mServiceIconString); - } - if(mServiceIcon && !mServiceIconPressedString.isEmpty()) - { - mServiceIcon->setIconName(mServiceIconPressedString, QIcon::Normal, QIcon::On); - } - updateUiComponents(); setVisible(true); @@ -152,17 +147,6 @@ disconnect( mainWnd, SIGNAL(orientationChanged(Qt::Orientation)), this, SLOT(orientationChangedSlot(Qt::Orientation))); - - HbPushButton *serviceButton = - mUiLoader->findWidget( - DOCML_NAME_HINT_BUTTON); - if (serviceButton) - { - serviceButton->setIcon(HbIcon()); - } - - delete mServiceIcon; - mServiceIcon = 0; } } @@ -176,28 +160,24 @@ HbMainWindow *mainWnd = hbInstance->allMainWindows().value(0); if (mainWnd) { - HbPushButton *serviceButton = + HbPushButton *hintButton = mUiLoader->findWidget( DOCML_NAME_HINT_BUTTON); - HbLabel *hintLabel = - mUiLoader->findWidget( - DOCML_NAME_HINT_LABEL); HbLabel *noVideosLabel = mUiLoader->findWidget( DOCML_NAME_NO_VIDEOS_LABEL); - if (serviceButton && hintLabel && noVideosLabel) + if (hintButton && noVideosLabel) { noVideosLabel->setVisible(true); - if (mServiceIcon && mCurrentLevel == AllVideos) + + if (mCurrentLevel == AllVideos && !mHintText.isEmpty()) { - hintLabel->setVisible(true); - serviceButton->setIcon(*mServiceIcon); - serviceButton->setVisible(mButtonShown); + hintButton->setText(mHintText); + hintButton->setVisible(mButtonShown); } else { - hintLabel->setVisible(false); - serviceButton->setVisible(false); + hintButton->setVisible(false); } } }