homescreenapp/hsdomainmodel/inc/hsgui.h
author hgs
Fri, 06 Aug 2010 13:36:36 +0300
changeset 71 1db7cc813a4e
parent 69 87476091b3f5
child 101 ba1b7e218624
permissions -rw-r--r--
201031
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
51
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     1
/*
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     2
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     3
* All rights reserved.
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     8
*
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
     9
* Initial Contributors:
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    11
*
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    12
* Contributors:
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    13
*
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    14
* Description:
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    15
*
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    16
*/
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    17
55
03646e8da489 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 51
diff changeset
    18
#ifndef HSGUI_H
03646e8da489 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 51
diff changeset
    19
#define HSGUI_H
51
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    20
69
hgs
parents: 55
diff changeset
    21
hgs
parents: 55
diff changeset
    22
#include <QObject>
51
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    23
#include <QPointer>
69
hgs
parents: 55
diff changeset
    24
#include <Hb> 
51
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    25
#include "hsdomainmodel_global.h"
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    26
#include "hstest_global.h"
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    27
69
hgs
parents: 55
diff changeset
    28
HOMESCREEN_TEST_CLASS(TestHsDomainModel)
51
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    29
HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    30
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    31
class HbView;
69
hgs
parents: 55
diff changeset
    32
class HsIdleWidget;
hgs
parents: 55
diff changeset
    33
class HsPropertyAnimationWrapper;
51
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    34
69
hgs
parents: 55
diff changeset
    35
struct HsGuiImpl;
hgs
parents: 55
diff changeset
    36
hgs
parents: 55
diff changeset
    37
class HSDOMAINMODEL_EXPORT HsGui: public QObject
51
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    38
{
69
hgs
parents: 55
diff changeset
    39
    Q_OBJECT
51
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    40
public:
69
hgs
parents: 55
diff changeset
    41
    ~HsGui();
hgs
parents: 55
diff changeset
    42
hgs
parents: 55
diff changeset
    43
    static HsGui *setInstance(HsGui *);
hgs
parents: 55
diff changeset
    44
    static HsGui *instance();
hgs
parents: 55
diff changeset
    45
    static HsGui *takeInstance();
hgs
parents: 55
diff changeset
    46
hgs
parents: 55
diff changeset
    47
    void setupIdleUi();
hgs
parents: 55
diff changeset
    48
    void cleanupIdleUi();
hgs
parents: 55
diff changeset
    49
hgs
parents: 55
diff changeset
    50
    void setOrientation(Qt::Orientation);
hgs
parents: 55
diff changeset
    51
    Qt::Orientation orientation();
hgs
parents: 55
diff changeset
    52
    
hgs
parents: 55
diff changeset
    53
    HbView *idleView() const;
hgs
parents: 55
diff changeset
    54
    HsIdleWidget *idleWidget() const;
hgs
parents: 55
diff changeset
    55
   
hgs
parents: 55
diff changeset
    56
    QRectF layoutRect() const;
hgs
parents: 55
diff changeset
    57
    
hgs
parents: 55
diff changeset
    58
    void show();
hgs
parents: 55
diff changeset
    59
    
hgs
parents: 55
diff changeset
    60
    HsPropertyAnimationWrapper *pageChangeAnimation();
hgs
parents: 55
diff changeset
    61
    HsPropertyAnimationWrapper *pageCrawlingAnimation();
hgs
parents: 55
diff changeset
    62
signals:
hgs
parents: 55
diff changeset
    63
    void orientationChanged(Qt::Orientation);
hgs
parents: 55
diff changeset
    64
    void navigateToApplibrary();
hgs
parents: 55
diff changeset
    65
 
hgs
parents: 55
diff changeset
    66
private:
hgs
parents: 55
diff changeset
    67
    HsGui(QObject *parent=0);
55
03646e8da489 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 51
diff changeset
    68
03646e8da489 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 51
diff changeset
    69
private:
69
hgs
parents: 55
diff changeset
    70
    static HsGui *mInstance;
hgs
parents: 55
diff changeset
    71
    HsGuiImpl *mImpl;
hgs
parents: 55
diff changeset
    72
    HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
55
03646e8da489 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 51
diff changeset
    73
    HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
51
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    74
};
4785f57bf3d4 Revision: 201019
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff changeset
    75
69
hgs
parents: 55
diff changeset
    76
55
03646e8da489 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 51
diff changeset
    77
03646e8da489 Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents: 51
diff changeset
    78
#endif // HSGUI_H