homescreenapp/hsdomainmodel/inc/hsgui.h
changeset 69 87476091b3f5
parent 55 03646e8da489
child 101 ba1b7e218624
equal deleted inserted replaced
67:474929a40a0f 69:87476091b3f5
    16 */
    16 */
    17 
    17 
    18 #ifndef HSGUI_H
    18 #ifndef HSGUI_H
    19 #define HSGUI_H
    19 #define HSGUI_H
    20 
    20 
       
    21 
       
    22 #include <QObject>
    21 #include <QPointer>
    23 #include <QPointer>
    22 
    24 #include <Hb> 
    23 #include "hsdomainmodel_global.h"
    25 #include "hsdomainmodel_global.h"
    24 #include "hstest_global.h"
    26 #include "hstest_global.h"
    25 
    27 
       
    28 HOMESCREEN_TEST_CLASS(TestHsDomainModel)
    26 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
    29 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
    27 
    30 
    28 class HbView;
    31 class HbView;
    29 class HbMainWindow;
    32 class HsIdleWidget;
       
    33 class HsPropertyAnimationWrapper;
    30 
    34 
    31 class HSDOMAINMODEL_EXPORT HsGui
    35 struct HsGuiImpl;
       
    36 
       
    37 class HSDOMAINMODEL_EXPORT HsGui: public QObject
    32 {
    38 {
       
    39     Q_OBJECT
    33 public:
    40 public:
    34 	static HbView *idleView();	
    41     ~HsGui();
    35 	static HbView *takeIdleView();
    42 
    36 	static void setIdleView(HbView *idleView);	
    43     static HsGui *setInstance(HsGui *);
    37 	
    44     static HsGui *instance();
    38     static HbMainWindow *mainWindow();
    45     static HsGui *takeInstance();
       
    46 
       
    47     void setupIdleUi();
       
    48     void cleanupIdleUi();
       
    49 
       
    50     void setOrientation(Qt::Orientation);
       
    51     Qt::Orientation orientation();
       
    52     
       
    53     HbView *idleView() const;
       
    54     HsIdleWidget *idleWidget() const;
       
    55    
       
    56     QRectF layoutRect() const;
       
    57     
       
    58     void show();
       
    59     
       
    60     HsPropertyAnimationWrapper *pageChangeAnimation();
       
    61     HsPropertyAnimationWrapper *pageCrawlingAnimation();
       
    62 signals:
       
    63     void orientationChanged(Qt::Orientation);
       
    64     void navigateToApplibrary();
       
    65  
       
    66 private:
       
    67     HsGui(QObject *parent=0);
    39 
    68 
    40 private:
    69 private:
    41     HsGui() {}
    70     static HsGui *mInstance;
    42 
    71     HsGuiImpl *mImpl;
    43 private:
    72     HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
    44 	static QPointer<HbView> mIdleView;
       
    45 	
       
    46     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
    73     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
    47 };
    74 };
    48 
    75 
    49 Q_DECLARE_METATYPE(HsGui*)
    76 
    50 
    77 
    51 #endif // HSGUI_H
    78 #endif // HSGUI_H