|
1 /* |
|
2 * Copyright (c) 2004-2006 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: Control to show signal strength indicator on the |
|
15 * status pane's signal pane. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef AKNSIGNALSTRENGTH_H |
|
21 #define AKNSIGNALSTRENGTH_H |
|
22 |
|
23 #include <coecntrl.h> |
|
24 |
|
25 |
|
26 /** |
|
27 * A signal icon control in the status pane's signal pane |
|
28 * The control draws signal icon indicator graphics. |
|
29 */ |
|
30 |
|
31 NONSHARABLE_CLASS(CAknSignalStrength) : public CCoeControl |
|
32 { |
|
33 public: |
|
34 |
|
35 /** |
|
36 * Destructor |
|
37 */ |
|
38 ~CAknSignalStrength(); |
|
39 |
|
40 static CAknSignalStrength* NewL(); |
|
41 |
|
42 static CAknSignalStrength* NewLC(); |
|
43 |
|
44 void SetSignalLevel(TInt aLevel); |
|
45 |
|
46 TInt SignalLevel(); |
|
47 protected: // From CCoeControl |
|
48 |
|
49 /** |
|
50 * From CCoeControl. Handle the size change events. |
|
51 */ |
|
52 void SizeChanged(); |
|
53 |
|
54 /** |
|
55 * From CCoeControl. Handles the position change events. |
|
56 */ |
|
57 void PositionChanged(); |
|
58 |
|
59 /** |
|
60 * Handles a change to the control's resources of type aType |
|
61 * which are shared across the environment. |
|
62 * @param aType Event type. |
|
63 */ |
|
64 void HandleResourceChange( TInt aType ); |
|
65 |
|
66 |
|
67 private: // From CCoeControl |
|
68 virtual void Draw(const TRect& aRect) const; |
|
69 |
|
70 private: |
|
71 /** |
|
72 * Standard constructor |
|
73 */ |
|
74 CAknSignalStrength(); |
|
75 |
|
76 void LoadDefaultBitmapsL(); |
|
77 |
|
78 void LoadStaconBitmapsL(); |
|
79 |
|
80 void LoadFlatBitmapsL(); |
|
81 |
|
82 void DeleteBitmaps(); |
|
83 |
|
84 void DrawInNormalStatusPane(const TRect& aRect) const; |
|
85 |
|
86 void DrawInStaconPane(const TRect& aRect) const; |
|
87 |
|
88 void DrawInFlatStatusPane(const TRect& aRect) const; |
|
89 |
|
90 private: |
|
91 TInt iSignalLevel; |
|
92 TInt iDefaultSignalBitmapOffset; |
|
93 TInt iStaconSignalBitmapOffset; |
|
94 TInt iFlatSignalBitmapOffset; |
|
95 |
|
96 CFbsBitmap* iDefaultSignalIndicatorBitmap; |
|
97 CFbsBitmap* iDefaultSignalIndicatorBitmapMask; |
|
98 CFbsBitmap* iDefaultNoSignalIndicatorBitmap; |
|
99 CFbsBitmap* iDefaultNoSignalIndicatorBitmapMask; |
|
100 |
|
101 CFbsBitmap* iStaconLeftSideSignalIndicatorBitmap; |
|
102 CFbsBitmap* iStaconLeftSideSignalIndicatorBitmapMask; |
|
103 CFbsBitmap* iStaconRightSideSignalIndicatorBitmap; |
|
104 CFbsBitmap* iStaconRightSideSignalIndicatorBitmapMask; |
|
105 CFbsBitmap* iStaconNoSignalIndicatorBitmap; |
|
106 CFbsBitmap* iStaconNoSignalIndicatorBitmapMask; |
|
107 |
|
108 CFbsBitmap* iFlatSignalIndicatorBitmap; |
|
109 CFbsBitmap* iFlatSignalIndicatorBitmapMask; |
|
110 CFbsBitmap* iFlatNoSignalIndicatorBitmap; |
|
111 CFbsBitmap* iFlatNoSignalIndicatorBitmapMask; |
|
112 |
|
113 TSize iLastDefaultSize; |
|
114 TSize iLastStaconSize; |
|
115 TSize iLastFlatSize; |
|
116 }; |
|
117 |
|
118 #endif // AKNSIGNALSTRENGTH_H |