--- a/radioapp/radiowidgets/inc/radiostationcarousel.h Fri Jun 11 13:38:32 2010 +0300
+++ b/radioapp/radiowidgets/inc/radiostationcarousel.h Wed Jun 23 18:12:57 2010 +0300
@@ -21,9 +21,10 @@
// System includes
#include <HbScrollArea>
#include <HbIcon>
-#include <QPointer>
+#include <QWeakPointer>
// User includes
+#include "radiocarouselitemobserver.h"
#include "radiowidgetsexport.h"
#include "radio_global.h"
@@ -36,6 +37,7 @@
class RadioStationCarousel;
class RadioCarouselAnimator;
class HbLabel;
+class HbMenu;
namespace CarouselInfoText
{
@@ -53,6 +55,7 @@
// Class declaration
class WIDGETS_DLL_EXPORT RadioStationCarousel : public HbScrollArea
+ , public RadioCarouselItemObserver
{
Q_OBJECT
Q_PROPERTY(HbIcon favoriteIcon READ favoriteIcon WRITE setFavoriteIcon)
@@ -128,8 +131,6 @@
void updateRadioText( const RadioStation& station );
void updateStations();
void timerFired();
- void toggleFavorite();
-// void openContextMenu( HbAbstractViewItem* item, const QPointF& coords );
#ifdef USE_DEBUGGING_CONTROLS
void setRdsAvailable( bool available );
@@ -144,6 +145,15 @@
void showEvent( QShowEvent* event );
void gestureEvent( QGestureEvent* event );
+// from base class RadioCarouselItemObserver
+
+ void handleIconClicked( const RadioStation& station );
+ void handleRadiotextClicked( const RadioStation& station );
+ void handleUrlClicked( const RadioStation& station );
+ QString localizeGenre( int genre );
+ bool isInManualSeek() const;
+ RadioStation findStation( uint frequency );
+
// New functions
bool isInitialized() const;
@@ -182,10 +192,12 @@
QString mRadioTextHolder;
- QPointer<RadioCarouselAnimator> mAnimator;
+ QWeakPointer<RadioCarouselAnimator> mAnimator;
HbLabel* mInfoText;
+ HbMenu* mRadiotextPopup;
+
HbWidget* mContainer;
enum CarouselItem { LeftItem, CenterItem, RightItem };
@@ -209,7 +221,7 @@
bool mManualSeekMode;
bool mAlternateSkipping;
-
+
#ifdef USE_DEBUGGING_CONTROLS
RadioFadingLabel* mRdsLabel;
#endif