radioapp/radiouiengine/inc/radiouiengine.h
changeset 32 189d20c34778
parent 28 075425b8d9a4
child 33 11b6825f0862
equal deleted inserted replaced
28:075425b8d9a4 32:189d20c34778
    20 #define RADIOUIENGINE_H_
    20 #define RADIOUIENGINE_H_
    21 
    21 
    22 // System includes
    22 // System includes
    23 #include <QObject>
    23 #include <QObject>
    24 #include <QString>
    24 #include <QString>
       
    25 #include <QScopedPointer>
       
    26 #include <QSharedPointer>
    25 
    27 
    26 // User includes
    28 // User includes
    27 #include "radiouiengineexport.h"
    29 #include "radiouiengineexport.h"
    28 #include "radio_global.h"
    30 #include "radio_global.h"
    29 
    31 
    35 class RadioHistoryModel;
    37 class RadioHistoryModel;
    36 class RadioHistoryItem;
    38 class RadioHistoryItem;
    37 class RadioScannerEngine;
    39 class RadioScannerEngine;
    38 class RadioMonitorService;
    40 class RadioMonitorService;
    39 
    41 
       
    42 typedef QSharedPointer<RadioScannerEngine> RadioScannerEnginePtr;
       
    43 
    40 class UI_ENGINE_DLL_EXPORT RadioUiEngine : public QObject
    44 class UI_ENGINE_DLL_EXPORT RadioUiEngine : public QObject
    41 {
    45 {
    42     Q_OBJECT
    46     Q_OBJECT
    43     Q_DECLARE_PRIVATE_D( d_ptr, RadioUiEngine )
    47     Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioUiEngine )
    44     Q_DISABLE_COPY( RadioUiEngine )
    48     Q_DISABLE_COPY( RadioUiEngine )
    45 
    49 
    46     friend class RadioScannerEngine;
    50     friend class RadioScannerEngine;
    47 
    51 
    48 public:
    52 public:
    70      * Getters for things owned by the engine
    74      * Getters for things owned by the engine
    71      */
    75      */
    72     RadioSettingsIf& settings();
    76     RadioSettingsIf& settings();
    73     RadioStationModel& stationModel();
    77     RadioStationModel& stationModel();
    74     RadioHistoryModel& historyModel();
    78     RadioHistoryModel& historyModel();
    75     RadioScannerEngine* createScannerEngine();
    79     RadioScannerEnginePtr createScannerEngine();
    76     RadioScannerEngine* scannerEngine();
    80     RadioScannerEngine* scannerEngine();
    77 
    81 
    78     bool isRadioOn() const;
    82     bool isRadioOn() const;
    79     bool isScanning() const;
    83     bool isScanning() const;
    80     bool isMuted() const;
    84     bool isMuted() const;
    99 
   103 
   100     uint skipStation( StationSkip::Mode mode, uint startFrequency = 0 );
   104     uint skipStation( StationSkip::Mode mode, uint startFrequency = 0 );
   101 
   105 
   102     enum MusicStore{ OviStore, OtherStore };
   106     enum MusicStore{ OviStore, OtherStore };
   103     void openMusicStore( const RadioHistoryItem& item, MusicStore store = OviStore );
   107     void openMusicStore( const RadioHistoryItem& item, MusicStore store = OviStore );
       
   108 
       
   109     void launchBrowser( const QString& url );
   104 
   110 
   105     void setManualSeekMode( bool manualSeek );
   111     void setManualSeekMode( bool manualSeek );
   106     bool isInManualSeekMode() const;
   112     bool isInManualSeekMode() const;
   107 
   113 
   108     /**
   114     /**
   156 private: // data
   162 private: // data
   157 
   163 
   158     /**
   164     /**
   159      * Unmodifiable pointer to the private implementation
   165      * Unmodifiable pointer to the private implementation
   160      */
   166      */
   161     RadioUiEnginePrivate* const d_ptr;
   167     const QScopedPointer<RadioUiEnginePrivate> d_ptr;
   162 
   168 
   163 };
   169 };
   164 
   170 
   165 
   171 
   166 #endif // RADIOUIENGINE_H_
   172 #endif // RADIOUIENGINE_H_