homescreenapp/hsdomainmodel/inc/hsgui.h
changeset 69 87476091b3f5
parent 55 03646e8da489
child 101 ba1b7e218624
--- a/homescreenapp/hsdomainmodel/inc/hsgui.h	Wed Jul 14 15:53:30 2010 +0300
+++ b/homescreenapp/hsdomainmodel/inc/hsgui.h	Fri Jul 23 13:47:57 2010 +0300
@@ -18,34 +18,61 @@
 #ifndef HSGUI_H
 #define HSGUI_H
 
+
+#include <QObject>
 #include <QPointer>
-
+#include <Hb> 
 #include "hsdomainmodel_global.h"
 #include "hstest_global.h"
 
+HOMESCREEN_TEST_CLASS(TestHsDomainModel)
 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
 
 class HbView;
-class HbMainWindow;
+class HsIdleWidget;
+class HsPropertyAnimationWrapper;
 
-class HSDOMAINMODEL_EXPORT HsGui
+struct HsGuiImpl;
+
+class HSDOMAINMODEL_EXPORT HsGui: public QObject
 {
+    Q_OBJECT
 public:
-	static HbView *idleView();	
-	static HbView *takeIdleView();
-	static void setIdleView(HbView *idleView);	
-	
-    static HbMainWindow *mainWindow();
+    ~HsGui();
+
+    static HsGui *setInstance(HsGui *);
+    static HsGui *instance();
+    static HsGui *takeInstance();
+
+    void setupIdleUi();
+    void cleanupIdleUi();
+
+    void setOrientation(Qt::Orientation);
+    Qt::Orientation orientation();
+    
+    HbView *idleView() const;
+    HsIdleWidget *idleWidget() const;
+   
+    QRectF layoutRect() const;
+    
+    void show();
+    
+    HsPropertyAnimationWrapper *pageChangeAnimation();
+    HsPropertyAnimationWrapper *pageCrawlingAnimation();
+signals:
+    void orientationChanged(Qt::Orientation);
+    void navigateToApplibrary();
+ 
+private:
+    HsGui(QObject *parent=0);
 
 private:
-    HsGui() {}
-
-private:
-	static QPointer<HbView> mIdleView;
-	
+    static HsGui *mInstance;
+    HsGuiImpl *mImpl;
+    HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
 };
 
-Q_DECLARE_METATYPE(HsGui*)
+
 
 #endif // HSGUI_H