radioapp/radiowidgets/inc/radiofrequencyscanner.h
changeset 16 f54ebcfc1b80
parent 14 63aabac4416d
child 19 afea38384506
equal deleted inserted replaced
14:63aabac4416d 16:f54ebcfc1b80
    18 #ifndef RADIOPRESETSCANNER_H_
    18 #ifndef RADIOPRESETSCANNER_H_
    19 #define RADIOPRESETSCANNER_H_
    19 #define RADIOPRESETSCANNER_H_
    20 
    20 
    21 // System includes
    21 // System includes
    22 #include <QObject>
    22 #include <QObject>
       
    23 #include <QScopedPointer>
    23 
    24 
    24 // Forward declarations
    25 // Forward declarations
    25 class HbProgressDialog;
    26 class HbProgressDialog;
    26 class RadioStation;
    27 class RadioStation;
    27 class RadioUiEngine;
    28 class RadioUiEngine;
       
    29 class RadioXmlUiLoader;
       
    30 class RadioMainWindow;
       
    31 class RadioFrequencyStrip;
       
    32 class RadioStationCarousel;
       
    33 class RadioScannerEngine;
    28 
    34 
    29 // Class declaration
    35 // Class declaration
    30 class RadioFrequencyScanner : public QObject
    36 class RadioFrequencyScanner : public QObject
    31 {
    37 {
    32     Q_OBJECT
    38     Q_OBJECT
    33 
    39 
    34 public:
    40 public:
    35 
    41 
    36     RadioFrequencyScanner( RadioUiEngine& uiEngine, QObject* parent = 0 );
    42     RadioFrequencyScanner( RadioUiEngine& uiEngine, QObject* parent );
       
    43     ~RadioFrequencyScanner();
    37 
    44 
    38     void startScanning();
    45     void startScanning( RadioXmlUiLoader& uiLoader );
    39 
    46 
    40 signals:
    47 signals:
    41 
    48 
    42     void frequencyScannerFinished();
    49     void frequencyScannerFinished();
    43 
    50 
    44 private slots:
    51 private slots:
    45 
    52 
       
    53     void delayedStart();
    46     void updateScanAndSaveProgress( const RadioStation& station );
    54     void updateScanAndSaveProgress( const RadioStation& station );
       
    55     void continueScanning();
    47     void scanAndSavePresetsCancelled();
    56     void scanAndSavePresetsCancelled();
       
    57     void restoreUiControls();
       
    58 
       
    59 private:
       
    60 
    48     void scanAndSavePresetsFinished();
    61     void scanAndSavePresetsFinished();
    49 
    62 
    50 private: // data
    63 private: // data
    51 
    64 
    52     /*!
    65     /*!
    53      * Reference to the Ui engine
    66      * Reference to the Ui engine
    54      */
    67      */
    55     RadioUiEngine&      mUiEngine;
    68     RadioUiEngine&      mUiEngine;
       
    69 
       
    70     bool                mInTuningView;
       
    71 
       
    72     QScopedPointer<RadioScannerEngine> mScannerEngine;
    56 
    73 
    57     /**
    74     /**
    58      * Scanning progress note
    75      * Scanning progress note
    59      * Own.
    76      * Own.
    60      */
    77      */
    63     /**
    80     /**
    64      * Amount of radio stations found
    81      * Amount of radio stations found
    65      */
    82      */
    66     uint                mChannelCount;
    83     uint                mChannelCount;
    67 
    84 
    68     /**
    85     int                 mStripScrollTime;
    69      * Low frequency band edge. The lowest valid frequency at the current region
    86     int                 mCarouselScrollTime;
    70      */
       
    71     uint                mMinFrequency;
       
    72 
    87 
    73 };
    88 };
    74 
    89 
    75 #endif // RADIOPRESETSCANNER_H_
    90 #endif // RADIOPRESETSCANNER_H_