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:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef BUBBLETESTVIEW_H
|
|
19 |
#define BUBBLETESTVIEW_H
|
|
20 |
|
|
21 |
#include <hbview.h>
|
|
22 |
#include <bubblemanagerif.h>
|
|
23 |
|
|
24 |
class HbAction;
|
|
25 |
class HbMainWindow;
|
|
26 |
class QSignalMapper;
|
|
27 |
class HbToolBar;
|
|
28 |
class BubbleTester;
|
|
29 |
class BubbleManager;
|
|
30 |
|
|
31 |
class BubbleTestView : public HbView
|
|
32 |
{
|
|
33 |
Q_OBJECT
|
|
34 |
|
|
35 |
public:
|
|
36 |
|
|
37 |
BubbleTestView(HbMainWindow& window, QGraphicsItem *parent = 0);
|
|
38 |
|
|
39 |
virtual ~BubbleTestView();
|
|
40 |
|
|
41 |
BubbleManagerIF& bubbleManager();
|
|
42 |
|
|
43 |
private slots:
|
|
44 |
void answerCall();
|
|
45 |
void endCall();
|
|
46 |
void endConferenceCall();
|
|
47 |
void rejectCall();
|
|
48 |
void toggleHold();
|
|
49 |
void toggleHoldDelayed();
|
|
50 |
void toggleConferenceHoldDelayed();
|
|
51 |
void createIncomingCall();
|
|
52 |
void createOutgoingCall();
|
|
53 |
void setMuted();
|
|
54 |
void joinToConference();
|
|
55 |
void handlePrivate();
|
|
56 |
void handleDrop();
|
|
57 |
void replaceActiveCall();
|
|
58 |
void updateUiControls();
|
|
59 |
|
|
60 |
void switchOrientation();
|
|
61 |
void handleOrientationChange(Qt::Orientation orientation);
|
|
62 |
|
|
63 |
void connectToTester();
|
|
64 |
void handleTesterDataChanged();
|
|
65 |
|
|
66 |
private:
|
|
67 |
void keyPressEvent(QKeyEvent *event);
|
|
68 |
|
|
69 |
void setBubbleData(int bubble, BubbleManagerIF::PhoneCallState state);
|
|
70 |
void setBubbleActions(int bubble, BubbleManagerIF::PhoneCallState state);
|
|
71 |
void setExpandActions();
|
|
72 |
void setCallObject(int bubble, const QString& filename);
|
|
73 |
void createToolBarActions();
|
|
74 |
void updateToolBarActions();
|
|
75 |
void createMenuActions();
|
|
76 |
void createBubbleActions();
|
|
77 |
int bubbleIdByState(BubbleManagerIF::PhoneCallState state);
|
|
78 |
bool initializingCallExists() const;
|
|
79 |
bool conferenceCallExists() const;
|
|
80 |
int callCount() const;
|
|
81 |
bool callIndexByState(BubbleManagerIF::PhoneCallState state, int& index);
|
|
82 |
bool callIndexByBubbleId(int bubbleId, int& index);
|
|
83 |
void conferenceWizard();
|
|
84 |
void sendKeyEvent(int key);
|
|
85 |
void toggleHoldConference();
|
|
86 |
|
|
87 |
private:
|
|
88 |
HbMainWindow& mMainWindow;
|
|
89 |
BubbleManager *mBubbleManager;
|
|
90 |
QList<HbAction*> mBubbleActions;
|
|
91 |
|
|
92 |
// settings
|
|
93 |
HbAction *mCallDivert;
|
|
94 |
HbAction *mCipheringOff;
|
|
95 |
HbAction *mCallTimer;
|
|
96 |
HbAction *mEmergencyCall;
|
|
97 |
HbAction *mContactPicture;
|
|
98 |
HbAction *mContactName;
|
|
99 |
|
|
100 |
// Toolbar actions
|
|
101 |
HbAction *mCallIn;
|
|
102 |
HbAction *mCallOut;
|
|
103 |
HbAction *mMute;
|
|
104 |
HbAction *mUnmute;
|
|
105 |
HbAction *mActivateLoudspeaker;
|
|
106 |
HbAction *mActivateHandset;
|
|
107 |
HbAction *mSendMessage;
|
|
108 |
HbAction *mSilence;
|
|
109 |
HbAction *mOpenDialer;
|
|
110 |
HbAction *mOpenContacts;
|
|
111 |
|
|
112 |
// Bubble actions
|
|
113 |
HbAction *mAnswer;
|
|
114 |
HbAction *mReject;
|
|
115 |
HbAction *mHold;
|
|
116 |
HbAction *mUnhold;
|
|
117 |
HbAction *mSwap;
|
|
118 |
HbAction *mEndCall;
|
|
119 |
HbAction *mEndConference;
|
|
120 |
HbAction *mJoin;
|
|
121 |
HbAction *mPrivate;
|
|
122 |
HbAction *mDrop;
|
|
123 |
HbAction *mReplace;
|
|
124 |
HbAction *mUpdateUiControls;
|
|
125 |
|
|
126 |
// Test call data
|
|
127 |
struct TestCall {
|
|
128 |
int bubbleId;
|
|
129 |
int callState;
|
|
130 |
bool isConf;
|
|
131 |
bool isInConf;
|
|
132 |
|
|
133 |
TestCall() {
|
|
134 |
isConf = false;
|
|
135 |
isInConf = false;
|
|
136 |
}
|
|
137 |
};
|
|
138 |
|
|
139 |
QList<TestCall> mCalls;
|
|
140 |
bool mMuted;
|
|
141 |
|
|
142 |
HbAction *mConnectTester;
|
|
143 |
BubbleTester *mBubbleTester;
|
|
144 |
QMap<QString, int> mTestBubbleIds;
|
|
145 |
QMap<QString, BubbleManagerIF::PhoneCallState> mStateMap;
|
|
146 |
QMap<QString, QString> mLabelMap;
|
|
147 |
QString mPhoneNumber;
|
|
148 |
int mConfBubbleId;
|
|
149 |
bool mProvideJoin;
|
|
150 |
};
|
|
151 |
|
|
152 |
#endif // BUBBLETESTVIEW_H
|