|
Nokia N97 SDK Example Applications Guide |
#include <aknexpbarcontainer.h>
Inheritance diagram for CAknExPbarContainer:

Definition at line 66 of file aknexpbarcontainer.h.
Public Member Functions |
|
| CAknExPbarContainer () | |
| void | ConstructL (const TRect &aRect) |
| virtual | ~CAknExPbarContainer () |
| void | IncrementBarsAndDraw (TInt aIncrement) |
| void | ReConstructProgressBarsL () |
| void | SetFinalValue () |
| void | ShowInfo (TInt aBarNo) |
Static Public Member Functions |
|
| static CAknExPbarContainer * | NewL (const TRect &aRect) |
| static CAknExPbarContainer * | NewLC (const TRect &aRect) |
Private Member Functions |
|
| TInt | CountComponentControls () const |
| CCoeControl * | ComponentControl (TInt aIndex) const |
| void | Draw (const TRect &aRect) const |
| void | HandleControlEventL (CCoeControl *aControl, TCoeEvent aEventType) |
| void | ConstructTimerModel () |
| void | ConstructTimerL () |
| void | CreateProgressBarsL () |
Private Attributes |
|
| CEikProgressInfo * | iPBar [KNumberOfBars] |
| TBool | iFinalValuesTwisted |
| CAknExPbarTimer * | iTimer |
| TAknExPbarTimerModel | iTimerModel |
|
|
CAknExPbarContainer C++ default constructor. Definition at line 64 of file aknexpbarcontainer.cpp. References iPBar. Referenced by NewLC(). 00065 { 00066 for ( TInt ii = 0; ii < KNumberOfBars; ++ii ) 00067 { 00068 iPBar[ii] = NULL; 00069 } 00070 }
|
|
|
~CAknExPbarContainer. Virtual Destructor. Definition at line 98 of file aknexpbarcontainer.cpp. 00099 { 00100 for ( TInt ii = 0; ii < KNumberOfBars; ++ii ) 00101 { 00102 delete( iPBar[ii] ); 00103 iPBar[ii] = NULL; 00104 } 00105 00106 delete iTimer; 00107 }
|
|
|
NewL. Two-phased constructor. Construct a CAknExPbarContainer using two phase construction, and return a pointer to the created object
Definition at line 38 of file aknexpbarcontainer.cpp. References NewLC(). Referenced by CAknExPbarAppUi::ConstructL(). 00039 { 00040 CAknExPbarContainer* self = CAknExPbarContainer::NewLC( aRect ); 00041 CleanupStack::Pop( self ); 00042 return self; 00043 }
|
|
|
NewLC. Two-phased constructor. Construct a CAknExPbarContainer using two phase construction, and return a pointer to the created object
Definition at line 50 of file aknexpbarcontainer.cpp. References CAknExPbarContainer(). Referenced by NewL(). 00051 { 00052 CAknExPbarContainer* self = new ( ELeave ) CAknExPbarContainer(); 00053 CleanupStack::PushL( self ); 00054 self->ConstructL( aRect ); 00055 return self; 00056 }
|
|
|
ConstructL 2nd phase constructor.
Definition at line 77 of file aknexpbarcontainer.cpp. References ConstructTimerL(), ConstructTimerModel(), CreateProgressBarsL(), and iFinalValuesTwisted. 00078 { 00079 CreateWindowL(); 00080 00081 iFinalValuesTwisted = EFalse; 00082 00083 Window().SetShadowDisabled( EFalse ); 00084 CreateProgressBarsL(); 00085 00086 SetRect( aRect ); 00087 ActivateL(); 00088 00089 ConstructTimerModel(); 00090 ConstructTimerL(); 00091 }
|
|
|
IncrementBarsAndDraw Increase progress bar length
Definition at line 114 of file aknexpbarcontainer.cpp. References iPBar. Referenced by CAknExPbarAppUi::HandleCommandL(), and CAknExPbarTimer::RunL(). 00115 { 00116 TInt index = 0; 00117 while ( index < KNumberOfBars ) 00118 { 00119 iPBar[ index ]->IncrementAndDraw( aIncrement ); 00120 ++index; 00121 } 00122 }
|
|
|
ReConstructProgressBarsL Deletes old progressbars and creates new ones. Called from CAknExPbarAppUi::HandleResourceChangeL() when display layout is changed. Definition at line 222 of file aknexpbarcontainer.cpp. References CreateProgressBarsL(), and iPBar. Referenced by CAknExPbarAppUi::HandleResourceChangeL(). 00223 { 00224 //If Progressbars are already created, delete those first. 00225 if( iPBar[KNumberOfBars - 1] ) 00226 { 00227 for ( TInt ii = 0; ii < KNumberOfBars; ++ii ) 00228 { 00229 delete( iPBar[ii] ); 00230 iPBar[ii] = NULL; 00231 } 00232 } 00233 00234 CreateProgressBarsL(); 00235 00236 for ( TInt ii = 0; ii < KNumberOfBars; ++ii ) 00237 { 00238 iPBar[ ii ]->ActivateL(); 00239 } 00240 }
|
|
|
From CoeControl,CountComponentControls.
Definition at line 129 of file aknexpbarcontainer.cpp.
|
|
|
From CCoeControl,ComponentControl.
Definition at line 139 of file aknexpbarcontainer.cpp. References iPBar. 00140 { 00141 return ( iPBar[ aIndex ] ); 00142 }
|
|
|
From CCoeControl,Draw.
Definition at line 149 of file aknexpbarcontainer.cpp. 00150 { 00151 TRgb MyRgb; 00152 MyRgb = KAknExPbarBlack; 00153 00154 CWindowGc& gc = SystemGc(); 00155 gc.SetPenStyle( CGraphicsContext::ENullPen ); 00156 gc.SetBrushColor( MyRgb ); 00157 gc.SetBrushStyle( CGraphicsContext::ESolidBrush ); 00158 gc.DrawRect( aRect ); 00159 }
|
|
||||||||||||
|
From CCoeControl, HandleControlEventL Handles an event of type aEventType
Definition at line 167 of file aknexpbarcontainer.cpp.
|
|
|
ConstructTimerModel Constructs Timer's Model Definition at line 295 of file aknexpbarcontainer.cpp. References TAknExPbarTimerModel::iHundredths, TAknExPbarTimerModel::iIncrement, TAknExPbarTimerModel::iRunning, and iTimerModel. Referenced by ConstructL(). 00296 { 00297 iTimerModel.iHundredths = KTimerModelHundredths; 00298 iTimerModel.iIncrement = KTimerModelIncrement; 00299 iTimerModel.iRunning = KTimerModelRunning; 00300 }
|
|
|
ConstructTimerL Constructs Timer itself Definition at line 306 of file aknexpbarcontainer.cpp. References iTimer, iTimerModel, and CAknExPbarTimer::NewL(). Referenced by ConstructL(). 00307 { 00308 iTimer = CAknExPbarTimer::NewL( &iTimerModel, this ); 00309 }
|
|
|
CreateProgressBarsL Creates progress bars Definition at line 179 of file aknexpbarcontainer.cpp. References iPBar. Referenced by ConstructL(), and ReConstructProgressBarsL(). 00180 { 00181 TResourceReader reader; 00182 00183 // Set Progress Bar property, using resource 00184 iCoeEnv->CreateResourceReaderLC( reader, R_AKNEXPBAR_PROGRESS_BAR_0 ); 00185 iPBar[ 0 ] = new( ELeave ) CEikProgressInfo(); 00186 iPBar[ 0 ]->ConstructFromResourceL( reader ); 00187 00188 // PopAndDestroy reader from CleanupStack 00189 CleanupStack::PopAndDestroy(); 00190 00191 iPBar[ 0 ]->SetPosition( ( TPoint( KProgressBar0Position_X, 00192 KProgressBar0Position_Y ) ) ); 00193 iPBar[ 0 ]->SetContainerWindowL( *this ); 00194 00195 00196 TRect rect; 00197 AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect); 00198 00199 // Set Progress Bar property, coding directly 00200 CEikProgressInfo::SInfo info; 00201 info.iHeight = KProgressBarHeight; 00202 info.iSplitsInBlock = KProgressBarSplitsInBlock; 00203 info.iTextType = EEikProgressTextNone; 00204 00205 //Set progress bar widht using current rectangle width 00206 info.iWidth = (rect.Width() - KProgressBar1EmptyLeftSpace); 00207 info.iFinalValue = KProgressBar1FinalValue; 00208 iPBar[ 1 ] = new( ELeave ) CEikProgressInfo( info ); 00209 iPBar[ 1 ]->ConstructL(); 00210 iPBar[ 1 ]->SetPosition( ( TPoint( KProgressBar1Position_X, 00211 KProgressBar1Position_Y ) ) ); 00212 00213 iPBar[ 1 ]->SetContainerWindowL( *this ); 00214 }
|
|
|
SetFinalValue Set Final Value. Changes final values between progress bar 1 and 2. Definition at line 247 of file aknexpbarcontainer.cpp. References iFinalValuesTwisted, and iPBar. Referenced by CAknExPbarAppUi::HandleCommandL(). 00248 { 00249 if ( iFinalValuesTwisted ) 00250 { 00251 iPBar[ 0 ]->SetFinalValue( KProgressBar0FinalValue ); 00252 00253 iPBar[ 1 ]->SetFinalValue( KProgressBar1FinalValue ); 00254 iFinalValuesTwisted = EFalse; 00255 } 00256 else 00257 { 00258 iPBar[ 0 ]->SetFinalValue( KProgressBar1FinalValue ); 00259 iPBar[ 1 ]->SetFinalValue( KProgressBar0FinalValue ); 00260 iFinalValuesTwisted = ETrue; 00261 } 00262 00263 for ( TInt ii = 0; ii < KNumberOfBars; ++ii ) 00264 iPBar[ ii ]->SetAndDraw( KProgressBarResetValue ); 00265 }
|
|
|
ShowInfo Shows progressbars Info
Definition at line 272 of file aknexpbarcontainer.cpp. References iPBar. Referenced by CAknExPbarAppUi::HandleCommandL(). 00273 { 00274 //Allocate TBuf with constant length. 00275 TBuf<KLengthOfTempString> str; 00276 TBuf<KLengthOfTempString> format; 00277 00278 iCoeEnv->ReadResource( format, R_AKNEXPBAR_FORMATSTRING_INFO ); 00279 00280 str.Format( format, iPBar[ aBarNo ]->Info().iTextType, 00281 iPBar[ aBarNo ]->Info().iSplitsInBlock, 00282 iPBar[ aBarNo ]->Info().iFinalValue, 00283 iPBar[ aBarNo ]->Info().iWidth, 00284 iPBar[ aBarNo ]->Info().iHeight, 00285 iPBar[ aBarNo ]->CurrentValue() ); 00286 00287 CAknInformationNote* note = new (ELeave) CAknInformationNote; 00288 note->ExecuteLD( str ); 00289 }
|
|
|
iPBar owned by CAknExPbarContainer object. Definition at line 204 of file aknexpbarcontainer.h. Referenced by CAknExPbarContainer(), ComponentControl(), CreateProgressBarsL(), IncrementBarsAndDraw(), ReConstructProgressBarsL(), SetFinalValue(), ShowInfo(), and ~CAknExPbarContainer(). |
|
|
Indicates are progressbar final values twisted so that final value for progressbar 1 is set for progressbar 0 and otherwise. If ETrue, values are twisted. Definition at line 211 of file aknexpbarcontainer.h. Referenced by ConstructL(), and SetFinalValue(). |
|
|
iTimer, pointer to timer class. Owned by CAknExPbarContainer object. Definition at line 217 of file aknexpbarcontainer.h. Referenced by ConstructTimerL(), and ~CAknExPbarContainer(). |
|
|
iTimerModel, struct to TAknExPbarTimerModel Definition at line 220 of file aknexpbarcontainer.h. Referenced by ConstructTimerL(), and ConstructTimerModel(). |
|
© Nokia 2009 |