|
1 /* |
|
2 * Copyright (c) 2002-2008 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: Container control for skinnable clock control |
|
15 * in idle status pane layout. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "akncontextidle.h" |
|
22 #include "AknSkinnableClock.h" |
|
23 |
|
24 #include <AknTasHook.h> |
|
25 // ============================ MEMBER FUNCTIONS ============================= |
|
26 |
|
27 // --------------------------------------------------------------------------- |
|
28 // CAknIdleContextPane::CAknIdleContextPane |
|
29 // C++ default constructor can NOT contain any code, that |
|
30 // might leave. |
|
31 // --------------------------------------------------------------------------- |
|
32 // |
|
33 CAknIdleContextPane::CAknIdleContextPane() |
|
34 { |
|
35 AKNTASHOOK_ADD( this, "CAknIdleContextPane" ); |
|
36 } |
|
37 |
|
38 |
|
39 // --------------------------------------------------------------------------- |
|
40 // Destructor |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 CAknIdleContextPane::~CAknIdleContextPane() |
|
44 { |
|
45 AKNTASHOOK_REMOVE(); |
|
46 delete iClock; |
|
47 } |
|
48 |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // CAknIdleContextPane::ConstructFromResourceL |
|
52 // (other items were commented in a header). |
|
53 // --------------------------------------------------------------------------- |
|
54 // |
|
55 void CAknIdleContextPane::ConstructFromResourceL( TResourceReader& /*aReader*/ ) |
|
56 { |
|
57 iClock = CAknSkinnableClock::NewL( this, ETrue, ETrue ); |
|
58 iClock->ActivateL(); |
|
59 } |
|
60 |
|
61 |
|
62 // --------------------------------------------------------------------------- |
|
63 // CAknIdleContextPane::SizeChanged |
|
64 // (other items were commented in a header). |
|
65 // --------------------------------------------------------------------------- |
|
66 // |
|
67 void CAknIdleContextPane::SizeChanged() |
|
68 { |
|
69 TPoint tl = Rect().iTl; |
|
70 iClock->SetExtent( tl, Size() ); |
|
71 } |
|
72 |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // CAknIdleContextPane::CountComponentControls |
|
76 // (other items were commented in a header). |
|
77 // --------------------------------------------------------------------------- |
|
78 // |
|
79 TInt CAknIdleContextPane::CountComponentControls() const |
|
80 { |
|
81 return iClock ? 1 : 0; |
|
82 } |
|
83 |
|
84 |
|
85 // --------------------------------------------------------------------------- |
|
86 // CAknIdleContextPane::ComponentControl |
|
87 // (other items were commented in a header). |
|
88 // --------------------------------------------------------------------------- |
|
89 // |
|
90 CCoeControl* CAknIdleContextPane::ComponentControl( TInt /*aIndex*/ ) const |
|
91 { |
|
92 return iClock; |
|
93 } |
|
94 |
|
95 |
|
96 // --------------------------------------------------------------------------- |
|
97 // CAknIdleContextPane::Draw |
|
98 // (other items were commented in a header). |
|
99 // --------------------------------------------------------------------------- |
|
100 // |
|
101 void CAknIdleContextPane::Draw( const TRect& /*aRect*/ ) const |
|
102 { |
|
103 } |
|
104 |
|
105 |
|
106 // --------------------------------------------------------------------------- |
|
107 // CAknIdleContextPane::SetDimmed |
|
108 // (other items were commented in a header). |
|
109 // --------------------------------------------------------------------------- |
|
110 // |
|
111 void CAknIdleContextPane::SetDimmed( TBool aDimmed ) |
|
112 { |
|
113 CCoeControl::SetDimmed( aDimmed ); |
|
114 if ( iClock ) |
|
115 { |
|
116 iClock->SetDimmed( aDimmed ); |
|
117 } |
|
118 } |
|
119 |
|
120 |
|
121 // --------------------------------------------------------------------------- |
|
122 // CAknIdleContextPane::HandleResourceChange |
|
123 // (other items were commented in a header). |
|
124 // --------------------------------------------------------------------------- |
|
125 // |
|
126 void CAknIdleContextPane::HandleResourceChange( TInt aType ) |
|
127 { |
|
128 if( iClock ) |
|
129 { |
|
130 iClock->HandleResourceChange( aType ); |
|
131 } |
|
132 } |
|
133 |
|
134 |
|
135 // --------------------------------------------------------------------------- |
|
136 // CAknIdleContextPane::MakeVisible |
|
137 // (other items were commented in a header). |
|
138 // --------------------------------------------------------------------------- |
|
139 // |
|
140 void CAknIdleContextPane::MakeVisible( TBool aVisible ) |
|
141 { |
|
142 CCoeControl::MakeVisible( aVisible ); |
|
143 if ( iClock ) |
|
144 { |
|
145 iClock->MakeVisible( aVisible ); |
|
146 } |
|
147 } |
|
148 |
|
149 // End of File |
|
150 |
|
151 |