radioapp/radiowidgets/inc/radiowindow.h
changeset 28 075425b8d9a4
parent 19 afea38384506
child 32 189d20c34778
--- a/radioapp/radiowidgets/inc/radiowindow.h	Fri Jun 04 10:21:36 2010 +0100
+++ b/radioapp/radiowidgets/inc/radiowindow.h	Fri Jun 11 13:38:32 2010 +0300
@@ -23,6 +23,9 @@
 #include <HbEffect>
 #include <QPointer>
 #include <QScopedPointer>
+#include <QSharedPointer>
+#include <qsysteminfo.h>
+using namespace QtMobility; // has to be here to be able to connect SLOT queryOfflineUsage
 
 // User includes
 #include "radiowidgetsexport.h"
@@ -31,6 +34,7 @@
 class RadioViewBase;
 class RadioUiEngine;
 class HbVolumeSliderPopup;
+class HbMessageBox;
 
 typedef QScopedPointer<HbVolumeSliderPopup> VolumeSliderPtr;
 
@@ -49,15 +53,13 @@
 
 public:
 
-    RadioWindow( QWidget *parent = 0 );
+    RadioWindow( QWidget* parent = 0 );
 
     ~RadioWindow();
 
     void showErrorMessage( const QString& text );
 
-    void init();
-
-    RadioUiEngine& uiEngine();
+    void init( QSystemDeviceInfo* deviceInfo );
 
     QString orientationSection();
 
@@ -75,44 +77,57 @@
     void updateOrientation( Qt::Orientation orientation );
     void showVolumeLevel( int volume );
     void updateAntennaStatus( bool connected );
+    void queryOfflineUsage( QSystemDeviceInfo::Profile profile );
 
 private:
 
 // New functions
 
-    void activateView( ViewPtr& aMember, const QString& docmlFile, Hb::ViewSwitchFlags flags = Hb::ViewSwitchDefault );
+    void activateView( RadioViewBase* aMember, const QString& docmlFile, Hb::ViewSwitchFlags flags = Hb::ViewSwitchDefault );
 
 private: // data
 
     /*!
      * Pointer to the UI engine
-     * Own
+     * Own, shared with views
      */
-    QScopedPointer<RadioUiEngine>   mUiEngine;
+    QSharedPointer<RadioUiEngine>       mUiEngine;
 
     /**
      * Tuning view.
      * Own.
      */
-    ViewPtr                         mMainView;
+    ViewPtr                             mMainView;
 
     /**
      * Stations view
      * Own.
      */
-    ViewPtr                         mStationsView;
+    ViewPtr                             mStationsView;
 
     /**
      * Play history view
      * Own.
      */
-    ViewPtr                         mHistoryView;
+    ViewPtr                             mHistoryView;
 
     /**
      * Pointer to the volume slider
      * Own.
      */
-    VolumeSliderPtr                 mVolSlider;
+    VolumeSliderPtr                     mVolSlider;
+
+    /**
+     * Pointer to messagebox
+     * Own.
+     */
+    QScopedPointer<HbMessageBox>        mMessageBox;
+
+    /**
+     * Pointer to qsystemdeviceinfo
+     * Own.
+     */
+    QScopedPointer<QSystemDeviceInfo>   mDeviceInfo;
 
 };