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