43 Q_PROPERTY(HbIcon nowPlayingIcon READ nowPlayingIcon WRITE setNowPlayingIcon) |
44 Q_PROPERTY(HbIcon nowPlayingIcon READ nowPlayingIcon WRITE setNowPlayingIcon) |
44 Q_PROPERTY(HbIcon favoriteIcon READ favoriteIcon WRITE setFavoriteIcon) |
45 Q_PROPERTY(HbIcon favoriteIcon READ favoriteIcon WRITE setFavoriteIcon) |
45 |
46 |
46 public: |
47 public: |
47 |
48 |
48 explicit RadioStationsView( RadioXmlUiLoader* uiLoader ); |
49 explicit RadioStationsView(); |
|
50 ~RadioStationsView(); |
49 |
51 |
50 void setNowPlayingIcon( const HbIcon& nowPlayingIcon ); |
52 void setNowPlayingIcon( const HbIcon& nowPlayingIcon ); |
51 HbIcon nowPlayingIcon() const; |
53 HbIcon nowPlayingIcon() const; |
52 |
54 |
53 void setFavoriteIcon( const HbIcon& favoriteIcon ); |
55 void setFavoriteIcon( const HbIcon& favoriteIcon ); |
55 |
57 |
56 private slots: |
58 private slots: |
57 |
59 |
58 void listItemClicked( const QModelIndex& index ); |
60 void listItemClicked( const QModelIndex& index ); |
59 void listItemLongPressed( HbAbstractViewItem* item, const QPointF& coords ); |
61 void listItemLongPressed( HbAbstractViewItem* item, const QPointF& coords ); |
60 void updateHeadsetStatus( bool connected ); |
62 void updateAntennaStatus( bool connected ); |
61 void updateCurrentStation(); |
63 void updateCurrentStation(); |
62 void deckButtonPressed(); |
64 void deckButtonPressed(); |
63 void startScanAndSavePresets(); |
65 void startScanning(); |
64 void updateControlVisibilities(); |
66 void updateControlVisibilities(); |
|
67 void rename(); //contextmenu |
|
68 void toggleFavorite(); //contextmenu |
|
69 void deleteStation(); //contextmenu |
65 |
70 |
66 private: |
71 private: |
67 |
72 |
68 // from base class RadioViewBase |
73 // from base class RadioViewBase |
69 |
74 |
70 void init( RadioMainWindow* aMainWindow, RadioStationModel* aModel ); |
75 void init( RadioXmlUiLoader* uiLoader, RadioMainWindow* mainWindow ); |
71 |
76 |
72 // from base class QGraphicsWidget |
77 // from base class QGraphicsWidget |
73 |
78 |
74 void showEvent( QShowEvent* event ); |
79 void showEvent( QShowEvent* event ); |
75 |
80 |
76 // New functions |
81 // New functions |
77 |
82 |
78 void initListView(); |
83 void initListView(); |
79 |
84 |
80 void updateHeading(); |
|
81 |
|
82 private: //data |
85 private: //data |
83 |
86 |
84 RadioStationFilterModel* mFilterModel; |
87 RadioStationModel* mModel; |
85 |
88 |
86 HbAction* mScanStationsAction; |
89 RadioStationFilterModel* mFilterModel; |
87 HbAction* mRemoveAllPresetsAction; |
|
88 |
90 |
89 HbListView* mStationsList; |
91 HbAction* mScanStationsAction; |
|
92 HbAction* mClearListAction; |
90 |
93 |
91 RadioBannerLabel* mHeadingBanner; |
94 HbListView* mStationsList; |
92 |
95 |
93 HbAction* mFavoritesButton; |
96 RadioBannerLabel* mHeadingBanner; |
94 HbAction* mLocalStationsButton; |
|
95 |
97 |
96 HbIcon mFavoriteIcon; |
98 HbAction* mFavoritesButton; |
|
99 HbAction* mLocalStationsButton; |
97 |
100 |
98 HbIcon mNowPlayingIcon; |
101 HbIcon mFavoriteIcon; |
|
102 HbIcon mNowPlayingIcon; |
|
103 |
|
104 QScopedPointer<RadioStation> mSelectedStation; |
99 |
105 |
100 }; |
106 }; |
101 |
107 |
102 #endif // RADIOSTATIONSVIEW_H |
108 #endif // RADIOSTATIONSVIEW_H |