|
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: Bubble heading widget |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef BUBBLEHEADINGWIDGET_H |
|
19 #define BUBBLEHEADINGWIDGET_H |
|
20 |
|
21 #include <hbwidget.h> |
|
22 |
|
23 class HbIconItem; |
|
24 class HbTextItem; |
|
25 class HbFontSpec; |
|
26 class BubbleHeader; |
|
27 |
|
28 class BubbleHeadingWidget : public HbWidget |
|
29 { |
|
30 Q_OBJECT |
|
31 Q_PROPERTY(int lines READ lineCount WRITE setLineCount) |
|
32 Q_PROPERTY(QString layoutOption READ layout WRITE setLayout) |
|
33 |
|
34 public: |
|
35 BubbleHeadingWidget(QGraphicsItem* item=0); |
|
36 virtual ~BubbleHeadingWidget(); |
|
37 |
|
38 int lineCount() const; |
|
39 void setLineCount(int count); |
|
40 |
|
41 QString layout() const; |
|
42 void setLayout(const QString& layout); |
|
43 |
|
44 void reset(); |
|
45 void readBubbleHeader(const BubbleHeader& header); |
|
46 void updateTimerDisplayNow(); |
|
47 |
|
48 private: |
|
49 void createPrimitives(); |
|
50 void updatePrimitives(); |
|
51 |
|
52 protected: |
|
53 void polishEvent(); |
|
54 void changeEvent(QEvent *event); |
|
55 void showEvent(QShowEvent *event); |
|
56 |
|
57 private: |
|
58 int lines; |
|
59 QString layoutOption; |
|
60 |
|
61 const BubbleHeader* mHeader; |
|
62 |
|
63 // primitives |
|
64 //BubbleAnimIconItem* mStatusIcon; |
|
65 HbIconItem* mStatusIcon; |
|
66 HbIconItem* mNumberTypeIcon; |
|
67 HbIconItem* mCipheringIcon; |
|
68 HbTextItem* mText1; |
|
69 HbTextItem* mText2; |
|
70 HbTextItem* mText3; |
|
71 int mCallTimerTextLine; |
|
72 HbFontSpec* mCliFont; |
|
73 HbFontSpec* mTextFont; |
|
74 }; |
|
75 |
|
76 #endif // BUBBLEHEADINGWIDGET_H |