|
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: Menu Event. |
|
15 * |
|
16 */ |
|
17 |
|
18 #include "hsmenuevent.h" |
|
19 |
|
20 |
|
21 /*! |
|
22 \class HsMenuEvent |
|
23 \ingroup group_hsmenustateplugin |
|
24 \brief Represents class of events in menu application state machine. |
|
25 |
|
26 \sa HsMenuEventFactory |
|
27 \sa HsMenuEventTransition |
|
28 */ |
|
29 |
|
30 /*! |
|
31 \enum HsMenuEvent::OperationType |
|
32 |
|
33 Enumerates specific types of events within the class. |
|
34 */ |
|
35 /*! \var HsMenuEvent::OperationType HsMenuEvent::AddToHomeScreen |
|
36 Adding to home screen. |
|
37 */ |
|
38 /*! \var HsMenuEvent::OperationType HsMenuEvent::OpenCollection |
|
39 Opening collection. |
|
40 */ |
|
41 /*! \var HsMenuEvent::OperationType HsMenuEvent::RenameCollection |
|
42 Renaming collection. |
|
43 */ |
|
44 /*! \var HsMenuEvent::OperationType HsMenuEvent::DeleteCollection |
|
45 Removing collection. |
|
46 */ |
|
47 /*! \var HsMenuEvent::OperationType HsMenuEvent::CollectionDeleted |
|
48 Removing collection completed. |
|
49 */ |
|
50 /*! \var HsMenuEvent::OperationType HsMenuEvent::AddAppsToCollection |
|
51 Adding applications to collection. |
|
52 */ |
|
53 /*! \var HsMenuEvent::OperationType HsMenuEvent::RemoveAppFromCollection |
|
54 Removing application from collection. |
|
55 */ |
|
56 /*! \var HsMenuEvent::OperationType HsMenuEvent::OpenApplicationLibrary |
|
57 Opening application library from shortcut. |
|
58 */ |
|
59 /*! \var HsMenuEvent::OperationType HsMenuEvent::ArrangeCollection |
|
60 Swith to arrange mode. |
|
61 */ |
|
62 /*! \var HsMenuEvent::OperationType HsMenuEvent::Unknown |
|
63 Unknown menu event. |
|
64 */ |
|
65 /*! |
|
66 \return Id identyfing the class of the events. |
|
67 */ |
|
68 QEvent::Type HsMenuEvent::eventType() |
|
69 { |
|
70 return QEvent::Type(QEvent::User + 100); |
|
71 } |
|
72 |
|
73 |
|
74 /*! |
|
75 Constructor. |
|
76 \param aOperation Specific type of event ususally mapping to an user level operation. |
|
77 \param aData Data associated with the event. |
|
78 */ |
|
79 HsMenuEvent::HsMenuEvent(OperationType aOperation, const QVariantMap &aData): |
|
80 QEvent(HsMenuEvent::eventType()), mOperation(aOperation), mData(aData) |
|
81 { |
|
82 } |
|
83 |
|
84 /*! |
|
85 \return Specific type of the event. |
|
86 */ |
|
87 HsMenuEvent::OperationType HsMenuEvent::operation() const |
|
88 { |
|
89 return mOperation; |
|
90 } |
|
91 |
|
92 /*! |
|
93 \return Data associated with the event. |
|
94 */ |
|
95 QVariantMap HsMenuEvent::data() const |
|
96 { |
|
97 return mData; |
|
98 } |
|
99 |