timercontainer.h
来自「《基于Symbian OS的手机开发与应用实践》这本书的配套源码。」· C头文件 代码 · 共 96 行
H
96 行
/*
* ============================================================================
* Name : CTimerContainer from TimerContainer.h
* Part of : Timer
* Created : 05.02.2006 by ToBeReplacedByAuthor
* Description:
* Declares container control for application.
* Version :
* Copyright: ToBeReplacedByCopyright
* ============================================================================
*/
#ifndef TIMERCONTAINER_H
#define TIMERCONTAINER_H
// INCLUDES
#include <coecntrl.h>
// CONSTANTS
_LIT(KTimeFormat,"%T:%S.%*C1");
// FORWARD DECLARATIONS
class CEikLabel; // for example labels
class CTimerModel;
// CLASS DECLARATION
/**
* CTimerContainer container control class.
*
*/
class CTimerContainer : public CCoeControl
{
public: // Constructors and destructor
/**
* Create a CCountdownTimer object
* @param aObserver The timer event observer
* @result a pointer to the created instance of CCountdownTimer
*/
static CTimerContainer* NewL(const TRect& aRect, const CTimerModel& aModel);
/**
* Destructor.
*/
~CTimerContainer();
public: // New functions
void RefreshL();
public: // Functions from base classes
private: // Functions from base classes
/**
* From CoeControl,CountComponentControls.
*/
TInt CountComponentControls() const;
/**
* From CCoeControl,ComponentControl.
*/
CCoeControl* ComponentControl(TInt aIndex) const;
/**
* From CCoeControl,Draw.
*/
void Draw(const TRect& aRect) const;
private: //
/**
* The constructor
*/
CTimerContainer(const CTimerModel& aModel);
/**
* EPOC default constructor.
* @param aRect Frame rectangle for container.
*/
void ConstructL(const TRect& aRect);
private: // constants
static const TInt KTimeStringLength;
private: //data
/// The model of the Timer application
const CTimerModel& iModel;
CEikLabel* iLabel; // example label
};
#endif
// End of File
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?