radioapp/radiowidgets/inc/radiofrequencyscanner.h
changeset 24 6df133bd92e1
child 28 075425b8d9a4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/radioapp/radiowidgets/inc/radiofrequencyscanner.h	Fri Jun 04 10:21:36 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description:
+*
+*/
+
+#ifndef RADIOPRESETSCANNER_H_
+#define RADIOPRESETSCANNER_H_
+
+// System includes
+#include <QObject>
+#include <QScopedPointer>
+
+// Forward declarations
+class HbProgressDialog;
+class RadioStation;
+class RadioUiEngine;
+class RadioWindow;
+class RadioFrequencyStrip;
+class RadioStationCarousel;
+class RadioScannerEngine;
+
+// Class declaration
+class RadioFrequencyScanner : public QObject
+{
+    Q_OBJECT
+
+public:
+
+    RadioFrequencyScanner( RadioUiEngine& uiEngine, QObject* parent );
+    ~RadioFrequencyScanner();
+
+    void startScanning();
+
+    bool isAlive() const;
+
+signals:
+
+    void frequencyScannerFinished();
+
+public slots:
+
+    void cancelScanning();
+
+private slots:
+
+    void delayedStart();
+    void updateScanProgress( const RadioStation& station );
+    void continueScanning();
+    void restoreUiControls();
+
+private:
+
+    void finishScanning();
+
+private: // data
+
+    /*!
+     * Reference to the Ui engine
+     */
+    RadioUiEngine&                      mUiEngine;
+
+    bool                                mInMainView;
+
+    QScopedPointer<RadioScannerEngine>  mScannerEngine;
+
+    /**
+     * Scanning progress note
+     * Own.
+     */
+    QScopedPointer<HbProgressDialog>    mScanningProgressNote;
+
+    int                                 mStripScrollTime;
+    int                                 mCarouselScrollTime;
+
+    bool                                mIsAlive;
+
+};
+
+#endif // RADIOPRESETSCANNER_H_