📄 powerresmancontainer.h
字号:
// CLASS DECLARATION
/**
*
* CPowerResManContainer PowerResManContainer.h
* This is a container control for the application.
*
* Copyright (c) 2004 Nokia Corporation
* version 2.0
*/
#ifndef POWERRESMANCONTAINER_H
#define POWERRESMANCONTAINER_H
// INCLUDES
#include <coecntrl.h>
#include <PowerResMan.rsg>
#include <barsread.h>
#include <aknlists.h>
#include "PowerResMan.hrh"
// FORWARD DECLARATIONS
class CAknDoubleStyleListBox;
// CLASS DECLARATION
/**
* CPowerResManContainer container control class.
*
*/
class CPowerResManContainer : public CCoeControl, MCoeControlObserver
{
public: // Constructors and destructor
/**
* Function: ConstructL
* Description: 2nd phase constructor
* Params: aRect - v
*/
void ConstructL(const TRect& aRect);
/**
* Function: ~CPowerResManContainer
* Description: Destructor
*/
~CPowerResManContainer();
public:
/**
* Function: ProcessStateVarChangeL
* Description: Sets the text in the
* appropriate line for the specified state variable
* Params: aStateVarUid. TUid of the state variable
* Params aNewState. The new state of the variable
*/
void ProcessStateVarChangeL(TUid aStateVarUid, TInt aNewState);
private: // Functions from CCoeControl
/**
* Function: SizeChanged
* Description: Called by the framework when the control is resized
*/
void SizeChanged();
/**
* Function: CountComponentControls
* Description: Number of controls inside this container
*/
TInt CountComponentControls() const;
/**
* Function: ComponentControl
* Description: Gets the specified component of a compound control
*
* Params: aIndex. component to return
*/
CCoeControl* ComponentControl(TInt aIndex) const;
/**
* Function: Draw
* Description: Called by the window server to draw a control
*
* Params: aRect. Area to be redrawn
*/
void Draw(const TRect& aRect) const;
//From MCoeControlObserver
/**
* Function: HandleControlEventL
* Description: Acts upon changes in the hosted control's state.
*
* Params aControl The control changing its state
* Params aEventType The type of control event
*/
void HandleControlEventL(CCoeControl* aControl,TCoeEvent aEventType);
private:
/**
* Function: SetTextL
* Description: Sets the text of a list item
* Params: aLine - the list item to change
* Params: aText - the new text for the item
*/
void SetTextL(TSystemAgentListLineId aLine, const TDesC& aText);
/**
* Function: SetupListItemsL
* Description: Sets the initial text for all the items in the list
*/
void SetupListItemsL();
/**
* Function: LoadDefaultValuesL
* Description: Populates the list array with default values
* Params: aDefaultValuesArray - the list array to populate
*/
void LoadDefaultValuesL(CDesCArray& aDefaultValuesArray);
private: //data
CAknDoubleStyleListBox* iListbox;
CDesCArray* iItemArray;
};
#endif
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -