|
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: hbnamespace stub |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef HBNAMESPACE_H |
|
19 #define HBNAMESPACE_H |
|
20 |
|
21 #include <QtGlobal> |
|
22 #include <QObject> |
|
23 #include <QGraphicsItem> |
|
24 |
|
25 class Hb |
|
26 { |
|
27 |
|
28 public: |
|
29 /* static const int Key_SoftKeyPrimary = Qt::Key_Launch0; |
|
30 static const int Key_SoftKeySecondary = Qt::Key_Launch1; |
|
31 static const int Key_SoftKeyMiddle = Qt::Key_Launch2; |
|
32 |
|
33 */ |
|
34 // DEPRECATED - DO NOT USE - These are deprecated along with deprecation of softkey functions in HbMainWindow. |
|
35 // This enumeration will become internal to Hb. |
|
36 enum SoftKeyId |
|
37 { |
|
38 PrimarySoftKey, |
|
39 SecondarySoftKey, |
|
40 MiddleSoftKey, |
|
41 |
|
42 //Custom softkey id's start here. |
|
43 CustomSoftKey = 0xFF |
|
44 }; |
|
45 |
|
46 // DEPRECATED - DO NOT USE - These are deprecated along with deprecation of softkey functions in HbMainWindow. |
|
47 // Use NavigationAction instead. |
|
48 enum SoftKeyAction |
|
49 { |
|
50 QuitAction, |
|
51 BackAction, |
|
52 ConfirmAction, |
|
53 DoneAction |
|
54 }; |
|
55 |
|
56 enum NavigationAction |
|
57 { |
|
58 QuitNaviAction, |
|
59 BackNaviAction, |
|
60 ConfirmNaviAction, |
|
61 DoneNaviAction |
|
62 }; |
|
63 |
|
64 /* enum EffectEvent |
|
65 { |
|
66 EffectFinished = 1, |
|
67 EffectCancelled = 2, |
|
68 EffectNotStarted = 3 |
|
69 }; |
|
70 |
|
71 |
|
72 enum UiAttribute |
|
73 { |
|
74 Ui_NoAttributes = 0x0000, |
|
75 Ui_VisibleInTouch = 0x0001, |
|
76 Ui_VisibleInNonTouch = 0x0002 |
|
77 }; |
|
78 |
|
79 Q_DECLARE_FLAGS(UiAttributes, UiAttribute) |
|
80 */ |
|
81 /*! |
|
82 Gesture types. |
|
83 */ |
|
84 /* enum TouchGesture |
|
85 { |
|
86 TapGesture = 0x0000001, |
|
87 LongPressGesture = 0x0000002, |
|
88 PanGesture = 0x0000004, |
|
89 FlickGesture = 0x0000008 |
|
90 }; |
|
91 |
|
92 Q_DECLARE_FLAGS(TouchGestures, TouchGesture) |
|
93 |
|
94 |
|
95 enum ItemDataRole |
|
96 { |
|
97 ItemTypeRole = 1001, |
|
98 IndexFeedbackRole, |
|
99 UserRole = 1500 |
|
100 }; |
|
101 |
|
102 enum ModelItemType |
|
103 { |
|
104 StandardItem, |
|
105 ParentItem, |
|
106 SeparatorItem, |
|
107 UserItem = 1000 |
|
108 }; |
|
109 |
|
110 */ |
|
111 enum GraphicsItemType |
|
112 { |
|
113 ItemType_NotificationDialog = QGraphicsItem::UserType+10000, |
|
114 ItemType_FrameItem, |
|
115 ItemType_GraphicsPixmapItem, |
|
116 ItemType_FormViewItem, |
|
117 ItemType_FormView, |
|
118 ItemType_AbstractItemContainer, |
|
119 ItemType_AbstractItemView, |
|
120 ItemType_ListView, |
|
121 ItemType_AbstractViewItem, |
|
122 ItemType_ListViewItem, |
|
123 ItemType_ItemHighlight, |
|
124 ItemType_ListWidgetItem, |
|
125 ItemType_ListWidgetViewItem, |
|
126 ItemType_GridViewItem, |
|
127 ItemType_Popup, |
|
128 ItemType_Dialog, |
|
129 ItemType_Note, |
|
130 ItemType_CommonNote, |
|
131 ItemType_MessageBox, |
|
132 ItemType_ProgressNote, |
|
133 ItemType_ProgressDialog, |
|
134 ItemType_AbstractButton, |
|
135 ItemType_AbstractItem, |
|
136 ItemType_AbstractSlider, |
|
137 ItemType_Highlight, |
|
138 ItemType_IconItem, |
|
139 ItemType_Label, |
|
140 ItemType_AbstractEdit, |
|
141 ItemType_LineEdit, |
|
142 ItemType_Menu, |
|
143 ItemType_MenuItem, |
|
144 ItemType_ProgressSlider, |
|
145 ItemType_ProgressiveSlider, |
|
146 ItemType_RatingSlider, |
|
147 ItemType_ProgressBar, |
|
148 ItemType_PushButton, |
|
149 ItemType_RadioButtonList, |
|
150 ItemType_ScrollBar, |
|
151 ItemType_Slider, |
|
152 ItemType_SliderPopup, |
|
153 ItemType_StackedWidget, |
|
154 ItemType_TextEdit, |
|
155 ItemType_TextItem, |
|
156 ItemType_ToolBar, |
|
157 ItemType_ToolBarExtension, |
|
158 ItemType_ToolButton, |
|
159 ItemType_Widget, |
|
160 ItemType_View, |
|
161 ItemType_VolumeSlider, |
|
162 ItemType_ZoomSlider, |
|
163 ItemType_RoundRobinLabel, |
|
164 ItemType_ConfirmationQuery, |
|
165 ItemType_CheckBox, |
|
166 ItemType_MessageQuery, |
|
167 ItemType_DataQuery, |
|
168 ItemType_InputDialog, |
|
169 ItemType_DualDataQuery, |
|
170 ItemType_TransparentWindow, |
|
171 ItemType_DateTimeEdit, |
|
172 ItemType_FileDialog, |
|
173 ItemType_ColorDialog, |
|
174 ItemType_InputCharacterButton, |
|
175 ItemType_InputFunctionButton, |
|
176 ItemType_InputCloseButton, |
|
177 ItemType_InputTabButton, |
|
178 ItemType_InputVkbWidget, |
|
179 ItemType_InputCharPreviewPane, |
|
180 ItemType_VirtualTrackPoint, |
|
181 ItemType_WritingBox, |
|
182 ItemType_VolumePopup, |
|
183 ItemType_CombinedQuery, |
|
184 ItemType_ListQuery, |
|
185 ItemType_ListDialog, |
|
186 ItemType_ListDialogContentWidget, |
|
187 ItemType_ZoomPopup, |
|
188 ItemType_CarouselView, |
|
189 ItemType_TreeViewItem, |
|
190 ItemType_ComboBox, |
|
191 ItemType_TouchArea, |
|
192 ItemType_SettingItemContainer, |
|
193 ItemType_SettingFormItem, |
|
194 ItemType_SettingForm, |
|
195 ItemType_DataItemContainer, |
|
196 ItemType_DataFormViewItem, |
|
197 ItemType_DataForm, |
|
198 ItemType_RichTextItem, |
|
199 ItemType_GroupBox, |
|
200 ItemType_DockWidget, |
|
201 ItemType_RadioButtonListViewItem, |
|
202 ItemType_TumbleView, |
|
203 ItemType_TumbleViewItem, |
|
204 ItemType_DateTimePicker, |
|
205 ItemType_MarqueeItem, |
|
206 ItemType_IndexFeedback, |
|
207 ItemType_Last = QGraphicsItem::UserType + 20000 |
|
208 }; |
|
209 |
|
210 enum ApplicationFlag { |
|
211 DefaultApplicationFlags = 0x00, |
|
212 NoSplash = 0x01 |
|
213 }; |
|
214 Q_DECLARE_FLAGS(ApplicationFlags, ApplicationFlag) |
|
215 |
|
216 /* |
|
217 |
|
218 enum WidgetAttribute |
|
219 { |
|
220 InteractionDisabled = 0x00000001, |
|
221 InsidePopup = 0x00000002 |
|
222 }; |
|
223 |
|
224 Q_DECLARE_FLAGS(WidgetAttributes, WidgetAttribute) |
|
225 |
|
226 |
|
227 // DEPRECATED - DO NOT USE - These are deprecated along with deprecation of HbFontProvider |
|
228 // Use HbFontSpec and the font roles defines in HbFontSpec API |
|
229 enum LogicalFontName |
|
230 { |
|
231 FontUndefined = 0, |
|
232 FontPrimary, |
|
233 FontSecondary, |
|
234 FontTitle, |
|
235 FontPrimarySmall, |
|
236 FontDigital |
|
237 }; |
|
238 |
|
239 */ |
|
240 enum SceneItem { |
|
241 NoItem = 0x00000000, |
|
242 |
|
243 TitlePaneItem = 0x00000001, |
|
244 // Deprecated |
|
245 NaviPaneItem = 0x00000002, |
|
246 ToolBarItem = 0x00000004, |
|
247 IndicatorItems = 0x00000008, |
|
248 DockWidgetItem = 0x00000010, |
|
249 TitleBarItem = 0x00000020, |
|
250 |
|
251 // Deprecated |
|
252 PrimarySoftKeyItem = 0x00010000, |
|
253 // Deprecated |
|
254 SecondarySoftKeyItem = 0x00020000, |
|
255 // Deprecated |
|
256 MiddleSoftKeyItem = 0x00040000, |
|
257 // Deprecated |
|
258 SoftKeyItems = 0x00070000, |
|
259 |
|
260 AllItems = 0xFFFFFFFF |
|
261 }; |
|
262 |
|
263 /*! |
|
264 Anchor edges. |
|
265 */ |
|
266 /* enum Edge { |
|
267 LeftEdge = 0, |
|
268 TopEdge, |
|
269 RightEdge, |
|
270 BottomEdge, |
|
271 CenterHEdge, |
|
272 CenterVEdge |
|
273 }; |
|
274 |
|
275 enum ResourceType { |
|
276 IconResource = 0, |
|
277 ThemeResource, |
|
278 EffectResource, |
|
279 StyleSheetResource |
|
280 }; |
|
281 |
|
282 Q_DECLARE_FLAGS(SceneItems, SceneItem) |
|
283 */ |
|
284 enum WindowFlag { |
|
285 WindowFlagNone = 0x00000000, |
|
286 WindowFlagTransparent = 0x00000001, |
|
287 WindowFlagNoBackground = 0x00000002, |
|
288 WindowFlagFixedVertical = 0x00000004, |
|
289 WindowFlagFixedHorizontal = 0x00000008, |
|
290 WindowFlagNoSplash = 0x00000010 |
|
291 }; |
|
292 |
|
293 Q_DECLARE_FLAGS(WindowFlags, WindowFlag) |
|
294 /* |
|
295 enum ViewSwitchFlag { |
|
296 ViewSwitchDefault = 0x00, |
|
297 ViewSwitchSequential = 0x01, |
|
298 ViewSwitchFullScreen = 0x02, |
|
299 ViewSwitchUseNormalAnim = 0x04, |
|
300 ViewSwitchUseBackAnim = 0x08, |
|
301 ViewSwitchUseAltEvent = 0x10 |
|
302 }; |
|
303 |
|
304 Q_DECLARE_FLAGS(ViewSwitchFlags, ViewSwitchFlag) |
|
305 |
|
306 enum TextCursorVisibility |
|
307 { |
|
308 TextCursorHidden = 0, |
|
309 TextCursorVisible |
|
310 }; |
|
311 |
|
312 enum SliderTickPosition |
|
313 { |
|
314 NoSliderTicks = 0, |
|
315 SliderTicksAbove = 1, |
|
316 SliderTicksLeft = SliderTicksAbove, |
|
317 SliderTicksBelow = 2, |
|
318 SliderTicksRight = SliderTicksBelow, |
|
319 SliderTicksBothSides = 3, |
|
320 SliderTicksAbsolute |
|
321 }; |
|
322 |
|
323 Q_DECLARE_FLAGS(SliderTickPositions , SliderTickPosition) |
|
324 |
|
325 enum TextContextMenuFlag { |
|
326 ShowTextContextMenuOnSelectionClicked = 1, |
|
327 ShowTextContextMenuOnLongPress = 4 |
|
328 }; |
|
329 Q_DECLARE_FLAGS(TextContextMenuFlags , TextContextMenuFlag) |
|
330 */ |
|
331 /*! |
|
332 A type definition for text wrapping |
|
333 */ |
|
334 enum TextWrapping |
|
335 { |
|
336 TextNoWrap = 0, |
|
337 TextWordWrap = 1, |
|
338 TextWrapAnywhere = 3 |
|
339 }; |
|
340 /* |
|
341 enum InstantInteraction { |
|
342 InstantPressed = 0, |
|
343 InstantReleased, |
|
344 InstantClicked, |
|
345 InstantKeyRepeated, |
|
346 InstantLongPressed, |
|
347 InstantDraggedOver, |
|
348 InstantFlicked, |
|
349 InstantPopupOpened, |
|
350 InstantPopupClosed, |
|
351 InstantBoundaryReached, |
|
352 InstantRotated90Degrees, |
|
353 InstantSelectionChanged, |
|
354 // add new standard instant interactions here |
|
355 // NumberOfInstantInteractions, |
|
356 // InstantUser = 1000, |
|
357 // value range for user defined custom instant interactions |
|
358 // InstantMaxUser = 65535 |
|
359 // }; |
|
360 |
|
361 // enum ContinuousInteraction { |
|
362 ContinuousScrolled = 0, |
|
363 ContinuousDragged, |
|
364 ContinuousPinched, |
|
365 // add new standard continuous interactions here |
|
366 // NumberOfContinuousInteractions, |
|
367 // ContinuousUser = 1000, |
|
368 // value range for user defined custom continuous interactions |
|
369 // ContinuousMaxUser = 65535 |
|
370 }; |
|
371 |
|
372 enum InteractionModifier { |
|
373 ModifierSliderHandle = 0x1, |
|
374 ModifierSliderElement = 0x2, |
|
375 ModifierExpandedItem = 0x4, |
|
376 ModifierCollapsedItem = 0x8, |
|
377 ModifierScrolling = 0x10 |
|
378 }; |
|
379 |
|
380 Q_DECLARE_FLAGS(InteractionModifiers, InteractionModifier)*/ |
|
381 |
|
382 enum ActivationReason { |
|
383 ActivationReasonActivity = 0, |
|
384 ActivationReasonService, |
|
385 ActivationReasonNormal |
|
386 }; |
|
387 }; |
|
388 |
|
389 /*Q_DECLARE_METATYPE(Hb::GraphicsItemType) |
|
390 |
|
391 Q_DECLARE_OPERATORS_FOR_FLAGS(Hb::UiAttributes) |
|
392 Q_DECLARE_OPERATORS_FOR_FLAGS(Hb::TouchGestures) |
|
393 Q_DECLARE_OPERATORS_FOR_FLAGS(Hb::SceneItems) |
|
394 Q_DECLARE_OPERATORS_FOR_FLAGS(Hb::WindowFlags) |
|
395 Q_DECLARE_OPERATORS_FOR_FLAGS(Hb::ViewSwitchFlags) |
|
396 Q_DECLARE_OPERATORS_FOR_FLAGS(Hb::SliderTickPositions) |
|
397 Q_DECLARE_OPERATORS_FOR_FLAGS(Hb::TextContextMenuFlags) |
|
398 Q_DECLARE_OPERATORS_FOR_FLAGS(Hb::InteractionModifiers) |
|
399 */ |
|
400 #endif // HBNAMESPACE_H |
|
401 |