radioapp/radiowidgets/inc/radiofrequencyscanner.h
branchRCL_3
changeset 19 cce62ebc198e
equal deleted inserted replaced
18:1a6714c53019 19:cce62ebc198e
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef RADIOPRESETSCANNER_H_
       
    19 #define RADIOPRESETSCANNER_H_
       
    20 
       
    21 // System includes
       
    22 #include <QObject>
       
    23 #include <QSharedPointer>
       
    24 
       
    25 // Forward declarations
       
    26 class HbProgressDialog;
       
    27 class RadioStation;
       
    28 class RadioUiEngine;
       
    29 class RadioWindow;
       
    30 class RadioFrequencyStrip;
       
    31 class RadioStationCarousel;
       
    32 class RadioScannerEngine;
       
    33 
       
    34 // Class declaration
       
    35 class RadioFrequencyScanner : public QObject
       
    36 {
       
    37     Q_OBJECT
       
    38 
       
    39 public:
       
    40 
       
    41     RadioFrequencyScanner( RadioUiEngine& uiEngine, QObject* parent );
       
    42     ~RadioFrequencyScanner();
       
    43 
       
    44     void startScanning();
       
    45 
       
    46     bool isAlive() const;
       
    47 
       
    48 signals:
       
    49 
       
    50     void frequencyScannerFinished();
       
    51 
       
    52 public slots:
       
    53 
       
    54     void cancelScanning();
       
    55 
       
    56 private slots:
       
    57 
       
    58     void delayedStart();
       
    59     void updateScanProgress( const RadioStation& station );
       
    60     void continueScanning();
       
    61     void restoreUiControls();
       
    62 
       
    63 private:
       
    64 
       
    65     void finishScanning();
       
    66 
       
    67 private: // data
       
    68 
       
    69     /*!
       
    70      * Reference to the Ui engine
       
    71      */
       
    72     RadioUiEngine&                      mUiEngine;
       
    73 
       
    74     bool                                mInMainView;
       
    75 
       
    76     QSharedPointer<RadioScannerEngine>  mScannerEngine;
       
    77 
       
    78     /**
       
    79      * Scanning progress note
       
    80      * Own.
       
    81      */
       
    82     QWeakPointer<HbProgressDialog>      mScanningProgressNote;
       
    83 
       
    84     int                                 mStripScrollTime;
       
    85     int                                 mCarouselScrollTime;
       
    86 
       
    87     bool                                mIsAlive;
       
    88 
       
    89     bool                                mUserCanceled;
       
    90 
       
    91 };
       
    92 
       
    93 #endif // RADIOPRESETSCANNER_H_