homescreenapp/hsdomainmodel/inc/hsidlewidget.h
changeset 69 87476091b3f5
equal deleted inserted replaced
67:474929a40a0f 69:87476091b3f5
       
     1 /*
       
     2 * Copyright (c) 2009 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 
       
    19 #ifndef HSIDLEWIDGET_H
       
    20 #define HSIDLEWIDGET_H
       
    21 
       
    22 #include <HbWidget>
       
    23 
       
    24 #include "hstest_global.h"
       
    25 #include "hsdomainmodel_global.h"
       
    26 
       
    27 HOMESCREEN_TEST_CLASS(TestHsDomainModel)
       
    28 
       
    29 class HsPage;
       
    30 class HsTrashBinWidget;
       
    31 class HsPageIndicator;
       
    32 class HsSnapLine;
       
    33 
       
    34 class HSDOMAINMODEL_EXPORT HsIdleWidget : public HbWidget
       
    35 {
       
    36     Q_OBJECT
       
    37     Q_PROPERTY(qreal sceneX READ sceneX WRITE setSceneX)
       
    38 
       
    39 public:
       
    40     HsIdleWidget(QGraphicsItem *parent = 0);
       
    41 		~HsIdleWidget();
       
    42 
       
    43     qreal sceneX() const;
       
    44     void setSceneX(qreal x);
       
    45 
       
    46     void setGeometry(const QRectF &rect);
       
    47 
       
    48     void setActivePage(int index);
       
    49     void insertPage(int index, HsPage *page);
       
    50     void removePage(int index);
       
    51 
       
    52     HbWidget *controlLayer() const { return mControlLayer; }
       
    53     HbWidget *pageLayer() const { return mPageLayer; }
       
    54     HbWidget *pageWallpaperLayer() const { return mPageWallpaperLayer; }
       
    55     HbWidget *sceneLayer() const { return mSceneLayer; }
       
    56 
       
    57     HsTrashBinWidget *trashBin() const { return mTrashBin; }
       
    58     HsPageIndicator *pageIndicator() const { return mPageIndicator; }
       
    59 
       
    60     qreal parallaxFactor() const;
       
    61 
       
    62 
       
    63 public slots:
       
    64     void showTrashBin();
       
    65     void showPageIndicator();
       
    66 
       
    67     void showVerticalSnapLine(const QLineF &snapLine);	
       
    68     void hideVerticalSnapLine();
       
    69     void showHorizontalSnapLine(const QLineF &snapLine);
       
    70     void hideHorizontalSnapLine();
       
    71 
       
    72 protected:
       
    73     void polishEvent();
       
    74 
       
    75 private:
       
    76     Q_DISABLE_COPY(HsIdleWidget)
       
    77     void loadControlLayer();
       
    78         
       
    79 private:
       
    80     HbWidget *mControlLayer;
       
    81     HbWidget *mPageLayer;
       
    82     HbWidget *mPageWallpaperLayer;
       
    83     HbWidget *mSceneLayer;
       
    84 
       
    85     HsTrashBinWidget *mTrashBin;
       
    86     HsPageIndicator *mPageIndicator;
       
    87 
       
    88     HsSnapLine *mHorizontalSnapLine;
       
    89     HsSnapLine *mVerticalSnapLine;
       
    90 
       
    91     HOMESCREEN_TEST_FRIEND_CLASS(TestHsDomainModel)
       
    92 };
       
    93 
       
    94 #endif // HSIDLEWIDGET_H