--- a/radioapp/radiowidgets/inc/radioviewbase.h Fri Jun 04 10:21:36 2010 +0100
+++ b/radioapp/radiowidgets/inc/radioviewbase.h Fri Jun 11 13:38:32 2010 +0300
@@ -20,8 +20,8 @@
// System includes
#include <HbView>
-
#include <QScopedPointer>
+#include <QSharedPointer>
// User includes
@@ -30,13 +30,15 @@
class RadioStationModel;
class RadioUiLoader;
class HbAction;
+class RadioUiEngine;
// Constants
namespace MenuItem
{
enum CommonMenuItem
{
- UseLoudspeaker
+ UseLoudspeaker,
+ Exit
};
}
@@ -51,9 +53,9 @@
virtual ~RadioViewBase();
- void setMembers( RadioUiLoader* uiLoader, RadioWindow* mainWindow );
+ void setMembers( RadioWindow* mainWindow, RadioUiLoader* uiLoader );
- virtual void init() = 0;
+ void initialize( QSharedPointer<RadioUiEngine> uiEngine );
bool isInitialized() const;
@@ -61,6 +63,8 @@
void updateOrientation( Qt::Orientation orientation, bool forceUpdate = false );
+ void bringToForeground();
+
protected slots:
void updateAudioRouting( bool loudspeaker );
@@ -76,10 +80,10 @@
// New functinos
void initBackAction();
-
+
void connectCommonMenuItem( int menuItem );
- void connectXmlElement( const char* name, const char* signal, QObject* receiver, const char* slot );
+ void connectXmlElement( const QString& name, const char* signal, QObject* receiver, const char* slot );
void connectViewChangeMenuItem( QString name, const char* slot );
@@ -89,6 +93,8 @@
private:
+ virtual void init() = 0;
+
virtual void setOrientation();
virtual void userAccepted();
@@ -106,7 +112,11 @@
*/
QScopedPointer<RadioUiLoader> mUiLoader;
- bool mInitialized;
+ /**
+ * Pointer to the ui engine
+ * Shared among all views and the radio window
+ */
+ QSharedPointer<RadioUiEngine> mUiEngine;
/**
* Flag indicating whether or not the view is transient