qtinternetradio/ui/src/irabstractlistviewbase.cpp
changeset 5 0930554dc389
parent 3 ee64f059b8e1
child 11 f683e24efca3
--- a/qtinternetradio/ui/src/irabstractlistviewbase.cpp	Fri May 14 15:43:29 2010 +0300
+++ b/qtinternetradio/ui/src/irabstractlistviewbase.cpp	Thu May 27 12:46:34 2010 +0300
@@ -24,6 +24,8 @@
 #include <HbGroupBox>
 #include <HbMarqueeItem>
 #include <HbLabel>
+#include <hbframedrawer.h>
+#include <hbframeitem.h>
 
 #include "irviewmanager.h"
 #include "irabstractlistviewbase.h"
@@ -36,6 +38,8 @@
 #include "iruidefines.h"
  
 const int KAnimationLoopTimes = 2; // Animation loop times
+//#define NOW_PLAYING_BANNER_FRAME "qtg_fr_multimedia_trans"
+#define NOW_PLAYING_BANNER_FRAME "qtg_fr_popup_list_highlight"
 
 IrAbstractListViewBase::IrAbstractListViewBase(IRApplication *aApplication, TIRViewId aViewId)
     : IRBaseView(aApplication, aViewId),
@@ -117,6 +121,17 @@
     iArtistSongName->setLoopCount(KAnimationLoopTimes);
 
     iListView = qobject_cast<HbListView *>(iLoader.findObject(ABSTRACT_LIST_VIEW_BASE_OBJECT_LISTVIEW));
+
+    // draw background for now playing banner
+    HbFrameDrawer* drawer = new HbFrameDrawer(NOW_PLAYING_BANNER_FRAME, HbFrameDrawer::NinePieces);
+    HbFrameItem* backgroundItem = new HbFrameItem(drawer, iPlayingBanner);
+    if (backgroundItem)
+    {
+        // set item to fill the whole widget
+        backgroundItem->setGeometry(QRectF(QPointF(0, 0), iPlayingBanner->size()));
+        backgroundItem->setZValue(0);
+        iPlayingBanner->setBackgroundItem(backgroundItem);
+    }
 }
 
 void IrAbstractListViewBase::initScrollBar()
@@ -138,6 +153,13 @@
     return iViewParameter;
 }
 
+void IrAbstractListViewBase::setPlayingBannerTextColor(const QString &aColor)
+{
+    QColor color(aColor);
+    iStationName->setTextColor(color);
+    iArtistSongName->setTextColor(color);
+}
+
 void IrAbstractListViewBase::setCheckedAction()
 {       
     //default implementation