homescreenapp/hsdomainmodel/inc/hsgui.h
branchRCL_3
changeset 82 5f0182e07bfb
equal deleted inserted replaced
79:f00a6757af32 82:5f0182e07bfb
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef HSGUI_H
       
    19 #define HSGUI_H
       
    20 
       
    21 
       
    22 #include <QObject>
       
    23 #include <QPointer>
       
    24 #include <Hb> 
       
    25 #include "hsdomainmodel_global.h"
       
    26 #include "hstest_global.h"
       
    27 
       
    28 HOMESCREEN_TEST_CLASS(TestHsDomainModel)
       
    29 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
       
    30 
       
    31 class HbView;
       
    32 class HsIdleWidget;
       
    33 class HsPropertyAnimationWrapper;
       
    34 
       
    35 struct HsGuiImpl;
       
    36 
       
    37 class HSDOMAINMODEL_EXPORT HsGui: public QObject
       
    38 {
       
    39     Q_OBJECT
       
    40 public:
       
    41     ~HsGui();
       
    42 
       
    43     static HsGui *setInstance(HsGui *);
       
    44     static HsGui *instance();
       
    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);
       
    68 
       
    69 private:
       
    70     static HsGui *mInstance;
       
    71     HsGuiImpl *mImpl;
       
    72     HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
       
    73     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
       
    74 };
       
    75 
       
    76 
       
    77 
       
    78 #endif // HSGUI_H