homescreenapp/stateplugins/hshomescreenstateplugin/inc/hsidlestate.h
changeset 63 52b0f64eeb51
parent 62 341166945d65
child 69 87476091b3f5
equal deleted inserted replaced
62:341166945d65 63:52b0f64eeb51
    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 class HsPropertyAnimationWrapper;
    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_removePage_startRemovePageAnimation();
   120     void action_removePage_removePage();
   124     void action_removePage_removePage();
   121     void action_toggleConnection_toggleConnection();
   125     void action_toggleConnection_toggleConnection();
   122     void action_idle_setupTitle();
   126     void action_idle_setupTitle();
   123     void action_idle_cleanupTitle();
   127     void action_idle_cleanupTitle();
   124     
   128     
   134     void onAddContentFromContextMenuActionTriggered();
   138     void onAddContentFromContextMenuActionTriggered();
   135     void onAddContentFromOptionsMenuActionTriggered();
   139     void onAddContentFromOptionsMenuActionTriggered();
   136     bool openTaskSwitcher();
   140     bool openTaskSwitcher();
   137     void zoneAnimationFinished();
   141     void zoneAnimationFinished();
   138     void pageChangeAnimationFinished();
   142     void pageChangeAnimationFinished();
   139     void onRemovePageConfirmationOk();
       
   140     void onVerticalSnapLineTimerTimeout();
   143     void onVerticalSnapLineTimerTimeout();
   141     void onHorizontalSnapLineTimerTimeout();
   144     void onHorizontalSnapLineTimerTimeout();
   142     void onActivePageChanged();
   145     void onActivePageChanged();
   143 
   146    
   144 private:
   147 private:
   145     HbAction *mNavigationAction;
   148     HbAction *mNavigationAction;
   146     HsIdleWidget *mUiWidget;  
   149     HsIdleWidget *mUiWidget;  
   147     HsTitleResolver *mTitleResolver;
   150     HsTitleResolver *mTitleResolver;
   148     QPropertyAnimation *mZoneAnimation;
   151     QPropertyAnimation *mZoneAnimation;
   149     bool mAllowZoneAnimation;
   152     bool mAllowZoneAnimation;
   150     QPropertyAnimation *mPageChangeAnimation;
   153     HsPropertyAnimationWrapper *mPageChangeAnimation;
   151     HbContinuousFeedback *mContinuousFeedback;
   154     HbContinuousFeedback *mContinuousFeedback;
   152     bool mTrashBinFeedbackAlreadyPlayed;    
   155     bool mTrashBinFeedbackAlreadyPlayed;    
   153     QPointF mPageHotSpot;
   156     QPointF mPageHotSpot;
   154     QPointF mWidgetHotSpot;
   157     QPointF mWidgetHotSpot;
   155     QPointF mWidgetHotSpotOffset;
   158     QPointF mWidgetHotSpotOffset;
   156     qreal mDeltaX;
   159     qreal mDeltaX;
   157     QPointer<HbMenu> mSceneMenu;
   160     QPointer<HbMenu> mSceneMenu;
   158     HsWidgetPositioningOnWidgetMove::Result mSnapResult;
   161     HsWidgetPositioningOnWidgetMove::Result mSnapResult;
   159     HsWidgetPositioningOnWidgetMove::Result mPreviousSnapResult;
   162     HsWidgetPositioningOnWidgetMove::Result mPreviousSnapResult;
   160     qreal mSnapBorderGap;
       
   161     QTimer mVerticalSnapLineTimer;
   163     QTimer mVerticalSnapLineTimer;
   162     QTimer mHorizontalSnapLineTimer;
   164     QTimer mHorizontalSnapLineTimer; 
   163 #ifdef Q_OS_SYMBIAN    
   165 #ifdef Q_OS_SYMBIAN    
   164     XQSettingsManager *mSettingsMgr;
   166     XQSettingsManager *mSettingsMgr;
   165 #endif    
   167 #endif    
       
   168     HsMessageBoxWrapper *mMessageBoxWrapper;
       
   169 
   166     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
   170     HOMESCREEN_TEST_FRIEND_CLASS(HomeScreenStatePluginTest)
   167 };
   171 };
   168 
   172 
   169 #endif // HSIDLESTATE_H
   173 #endif // HSIDLESTATE_H