radioapp/radiouiengine/inc/radiostationmodel.h
changeset 19 afea38384506
parent 16 f54ebcfc1b80
child 37 451b2e1545b2
--- a/radioapp/radiouiengine/inc/radiostationmodel.h	Mon May 03 12:31:41 2010 +0300
+++ b/radioapp/radiouiengine/inc/radiostationmodel.h	Fri May 14 15:52:32 2010 +0300
@@ -23,6 +23,7 @@
 #include <QMap>
 
 // User includes
+#include "radio_global.h"
 #include "radiouiengineexport.h"
 #include "radiostation.h"
 
@@ -106,23 +107,29 @@
     bool findFrequency( uint frequency, RadioStation& station );
 
     /*!
-    * Function to check the number of favorite stations
-    */
-    int favoriteCount();
-
-    /*!
      * Functions to find stations by preset index
      */
     int findPresetIndex( int presetIndex );
     int findPresetIndex( int presetIndex, RadioStation& station );
 
     /*!
+     * Finds the closest station from the given frequency
+     */
+    RadioStation findClosest( const uint frequency, StationSkip::Mode mode );
+
+    /*!
      * Functions to remove stations
      */
     void removeByFrequency( uint frequency );
     void removeByPresetIndex( int presetIndex );
     void removeStation( const RadioStation& station );
 
+    /**
+     * Removes all stations
+     */
+    enum RemoveMode{ RemoveAll, RemoveLocalStations, RemoveFavorites  };
+    void removeAll( RemoveMode mode = RemoveAll );
+
     /*!
      * Functions to add and save stations
      */
@@ -130,6 +137,11 @@
     void saveStation( RadioStation& station );
 
     /*!
+     * Function to check the number of favorite stations
+     */
+    int favoriteCount();
+
+    /*!
      * Convenience functions to change common settings
      */
     void setFavoriteByFrequency( uint frequency, bool favorite );
@@ -164,15 +176,6 @@
     void radioTextReceived( const RadioStation& station );
     void dynamicPsChanged( const RadioStation& station );
     void favoriteChanged( const RadioStation& station );
-    void stationRemoved( const RadioStation& station );
-    void stationAdded( const RadioStation& station );
-
-public slots:
-
-    /**
-     * Removes all stations
-     */
-    void removeAll();
 
 private slots: