radioapp/radiowidgets/src/radiostationcarousel.cpp
changeset 33 11b6825f0862
parent 32 189d20c34778
child 37 451b2e1545b2
child 41 3a6b55c6390c
--- a/radioapp/radiowidgets/src/radiostationcarousel.cpp	Wed Jun 23 18:12:57 2010 +0300
+++ b/radioapp/radiowidgets/src/radiostationcarousel.cpp	Tue Jul 06 14:16:27 2010 +0300
@@ -23,6 +23,7 @@
 #include <HbSwipeGesture>
 #include <HbFontSpec>
 #include <HbMenu>
+#include <QPainter>
 
 // User includes
 #include "radiostationcarousel.h"
@@ -44,6 +45,11 @@
 const int FAVORITE_HINT_SHOW_DELAY = 1000;
 const int FAVORITE_HINT_HIDE_DELAY = 2000;
 
+// Matti testing constants
+const QLatin1String LEFT_ITEM_NAME      ( "carousel_left" );
+const QLatin1String CENTER_ITEM_NAME    ( "carousel_center" );
+const QLatin1String RIGHT_ITEM_NAME     ( "carousel_right" );
+
 #ifdef BUILD_WIN32
 #   define SCROLLBAR_POLICY ScrollBarAlwaysOn
 #else
@@ -148,6 +154,11 @@
     mItems[LeftItem] = new RadioCarouselItem( *this, this );
     mItems[RightItem] = new RadioCarouselItem( *this, this );
 
+    // Matti testing needs the objects to have names
+    mItems[LeftItem]->setObjectName( LEFT_ITEM_NAME );
+    mItems[CenterItem]->setObjectName( CENTER_ITEM_NAME );
+    mItems[RightItem]->setObjectName( RIGHT_ITEM_NAME );
+
     QGraphicsLinearLayout* layout = new QGraphicsLinearLayout( Qt::Horizontal );
     layout->setContentsMargins( 0, 0, 0, 0 );
     layout->setSpacing( 0 );
@@ -422,6 +433,14 @@
 }
 
 /*!
+ *
+ */
+void RadioStationCarousel::drawOffScreen( QPainter& painter )
+{
+    mItems[CenterItem]->drawOffScreen( painter );
+}
+
+/*!
  * TODO: Remove this! This is test code
  */
 void RadioStationCarousel::setAlternateSkippingMode( bool alternateSkipping )