homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlestate.h
changeset 77 4b195f3bea29
parent 61 2b1b11a301d2
child 92 6727c5d0afc7
equal deleted inserted replaced
61:2b1b11a301d2 77:4b195f3bea29
    29 #include "hstest_global.h"
    29 #include "hstest_global.h"
    30 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
    30 HOMESCREEN_TEST_CLASS(HomeScreenStatePluginTest)
    31 
    31 
    32 class QGraphicsItem;
    32 class QGraphicsItem;
    33 class QGraphicsSceneMouseEvent;
    33 class QGraphicsSceneMouseEvent;
    34 class QPropertyAnimation;
    34 
    35 class QGestureEvent;
    35 class QGestureEvent;
    36 class HbAction;
    36 class HbAction;
    37 class HbContinuousFeedback;
    37 class HbContinuousFeedback;
    38 class HsIdleWidget;
    38 
    39 class HsTitleResolver;
    39 class HsTitleResolver;
    40 class QParallelAnimationGroup;
    40 class QParallelAnimationGroup;
    41 class HbMenu;
    41 class HbMenu;
    42 #ifdef Q_OS_SYMBIAN
    42 #ifdef Q_OS_SYMBIAN
    43 class XQSettingsManager;
    43 class XQSettingsManager;
    44 #endif
    44 #endif
    45 
    45 
    46 class HsWidgetHost;
    46 class HsWidgetHost;
       
    47 class HsPage;
       
    48 class HsMessageBoxWrapper;
       
    49 
    47 
    50 
    48 class HsIdleState : public QState
    51 class HsIdleState : public QState
    49 {
    52 {
    50     Q_OBJECT
    53     Q_OBJECT
    51 
    54 
    58     void event_waitInput();
    61     void event_waitInput();
    59     void event_moveWidget();
    62     void event_moveWidget();
    60     void event_moveScene();
    63     void event_moveScene();
    61     void event_selectWallpaper();
    64     void event_selectWallpaper();
    62     void event_addPage();
    65     void event_addPage();
       
    66     void event_preRemovePage();
    63     void event_removePage();
    67     void event_removePage();
    64     void event_toggleConnection();
    68     void event_toggleConnection();
    65 
    69 
    66 protected:
    70 protected:
    67     bool eventFilter(QObject *watched, QEvent *event);
    71     bool eventFilter(QObject *watched, QEvent *event);
    76     bool isInLeftPageChangeZone();
    80     bool isInLeftPageChangeZone();
    77     bool isInRightPageChangeZone();
    81     bool isInRightPageChangeZone();
    78     void addPageToScene(int pageIndex);    
    82     void addPageToScene(int pageIndex);    
    79     void updateZoneAnimation();
    83     void updateZoneAnimation();
    80     void showTrashBin();
    84     void showTrashBin();
    81     void removeActivePage();
       
    82     void deleteZoneAnimation();
       
    83     QList<QRectF> createInactiveWidgetRects();
    85     QList<QRectF> createInactiveWidgetRects();
    84     void updatePagePresentationToWidgetSnap();
    86     void updatePagePresentationToWidgetSnap();
    85     void resetSnapPosition();
    87     void resetSnapPosition();
    86     void showVerticalLine();
    88     void showVerticalLine();
    87     void showHorizontalLine();
    89     void showHorizontalLine();
   115     void action_moveWidget_deleteWidgetSnap();
   117     void action_moveWidget_deleteWidgetSnap();
   116     void action_moveScene_connectGestureHandlers();
   118     void action_moveScene_connectGestureHandlers();
   117     void action_moveScene_moveToNearestPage();
   119     void action_moveScene_moveToNearestPage();
   118     void action_moveScene_disconnectGestureHandlers();    
   120     void action_moveScene_disconnectGestureHandlers();    
   119     void action_addPage_addPage();
   121     void action_addPage_addPage();
       
   122     void action_preRemovePage_showQuery();
       
   123     void action_preRemovePage_exit();
       
   124     void action_removePage_startRemovePageAnimation();
   120     void action_removePage_removePage();
   125     void action_removePage_removePage();
   121     void action_toggleConnection_toggleConnection();
   126     void action_toggleConnection_toggleConnection();
   122     void action_idle_setupTitle();
   127     void action_idle_setupTitle();
   123     void action_idle_cleanupTitle();
   128     void action_idle_cleanupTitle();
   124     
   129     
   134     void onAddContentFromContextMenuActionTriggered();
   139     void onAddContentFromContextMenuActionTriggered();
   135     void onAddContentFromOptionsMenuActionTriggered();
   140     void onAddContentFromOptionsMenuActionTriggered();
   136     bool openTaskSwitcher();
   141     bool openTaskSwitcher();
   137     void zoneAnimationFinished();
   142     void zoneAnimationFinished();
   138     void pageChangeAnimationFinished();
   143     void pageChangeAnimationFinished();
   139     void onRemovePageConfirmationOk();
       
   140     void onVerticalSnapLineTimerTimeout();
   144     void onVerticalSnapLineTimerTimeout();
   141     void onHorizontalSnapLineTimerTimeout();
   145     void onHorizontalSnapLineTimerTimeout();
   142     void onActivePageChanged();
   146     void onActivePageChanged();
   143 
   147    
   144 private:
   148 private:
   145     HbAction *mNavigationAction;
   149     HbAction *mNavigationAction;
   146     HsIdleWidget *mUiWidget;  
   150     
   147     HsTitleResolver *mTitleResolver;
   151     HsTitleResolver *mTitleResolver;
   148     QPropertyAnimation *mZoneAnimation;
   152   
   149     bool mAllowZoneAnimation;
   153     bool mAllowZoneAnimation;
   150     QPropertyAnimation *mPageChangeAnimation;
   154     
   151     HbContinuousFeedback *mContinuousFeedback;
   155     HbContinuousFeedback *mContinuousFeedback;
   152     bool mTrashBinFeedbackAlreadyPlayed;    
   156     bool mTrashBinFeedbackAlreadyPlayed;    
   153     QPointF mPageHotSpot;
   157     QPointF mPageHotSpot;
   154     QPointF mWidgetHotSpot;
   158     QPointF mWidgetHotSpot;
   155     QPointF mWidgetHotSpotOffset;
   159     QPointF mWidgetHotSpotOffset;
   156     qreal mDeltaX;
   160     qreal mDeltaX;
   157     QPointer<HbMenu> mSceneMenu;
   161     QPointer<HbMenu> mSceneMenu;
   158     HsWidgetPositioningOnWidgetMove::Result mSnapResult;
   162     HsWidgetPositioningOnWidgetMove::Result mSnapResult;
   159     HsWidgetPositioningOnWidgetMove::Result mPreviousSnapResult;
   163     HsWidgetPositioningOnWidgetMove::Result mPreviousSnapResult;
   160     qreal mSnapBorderGap;
       
   161     QTimer mVerticalSnapLineTimer;
   164     QTimer mVerticalSnapLineTimer;
   162     QTimer mHorizontalSnapLineTimer;
   165     QTimer mHorizontalSnapLineTimer; 
   163 #ifdef Q_OS_SYMBIAN    
   166 #ifdef Q_OS_SYMBIAN    
   164     XQSettingsManager *mSettingsMgr;
   167     XQSettingsManager *mSettingsMgr;
   165 #endif    
   168 #endif    
       
   169     HsMessageBoxWrapper *mMessageBoxWrapper;
       
   170 
   166     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
   171     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
   167 };
   172 };
   168 
   173 
   169 #endif // HSIDLESTATE_H
   174 #endif // HSIDLESTATE_H