35
|
1 |
/*
|
|
2 |
* Copyright (c) 2004, 2005 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: Navi pane control for Video Telephone application.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CVTUINAVIPANECONTROL_H
|
|
21 |
#define CVTUINAVIPANECONTROL_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <coecntrl.h>
|
|
25 |
#include <AknUtils.h>
|
|
26 |
|
|
27 |
// CONSTANTS
|
|
28 |
|
|
29 |
// Maximum length of call duration buffer.
|
|
30 |
const TInt KVtUiCallDurationBufferLength = 16;
|
|
31 |
|
|
32 |
// FORWARD DECLARATIONS
|
|
33 |
class CVtUiNaviPane;
|
|
34 |
|
|
35 |
// CLASS DECLARATION
|
|
36 |
|
|
37 |
/**
|
|
38 |
* Navi pane control for Video Telephone application.
|
|
39 |
*
|
|
40 |
* @since Series 60 2.6
|
|
41 |
*/
|
|
42 |
class CVtUiNaviPaneControl
|
|
43 |
: public CCoeControl
|
|
44 |
{
|
|
45 |
public: // Constructors and destructor
|
|
46 |
|
|
47 |
/**
|
|
48 |
* C++ constructor.
|
|
49 |
* @param aNaviPane eference to navipane.
|
|
50 |
*/
|
|
51 |
CVtUiNaviPaneControl( CVtUiNaviPane& aNaviPane );
|
|
52 |
|
|
53 |
/**
|
|
54 |
* Symbian constructor.
|
|
55 |
*/
|
|
56 |
void ConstructL();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* C++ destructor.
|
|
60 |
*/
|
|
61 |
~CVtUiNaviPaneControl();
|
|
62 |
|
|
63 |
public: // New functions
|
|
64 |
|
|
65 |
/**
|
|
66 |
* Sets call duration.
|
|
67 |
* @param aDuration call duration.
|
|
68 |
* @param aEnabled ETrue if enabled.
|
|
69 |
*/
|
|
70 |
void SetCallDuration(
|
|
71 |
const TTimeIntervalSeconds& aDuration,
|
|
72 |
const TBool aEnabled );
|
|
73 |
|
|
74 |
/**
|
|
75 |
* Updates screen to reflect changes.
|
|
76 |
*/
|
|
77 |
void CommitL();
|
|
78 |
|
|
79 |
protected: // Functions from base classes
|
|
80 |
|
|
81 |
/**
|
|
82 |
* From CCoeControl, draws the control.
|
|
83 |
* @param aRect area to be drawn.
|
|
84 |
*/
|
|
85 |
virtual void Draw( const TRect& aRect ) const;
|
|
86 |
|
|
87 |
/**
|
|
88 |
* From CCoeControl, handles size changes.
|
|
89 |
*/
|
|
90 |
virtual void SizeChanged();
|
|
91 |
|
|
92 |
/**
|
|
93 |
* From CCoeControl, handles position changes.
|
|
94 |
*/
|
|
95 |
virtual void PositionChanged();
|
|
96 |
|
|
97 |
private:
|
|
98 |
|
|
99 |
/**
|
|
100 |
* Gets call duration text.
|
|
101 |
* @return reference to text.
|
|
102 |
*/
|
|
103 |
const TDesC& GetCallDurationText() const;
|
|
104 |
|
|
105 |
/**
|
|
106 |
* Appends character to the buffer.
|
|
107 |
* @param aBuffer buffer.
|
|
108 |
* @param aChar character.
|
|
109 |
*/
|
|
110 |
static void AppendChar(
|
|
111 |
TDes& aBuffer,
|
|
112 |
const TChar& aChar );
|
|
113 |
|
|
114 |
/**
|
|
115 |
* Appends a number to the buffer.
|
|
116 |
* @param aBuffer buffer.
|
|
117 |
* @param aNumber number, 0 .. 99.
|
|
118 |
*/
|
|
119 |
static void AppendNum(
|
|
120 |
TDes& aBuffer,
|
|
121 |
const TInt aNumber );
|
|
122 |
|
|
123 |
private:
|
|
124 |
|
|
125 |
// Call duration layout.
|
|
126 |
TAknLayoutText iCallDurationLayout;
|
|
127 |
|
|
128 |
// ETrue if call duration is enabled.
|
|
129 |
TBool iCallDurationEnabled;
|
|
130 |
|
|
131 |
// Duration in seconds.
|
|
132 |
TTimeIntervalSeconds iCallDuration;
|
|
133 |
|
|
134 |
// Buffer for call duration.
|
|
135 |
mutable TBuf< KVtUiCallDurationBufferLength > iCallDurationBuffer;
|
|
136 |
|
|
137 |
// Current speaker, ETrue if loudspeaker, EFalse if handset.
|
|
138 |
TBool iLoudspeaker;
|
|
139 |
|
|
140 |
// Reference to navipane.
|
|
141 |
CVtUiNaviPane& iNaviPane;
|
|
142 |
|
|
143 |
};
|
|
144 |
|
|
145 |
#endif // CVTUINAVIPANECONTROL_H
|
|
146 |
|
|
147 |
// End of File
|