diff -r 0930554dc389 -r 3b03c28289e6 qtinternetradio/ui/src/irnowplayingview.cpp --- a/qtinternetradio/ui/src/irnowplayingview.cpp Thu May 27 12:46:34 2010 +0300 +++ b/qtinternetradio/ui/src/irnowplayingview.cpp Fri Jun 11 13:30:40 2010 +0300 @@ -20,6 +20,12 @@ #include #include +#ifdef NOWPLAYING_VIEW_OPTION_B +#include +#include +#endif + + #include "irviewmanager.h" #include "irapplication.h" #include "irplaycontroller.h" @@ -51,6 +57,10 @@ static const QString KPlayButtonIcon("qtg_mono_play"); static const QString KStopButtonIcon("qtg_mono_stop"); +#ifdef NOWPLAYING_VIEW_OPTION_B +static const QString KLcdGraphics("qtg_fr_lcd"); +#endif + /* * Description : constructor */ @@ -58,6 +68,7 @@ IRBaseView(aApplication, aViewId), iStatisticsReporter(NULL), iNetworkController(NULL), + iStationShare(NULL), iPlayStopAction(NULL), iLaunchActionNeeded(false), iLogoDownloadState(EIdle), @@ -99,6 +110,8 @@ { iStatisticsReporter->closeInstance(); } + + delete iStationShare; } @@ -186,6 +199,17 @@ iStationName->setPlainText(""); iSongName->setPlainText(""); iArtistName->setPlainText(""); + +#ifdef NOWPLAYING_VIEW_OPTION_B + HbWidget * viewContainer = qobject_cast (iLoader.findObject(VIEW_CONTAINER)); + HbFrameDrawer* drawer = new HbFrameDrawer(KLcdGraphics, HbFrameDrawer::NinePieces); + HbFrameItem* backgroundItem = new HbFrameItem(drawer, viewContainer); + if (backgroundItem) + { + viewContainer->setBackgroundItem(backgroundItem); + } +#endif + #ifdef ADV_ENABLED iAdvImage = qobject_cast (iLoader.findObject( NOW_PLAYING_VIEW_OBJECT_ADVERTISEMENT_IMAGE)); iAdvImage->setIcon(HbIcon(KDefaultStationLogo)); @@ -735,8 +759,11 @@ void IRNowPlayingView::handleShareStationAction() { - IRStationShare stationShare; - stationShare.shareStations(*iPlayController->getNowPlayingPreset()); + if (NULL == iStationShare) + { + iStationShare = new IRStationShare(); + } + iStationShare->shareStations(*iPlayController->getNowPlayingPreset()); } void IRNowPlayingView::handleSettingAction()