|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (developer.feedback@nokia.com) |
|
6 ** |
|
7 ** This file is part of the HbCore module of the UI Extensions for Mobile. |
|
8 ** |
|
9 ** GNU Lesser General Public License Usage |
|
10 ** This file may be used under the terms of the GNU Lesser General Public |
|
11 ** License version 2.1 as published by the Free Software Foundation and |
|
12 ** appearing in the file LICENSE.LGPL included in the packaging of this file. |
|
13 ** Please review the following information to ensure the GNU Lesser General |
|
14 ** Public License version 2.1 requirements will be met: |
|
15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
16 ** |
|
17 ** In addition, as a special exception, Nokia gives you certain additional |
|
18 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
20 ** |
|
21 ** If you have questions regarding the use of this file, please contact |
|
22 ** Nokia at developer.feedback@nokia.com. |
|
23 ** |
|
24 ****************************************************************************/ |
|
25 |
|
26 #ifndef HBEFFECT_H |
|
27 #define HBEFFECT_H |
|
28 |
|
29 #include <hbglobal.h> |
|
30 #include <hbnamespace.h> |
|
31 #include <QRectF> |
|
32 #include <QStringList> |
|
33 |
|
34 QT_BEGIN_NAMESPACE |
|
35 class QGraphicsItem; |
|
36 class QVariant; |
|
37 QT_END_NAMESPACE |
|
38 |
|
39 class HbEffect |
|
40 { |
|
41 |
|
42 public: |
|
43 |
|
44 struct EffectStatus |
|
45 { |
|
46 QGraphicsItem *item; |
|
47 QString effectEvent; |
|
48 Hb::EffectEvent reason; |
|
49 QVariant userData; |
|
50 }; |
|
51 |
|
52 static bool start(QGraphicsItem *item, const QString &itemType, |
|
53 const QString &effectEvent, QObject *receiver = 0, |
|
54 const char *member = 0, const QVariant &userData = QVariant(), |
|
55 const QRectF &extRect = QRectF()) |
|
56 { |
|
57 Q_UNUSED(item); |
|
58 Q_UNUSED(itemType); |
|
59 Q_UNUSED(effectEvent); |
|
60 Q_UNUSED(receiver); |
|
61 Q_UNUSED(member); |
|
62 Q_UNUSED(userData); |
|
63 Q_UNUSED(extRect); |
|
64 return false; |
|
65 } |
|
66 |
|
67 static bool start(QGraphicsItem *item, const QString &effectEvent, |
|
68 QObject *receiver = 0, const char *member = 0, |
|
69 const QVariant &userData = QVariant(), const QRectF &extRect = |
|
70 QRectF()) |
|
71 { |
|
72 Q_UNUSED(item); |
|
73 Q_UNUSED(effectEvent); |
|
74 Q_UNUSED(receiver); |
|
75 Q_UNUSED(member); |
|
76 Q_UNUSED(userData); |
|
77 Q_UNUSED(extRect); |
|
78 return false; |
|
79 } |
|
80 |
|
81 static bool start(const QList<QGraphicsItem *> &items, |
|
82 const QString &itemType, const QString &effectEvent, |
|
83 QObject *receiver = 0, const char *member = 0, |
|
84 const QVariant &userData = QVariant()) |
|
85 { |
|
86 Q_UNUSED(items); |
|
87 Q_UNUSED(itemType); |
|
88 Q_UNUSED(effectEvent); |
|
89 Q_UNUSED(receiver); |
|
90 Q_UNUSED(member); |
|
91 Q_UNUSED(userData); |
|
92 return false; |
|
93 } |
|
94 |
|
95 static bool effectRunning(QGraphicsItem *item, const QString &effectEvent = |
|
96 QString()) |
|
97 { |
|
98 Q_UNUSED(item); |
|
99 Q_UNUSED(effectEvent); |
|
100 return false; |
|
101 } |
|
102 |
|
103 static bool cancel(QGraphicsItem *item, const QString &effectEvent = |
|
104 QString(), bool clearEffect = false, bool sendCallback = true, |
|
105 bool itemIsValid = true) |
|
106 { |
|
107 Q_UNUSED(item); |
|
108 Q_UNUSED(effectEvent); |
|
109 Q_UNUSED(clearEffect); |
|
110 Q_UNUSED(sendCallback); |
|
111 Q_UNUSED(itemIsValid); |
|
112 return false; |
|
113 } |
|
114 |
|
115 static bool add(const QString &itemType, const QString &filePath, |
|
116 const QString &effectEvent = QString()) |
|
117 { |
|
118 Q_UNUSED(itemType); |
|
119 Q_UNUSED(filePath); |
|
120 Q_UNUSED(effectEvent); |
|
121 return false; |
|
122 } |
|
123 static bool add(const QStringList &itemType, const QStringList &filePath, |
|
124 const QStringList &effectEvent = QStringList()) |
|
125 { |
|
126 Q_UNUSED(itemType); |
|
127 Q_UNUSED(filePath); |
|
128 Q_UNUSED(effectEvent); |
|
129 return false; |
|
130 } |
|
131 |
|
132 static bool add(QGraphicsItem *item, const QString &filePath, |
|
133 const QString &effectEvent = QString()) |
|
134 { |
|
135 Q_UNUSED(item); |
|
136 Q_UNUSED(filePath); |
|
137 Q_UNUSED(effectEvent); |
|
138 return false; |
|
139 } |
|
140 static bool add(QGraphicsItem *item, const QStringList &filePath, |
|
141 const QStringList &effectEvent = QStringList()) |
|
142 { |
|
143 Q_UNUSED(item); |
|
144 Q_UNUSED(filePath); |
|
145 Q_UNUSED(effectEvent); |
|
146 return false; |
|
147 } |
|
148 |
|
149 static bool remove(const QString &itemType, const QString &filePath, |
|
150 const QString &effectEvent = QString()) |
|
151 { |
|
152 Q_UNUSED(itemType); |
|
153 Q_UNUSED(filePath); |
|
154 Q_UNUSED(effectEvent); |
|
155 return false; |
|
156 } |
|
157 static bool remove(QGraphicsItem *item, const QString &filePath, |
|
158 const QString &effectEvent = QString()) |
|
159 { |
|
160 Q_UNUSED(item); |
|
161 Q_UNUSED(filePath); |
|
162 Q_UNUSED(effectEvent); |
|
163 return false; |
|
164 } |
|
165 static bool remove(QGraphicsItem *item) |
|
166 { |
|
167 Q_UNUSED(item); |
|
168 return false; |
|
169 } |
|
170 |
|
171 static void enable(QGraphicsItem *item) |
|
172 { |
|
173 Q_UNUSED(item); |
|
174 } |
|
175 static void disable(QGraphicsItem *item) |
|
176 { |
|
177 Q_UNUSED(item); |
|
178 } |
|
179 }; |
|
180 |
|
181 Q_DECLARE_METATYPE(HbEffect::EffectStatus) |
|
182 |
|
183 #endif // HBEFFECT_H |