equal
deleted
inserted
replaced
29 // Forward declarations |
29 // Forward declarations |
30 class RadioStationModelPrivate; |
30 class RadioStationModelPrivate; |
31 class RadioPresetStorage; |
31 class RadioPresetStorage; |
32 class RadioStationHandlerIf; |
32 class RadioStationHandlerIf; |
33 class RadioEngineWrapper; |
33 class RadioEngineWrapper; |
34 class RadioUiEngine; |
|
35 class RadioStation; |
34 class RadioStation; |
|
35 class RadioUiEnginePrivate; |
36 class QIcon; |
36 class QIcon; |
37 |
37 |
38 // Constants |
38 // Constants |
39 typedef QMap<uint,RadioStation> Stations; |
39 typedef QMap<uint,RadioStation> Stations; |
40 |
40 |
59 ShowIcons = 1 << 1, |
59 ShowIcons = 1 << 1, |
60 ShowGenre = 1 << 2 |
60 ShowGenre = 1 << 2 |
61 }; |
61 }; |
62 Q_DECLARE_FLAGS( Detail, DetailFlag ) |
62 Q_DECLARE_FLAGS( Detail, DetailFlag ) |
63 |
63 |
64 explicit RadioStationModel( RadioUiEngine& uiEngine ); |
64 explicit RadioStationModel( RadioUiEnginePrivate& uiEngine ); |
65 |
65 |
66 ~RadioStationModel(); |
66 ~RadioStationModel(); |
67 |
67 |
68 // from base class QAbstractListModel |
68 // from base class QAbstractListModel |
69 |
69 |
73 bool setData( const QModelIndex& index, const QVariant& value, int role = Qt::EditRole ); |
73 bool setData( const QModelIndex& index, const QVariant& value, int role = Qt::EditRole ); |
74 |
74 |
75 // New functions |
75 // New functions |
76 |
76 |
77 /*! |
77 /*! |
78 * Called by the wrapper to initialize the list with given amount of presets |
78 * Called by the engine to initialize the list with given amount of presets |
79 */ |
79 */ |
80 void initialize( RadioPresetStorage* storage, RadioEngineWrapper* engine ); |
80 void initialize( RadioPresetStorage* storage, RadioEngineWrapper* wrapper ); |
81 |
81 |
82 /*! |
82 /*! |
83 * Sets the icons to be used in the lists |
83 * Sets the icons to be used in the lists |
84 */ |
84 */ |
85 void setIcons( const QIcon& favoriteIcon, const QIcon& nowPlayingIcon ); |
85 void setIcons( const QIcon& favoriteIcon, const QIcon& nowPlayingIcon ); |
102 |
102 |
103 /*! |
103 /*! |
104 * Functions to find stations by frequency |
104 * Functions to find stations by frequency |
105 */ |
105 */ |
106 bool findFrequency( uint frequency, RadioStation& station ); |
106 bool findFrequency( uint frequency, RadioStation& station ); |
|
107 |
|
108 /*! |
|
109 * Function to check the number of favorite stations |
|
110 */ |
|
111 int favoriteCount(); |
107 |
112 |
108 /*! |
113 /*! |
109 * Functions to find stations by preset index |
114 * Functions to find stations by preset index |
110 */ |
115 */ |
111 int findPresetIndex( int presetIndex ); |
116 int findPresetIndex( int presetIndex ); |