author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:33:21 +0100 | |
branch | GCC_SURGE |
changeset 51 | f39ed5e045e0 |
parent 30 | ebdbd102c78a |
parent 46 | bc5a64e5bc3c |
permissions | -rw-r--r-- |
37 | 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: Interface to HbDocumentLoader (DocML files). |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef BUBBLEWIDGETMANAGER_H |
|
19 |
#define BUBBLEWIDGETMANAGER_H |
|
20 |
||
21 |
#include <QObject> |
|
22 |
#include <QMap> |
|
23 |
||
24 |
class QGraphicsWidget; |
|
25 |
class BubbleDocumentLoader; |
|
26 |
class BubbleHandler; |
|
27 |
class BubbleImageManager; |
|
28 |
||
29 |
class BubbleWidgetManager : public QObject |
|
30 |
{ |
|
31 |
Q_OBJECT |
|
32 |
||
33 |
public: |
|
34 |
enum View |
|
35 |
{ |
|
36 |
SingleCallView, |
|
37 |
TwoCallsView, |
|
38 |
ThreeCallsView, |
|
39 |
ConferenceView, |
|
40 |
MutedOverlay |
|
41 |
}; |
|
42 |
||
43 |
enum Container |
|
44 |
{ |
|
45 |
None, |
|
46 |
ExpandedBubble, |
|
47 |
CollapsedBubble, // top most when 2 calls |
|
48 |
CollapsedBubble2 // top most when 3 calls |
|
49 |
}; |
|
50 |
||
51 |
enum Widget |
|
52 |
{ |
|
53 |
Heading, |
|
54 |
Image, |
|
55 |
LeftButton, |
|
56 |
CenterButton, |
|
57 |
RightButton, |
|
58 |
ParticipantList, |
|
59 |
ParticipantListItem, |
|
60 |
ParticipantListButton, |
|
61 |
MutedIcon |
|
62 |
}; |
|
63 |
||
64 |
public: |
|
65 |
BubbleWidgetManager( |
|
66 |
BubbleImageManager& imageManager, |
|
67 |
QObject* parent=0); |
|
68 |
virtual ~BubbleWidgetManager(); |
|
69 |
||
70 |
QGraphicsWidget* view(View view); |
|
71 |
||
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
72 |
bool isLoaded(View view); |
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
73 |
|
37 | 74 |
void releaseView(View view); |
75 |
||
76 |
QGraphicsWidget* container(View view, |
|
77 |
Container container) const; |
|
78 |
||
79 |
QGraphicsWidget* widget(View view, |
|
80 |
Container container, |
|
81 |
Widget widget) const; |
|
82 |
||
83 |
QList<BubbleHandler*>* handlers(QGraphicsWidget* widget) const; |
|
84 |
||
85 |
QGraphicsWidget* createParticipantListItem(); |
|
86 |
||
87 |
public slots: |
|
88 |
void handleOrientationChange(Qt::Orientation orientation); |
|
89 |
||
90 |
private: |
|
91 |
QGraphicsWidget* loadDocument(View view, Qt::Orientation orientation); |
|
92 |
void createDocumentHandlers(View view); |
|
93 |
void applyCustomStyles(View view); |
|
94 |
void setButtonStyle(Widget widget, QGraphicsWidget* button); |
|
95 |
void setBackground(QGraphicsWidget* widget); |
|
96 |
||
97 |
private: |
|
98 |
BubbleImageManager& mImageManager; |
|
99 |
Qt::Orientation mOrientation; |
|
100 |
QMap<int,BubbleDocumentLoader*> mDocumentLoaders; |
|
46
bc5a64e5bc3c
Revision: 201025
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
37
diff
changeset
|
101 |
QMap<int,QObjectList> mDocumentObjects; |
37 | 102 |
QMap<int,QList<BubbleHandler*>*> mDocumentHandlers; |
103 |
QMap<int,QGraphicsWidget*> mDocumentContent; |
|
104 |
||
105 |
QMap<int,QString> mFileNames; |
|
106 |
QMap<int,QString> mContainerName; |
|
107 |
QMap<int,QString> mWidgetPrefix; |
|
108 |
QMap<int,QString> mWidgetName; |
|
109 |
QMap<int,QString> mOrientationName; |
|
110 |
}; |
|
111 |
||
112 |
#endif // BUBBLEWIDGETMANAGER_H |