📄 recordercontainer.h
字号:
/*
* ============================================================================
* Name : CRecorderContainer from RecorderContainer.h
* Part of : RecorderExample
* Created : 20.03.2005 by Forum Nokia
* Description:
* Derived from CCoeControl, MCoeControlObserver. Contains UI components.
* Version : 1.0.0
* Copyright: Nokia Corporation
* ============================================================================
*/
#ifndef RECORDERCONTAINER_H
#define RECORDERCONTAINER_H
// INCLUDES
#include <coecntrl.h>
#include "recorder.hrh"
#include <eikon.hrh>
// FORWARD DECLARATIONS
class CEikProgressInfo;
class CAknTitlePane;
class CEikLabel;
// CLASS DECLARATION
/**
* CRecorderContainer container control class.
*
*/
class CRecorderContainer : public CCoeControl, MCoeControlObserver
{
public: // Constructors and destructor
/**
* CRecorderContainer()
*
* @discussion C++ default constructor.
*/
CRecorderContainer();
/**
* ConstructL()
*
* @discussion EPOC default constructor.
* @param aRect Frame rectangle for container.
*
*/
void ConstructL( const TRect& aRect );
/**
* ~CRecorderContainer()
*
* @discussion Delete UI componets.
*/
virtual ~CRecorderContainer();
public: // New functions
/**
* IncrementBarsAndDraw()
*
* @discussion Increase progressbar's length.
* @param increment value
*
*/
void IncrementBarsAndDraw( TInt aIncrement );
/**
* SetBarValue()
*
* @discussion Set progressbar's value.
* @param New value for progressbar.
*/
void SetBarValue(TInt CurrentValue);
/**
* ResetAllValues()
*
* @discussion Reset progress bar length.
* @param New value for progressbar.
* @parem New lenght for progressbar.
*/
void ResetAllValues(TInt CurrentValue, TInt FinalValue);
/**
* SetText()
*
* @discussion Set text to label .
* @param New text.
*/
void SetText(TDesC& aText);
/**
* SetInfo()
*
* @discussion Set active or deactive text to infotext label .
* @param ETrue = active, EFalse = deactive.
*/
void SetInfo(TBool active);
private: // Functions from base classes
/**
* CountComponentControls()
*
* @discussion From CoeControl,CountComponentControls.
* @return amount of component controls,
* in this application, this is the
* number of progress bars.
*/
TInt CountComponentControls() const;
/**
* ComponentControl()
*
* @discussion From CCoeControl,ComponentControl.
* @param each component controls in order
* @return Ptr to each component controls
*/
CCoeControl* ComponentControl( TInt aIndex ) const;
/**
* Draw()
* @discussion From CCoeControl,Draw.
* @param Frame rectangle for container
*/
void Draw( const TRect& aRect ) const;
/**
* SizeChange()
*
* @discussion Calculate new sizes of UI components
*/
void SizeChanged();
/**
* From MCoeControlObserver
* @param aControl each component controls
* @param aEventType event type
*/
void HandleControlEventL(
CCoeControl* /*aControl*/, TCoeEvent /*aEventType*/ );
private: //data
CAknTitlePane* iTitlePane;
//label for audo file's name
CEikLabel* iLabel;
//textbox for timeinformation
CEikLabel* iTime;
//textbox for automatic operation title
CEikLabel* iInfo;
//textbox for automatic operation status
CEikLabel* iInfoText;
//progressbar show how long audio file is
CEikProgressInfo* iPBar;
//maximun value of progressbar
TInt iFinalValue;
};
#endif
// End of File
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -