|
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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef GLXGRIDSTATE_H |
|
21 #define GLXGRIDSTATE_H |
|
22 |
|
23 #include <glxbasestate.h> |
|
24 |
|
25 class GlxStateManager; |
|
26 |
|
27 typedef enum |
|
28 { |
|
29 NO_GRID_S, |
|
30 ALL_ITEM_S, |
|
31 ALBUM_ITEM_S, |
|
32 } GridState; |
|
33 |
|
34 class GlxGridState : public GlxState |
|
35 { |
|
36 public : |
|
37 GlxGridState(GlxStateManager *stateManager, GlxState *preState = NULL); |
|
38 int state() const { return (int) mState; } |
|
39 void setState(int internalState) { mState = (GridState) internalState; } |
|
40 void eventHandler(qint32 &id); |
|
41 void setTranstionParameter(NavigationDir dir, GlxEffect &effect, GlxViewEffect &viewEffect); |
|
42 |
|
43 signals : |
|
44 |
|
45 public slots: |
|
46 |
|
47 protected: |
|
48 |
|
49 private slots: |
|
50 |
|
51 private: |
|
52 void defaultEventHandler ( qint32 &id ); |
|
53 void allItemEventHandler ( qint32 &id ); |
|
54 void albumItemEventHandler ( qint32 &id ); |
|
55 |
|
56 private: |
|
57 //grid internal state |
|
58 GridState mState; |
|
59 GlxStateManager *mStateManager; |
|
60 bool mIsMarkingMode; |
|
61 qint32 mCommandId; //commandID, save the command before entering into the marking mode for next user interaction |
|
62 }; |
|
63 |
|
64 |
|
65 #endif /* GLXGRIDSTATE_H_ */ |