radioapp/radiowidgets/src/radiostripbase.cpp
changeset 34 bc10a61bd7d3
parent 28 075425b8d9a4
child 36 ba22309243a1
child 37 451b2e1545b2
child 41 3a6b55c6390c
--- a/radioapp/radiowidgets/src/radiostripbase.cpp	Fri Jun 11 13:38:32 2010 +0300
+++ b/radioapp/radiowidgets/src/radiostripbase.cpp	Fri Jun 25 19:09:05 2010 +0300
@@ -53,9 +53,6 @@
     // mItemParent is used to hold the unused QGraphicsItem's in the pool.  It's visibility is set to false
     // so the visibility of the items doesn't need to be modified.
     mItemPoolParent->setVisible( false );
-
-    Radio::connect( this,   SIGNAL(scrollPositionChanged(QPointF)),
-                    this,   SLOT(scrollPositionChanged(QPointF)));
 }
 
 /*!
@@ -217,15 +214,6 @@
 }
 
 /*!
- * Private slot
- */
-void RadioStripBase::scrollPositionChanged( QPointF newPosition )
-{
-    adjustItems();
-    scrollPosChanged( newPosition );
-}
-
-/*!
  *
  */
 void RadioStripBase::moveAllItemsToPool()
@@ -280,11 +268,7 @@
         }
     }
 
-    QRectF contentsRect(0,0,0,0);
-    contentsRect.setBottom( mItemSize.height() );
-    contentsRect.setRight( mContentsLength );
-
-    mStripContainer->setGeometry( contentsRect );
+    mStripContainer->setPreferredSize( mContentsLength, mItemSize.height() );
 
     if ( mCurrentIndex >= 0 )
     {
@@ -497,3 +481,16 @@
         }
     }
 }
+
+/*!
+ * \reimp
+ */
+bool RadioStripBase::scrollByAmount( const QPointF& delta )
+{
+    bool ret = HbScrollArea::scrollByAmount( delta );
+
+    adjustItems();
+    scrollPosChanged();
+
+    return ret;
+}