homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlestate.h
changeset 51 4785f57bf3d4
parent 46 23b5d6a29cce
child 55 03646e8da489
equal deleted inserted replaced
46:23b5d6a29cce 51:4785f57bf3d4
    19 #define HSIDLESTATE_H
    19 #define HSIDLESTATE_H
    20 
    20 
    21 #include <QState>
    21 #include <QState>
    22 #include <QTimer>
    22 #include <QTimer>
    23 #include <QPointF>
    23 #include <QPointF>
       
    24 #include <QPointer>
    24 
    25 
    25 #include "hstest_global.h"
    26 #include "hstest_global.h"
    26 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
    27 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
    27 
    28 
    28 class QGraphicsItem;
    29 class QGraphicsItem;
    29 class QGraphicsSceneMouseEvent;
    30 class QGraphicsSceneMouseEvent;
    30 class QPropertyAnimation;
    31 class QPropertyAnimation;
    31 class HbView;
       
    32 class HbAction;
    32 class HbAction;
    33 class HbContinuousFeedback;
    33 class HbContinuousFeedback;
    34 class HsIdleWidget;
    34 class HsIdleWidget;
    35 class HsTitleResolver;
    35 class HsTitleResolver;
    36 class QParallelAnimationGroup;
    36 class QParallelAnimationGroup;
    73     bool isInLeftPageChangeZone();
    73     bool isInLeftPageChangeZone();
    74     bool isInRightPageChangeZone();
    74     bool isInRightPageChangeZone();
    75     void addPageToScene(int pageIndex);
    75     void addPageToScene(int pageIndex);
    76     qreal parallaxFactor() const;
    76     qreal parallaxFactor() const;
    77     void updateZoneAnimation();
    77     void updateZoneAnimation();
       
    78     void showTrashBin();
    78     void removeActivePage();
    79     void removeActivePage();
    79 
    80 
    80 private slots:
    81 private slots:
    81     void action_disableUserInteraction();
    82     void action_disableUserInteraction();
    82     void action_enableUserInteraction();
    83     void action_enableUserInteraction();
   134         QGraphicsItem *watched, QGraphicsSceneMouseEvent *event, bool &filtered);
   135         QGraphicsItem *watched, QGraphicsSceneMouseEvent *event, bool &filtered);
   135     void moveScene_onMouseReleased(
   136     void moveScene_onMouseReleased(
   136         QGraphicsItem *watched, QGraphicsSceneMouseEvent *event, bool &filtered);
   137         QGraphicsItem *watched, QGraphicsSceneMouseEvent *event, bool &filtered);
   137 
   138 
   138     void onOrientationChanged(Qt::Orientation orientation);
   139     void onOrientationChanged(Qt::Orientation orientation);
   139 
       
   140     void widgetInteraction_onTapAndHoldTimeout();
   140     void widgetInteraction_onTapAndHoldTimeout();
   141     void sceneInteraction_onTapAndHoldTimeout();
   141     void sceneInteraction_onTapAndHoldTimeout();
   142 
       
   143     void onTitleChanged(QString title);
   142     void onTitleChanged(QString title);
   144 
       
   145     void onAddContentActionTriggered();
   143     void onAddContentActionTriggered();
   146 
       
   147     bool openTaskSwitcher();
   144     bool openTaskSwitcher();
   148     void zoneAnimationFinished();
   145     void zoneAnimationFinished();
       
   146     void onSceneMenuTriggered(HbAction *action);
       
   147     void onRemovePageMessageBoxClosed(HbAction *action);
   149     void onSceneMenuAboutToClose();
   148     void onSceneMenuAboutToClose();
   150     void onRemovePageMessageBoxClosed(HbAction *action);
       
   151 
   149 
   152 private:
   150 private:
   153     HbView *mView;
       
   154     HbAction *mNavigationAction;
   151     HbAction *mNavigationAction;
   155     HsIdleWidget *mUiWidget;
   152     HsIdleWidget *mUiWidget;
       
   153     
   156     QTimer mTimer;
   154     QTimer mTimer;
   157     qreal mTapAndHoldDistance;
   155     qreal mTapAndHoldDistance;
   158     qreal mPageChangeZoneWidth;
   156     qreal mPageChangeZoneWidth;
   159 
   157 
   160     QPointF mSceneMenuPos;
   158     QPointF mTouchScenePos;
   161     HsTitleResolver *mTitleResolver;
   159     HsTitleResolver *mTitleResolver;
   162     QPropertyAnimation *mZoneAnimation;
   160     QPropertyAnimation *mZoneAnimation;
   163     bool mPageChanged;
   161     bool mPageChanged;
   164     bool mAllowZoneAnimation;
   162     bool mAllowZoneAnimation;
   165     QParallelAnimationGroup *mPageChangeAnimation;
   163     QParallelAnimationGroup *mPageChangeAnimation;
   166     HbContinuousFeedback *mContinuousFeedback;
   164     HbContinuousFeedback *mContinuousFeedback;
   167     bool mTrashBinFeedbackAlreadyPlayed;
   165     bool mTrashBinFeedbackAlreadyPlayed;
   168 
   166 
   169     qreal mDeltaX;
   167     qreal mDeltaX;
       
   168     QPointer<HbMenu> mSceneMenu;
   170 #ifdef Q_OS_SYMBIAN    
   169 #ifdef Q_OS_SYMBIAN    
   171     XQSettingsManager *mSettingsMgr;
   170     XQSettingsManager *mSettingsMgr;
   172 #endif    
   171 #endif    
   173     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
   172     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
   174 };
   173 };