homescreenapp/stateplugins/hsapplibrarystateplugin/inc/hscollectionstate.h
changeset 39 4e8ebe173323
parent 36 cdae8c6c3876
child 46 23b5d6a29cce
equal deleted inserted replaced
36:cdae8c6c3876 39:4e8ebe173323
    51 
    51 
    52     HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
    52     HS_STATES_TEST_FRIEND_CLASS(MenuStatesTest)
    53 
    53 
    54 public:
    54 public:
    55 
    55 
    56     /**
       
    57      * Constructor.
       
    58      *
       
    59      * @since S60 ?S60_version.
       
    60      * @param containerView Container view.
       
    61      * @param parent Owner.
       
    62      */
       
    63     HsCollectionState(HsMenuView &menuView, QState *parent = 0);
    56     HsCollectionState(HsMenuView &menuView, QState *parent = 0);
    64 
    57 
    65     /**
       
    66      * Destructor.
       
    67      *
       
    68      * @since S60 ?S60_version.
       
    69      */
       
    70     ~HsCollectionState();
    58     ~HsCollectionState();
    71 
    59 
    72 public slots:
    60 public slots:
    73 
    61 
    74     /**
       
    75      * Sets collections sort order
       
    76      *
       
    77      * @since S60 ?S60_version.
       
    78      * @param sortOrder sort order.
       
    79      */
       
    80     void collectionsSortOrder(HsSortAttribute sortAttribute);
    62     void collectionsSortOrder(HsSortAttribute sortAttribute);
    81 
    63 
    82 protected:
    64 protected:
    83 
    65 
    84     void onEntry(QEvent *event);
    66     void onEntry(QEvent *event);
    89 
    71 
    90 private slots:
    72 private slots:
    91 
    73 
    92     bool openTaskSwitcher();
    74     bool openTaskSwitcher();
    93 
    75 
    94     /**
       
    95      * Slot connected to List widget.
       
    96      *
       
    97      * @since S60 ?S60_version.
       
    98      * @param index Model index of the activated item.
       
    99      */
       
   100     void listItemActivated(const QModelIndex &index);
    76     void listItemActivated(const QModelIndex &index);
   101 
    77 
   102     /**
       
   103      * Slot connected to List widget.
       
   104      * Called when item long pressed.
       
   105      *
       
   106      * @since S60 ?S60_version.
       
   107      * @param item View item.
       
   108      * @param coords Press point coordinates.
       
   109      */
       
   110     void listItemLongPressed(HbAbstractViewItem *item,
    78     void listItemLongPressed(HbAbstractViewItem *item,
   111                              const QPointF &coords);
    79                              const QPointF &coords);
   112 
    80 
   113 
       
   114     /**
       
   115      * Menu add applications action slot
       
   116      *
       
   117      * @since S60 ?S60_version.
       
   118      */
       
   119     void addAppsAction();
    81     void addAppsAction();
   120 
    82 
   121     /**
       
   122      * Menu add shortcut action slot
       
   123      *
       
   124      * @since S60 ?S60_version.
       
   125      */
       
   126     void addCollectionShortcutToHomeScreenAction();
    83     void addCollectionShortcutToHomeScreenAction();
   127 
    84 
   128     /**
       
   129      * Menu rename action slot
       
   130      *
       
   131      * @since S60 ?S60_version.
       
   132      */
       
   133     void renameAction();
    85     void renameAction();
   134 
    86 
   135     /**
       
   136      * Menu delete action slot
       
   137      *
       
   138      * @since S60 ?S60_version.
       
   139      */
       
   140     void deleteAction();
    87     void deleteAction();
   141 
    88 
   142     /**
       
   143      * Menu softkey back action slot
       
   144      *
       
   145      * @since S60 ?S60_version.
       
   146      */
       
   147     void backSteppingAction();
    89     void backSteppingAction();
   148 
    90 
   149     /**
       
   150      * Updates label
       
   151      *
       
   152      * @since S60 ?S60_version.
       
   153      */
       
   154     void updateLabel();
    91     void updateLabel();
   155 
    92 
   156 
       
   157     /**
       
   158      * Slot invoked when a state is entered.
       
   159      *
       
   160      * @since S60 ?S60_version.
       
   161      */
       
   162     void stateEntered();
    93     void stateEntered();
   163 
    94 
   164     /**
       
   165      * Slot invoked when a state is exited.
       
   166      *
       
   167      * @since S60 ?S60_version.
       
   168      */
       
   169     void stateExited();
    95     void stateExited();
   170 
    96 
   171     void latestOnTopMenuAction();
    97     void latestOnTopMenuAction();
   172 
    98 
   173     void oldestOnTopMenuAction();
    99     void oldestOnTopMenuAction();
   174 
   100 
   175 private:
   101 private:
   176 
   102 
   177     /**
       
   178      * Constructs contained objects.
       
   179      *
       
   180      * @since S60 ?S60_version.
       
   181      */
       
   182     void construct();
   103     void construct();
   183 
   104 
   184     /**
   105     /**
   185      * Set up Menu.
   106      * Set up Menu.
   186      *
   107      *
   187      * @since S60 ?S60_version.
   108      * @since S60 ?S60_version.
   188      * @param isDynamic Decides which options should be added to menu.
   109      * @param isDynamic Decides which options should be added to menu.
   189      */
   110      */
   190     void constructMenu(bool isDynamic);
   111     void constructMenu(bool isDynamic);
   191 
   112 
   192     /**
       
   193      * Perform all signal connections.
       
   194      *
       
   195      * @since S60 ?S60_version.
       
   196      */
       
   197     void makeConnect();
   113     void makeConnect();
   198 
   114 
   199     /**
       
   200      * Perform all signal disconnections.
       
   201      *
       
   202      * @since S60 ?S60_version.
       
   203      */
       
   204     void makeDisconnect();
   115     void makeDisconnect();
   205 
   116 
   206     void addElementToHomeScreen(const QModelIndex &index);
   117     void addElementToHomeScreen(const QModelIndex &index);
   207 
   118 
   208 private:
   119 private:
   227      */
   138      */
   228     QString mCollectionType;
   139     QString mCollectionType;
   229 
   140 
   230     /**
   141     /**
   231      * The List View widget.
   142      * The List View widget.
   232      * Own.
       
   233      */
   143      */
   234     HsMenuView &mMenuView;
   144     HsMenuView &mMenuView;
   235 
   145 
   236     /**
   146     /**
   237      * Secondary Softkey action.
   147      * Secondary Softkey action.