📄 heatmeter2view.cpp
字号:
/*
* ============================================================================
* Name : CHeatMeter2View from HeatMeter2View.h
* Part of : HeatMeter2
* Created : 2004.03.27. by
* Implementation notes:
* Initial content was generated by Series 60 AppWizard.
* Version :
* Copyright:
* ============================================================================
*/
// INCLUDE FILES
#include <aknviewappui.h>
#include <avkon.hrh>
#include <HeatMeter2.rsg>
#include "HeatMeter2View.h"
#include "HeatMeter2Container.h"
#include "HeatMeter2.hrh"
#include "SettingListBox.h"
#include "HeatMeter2AppUi.h"
// ================= MEMBER FUNCTIONS =======================
// ---------------------------------------------------------
// CHeatMeter2View::ConstructL(const TRect& aRect)
// EPOC two-phased constructor
// ---------------------------------------------------------
//
void CHeatMeter2View::ConstructL()
{
BaseConstructL( R_HEATMETER2_VIEW1 );
}
// ---------------------------------------------------------
// CHeatMeter2View::~CHeatMeter2View()
// destructor
// ---------------------------------------------------------
//
CHeatMeter2View::~CHeatMeter2View()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
}
// ---------------------------------------------------------
// TUid CHeatMeter2View::Id()
//
// ---------------------------------------------------------
//
TUid CHeatMeter2View::Id() const
{
return KViewId;
}
// ---------------------------------------------------------
// CHeatMeter2View::HandleCommandL(TInt aCommand)
// takes care of view command handling
// ---------------------------------------------------------
//
void CHeatMeter2View::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
case EAknSoftkeyOk:
{
((CHeatMeter2AppUi*)AppUi())->SettingsDone();
//iEikonEnv->InfoMsg( _L("view1 ok") );
break;
}
case EAknSoftkeyBack:
{
AppUi()->HandleCommandL(EEikCmdExit);
break;
}
case EHeatMeter2CmdEditValue:
{
//show a dialog to edit the current heatmeter's value
iContainer->EditCurrentValue();
break;
}
case EHeatMeter2CmdSynch:
{
//start synchronisation
iContainer->Synch();
}
default:
{
AppUi()->HandleCommandL( aCommand );
break;
}
}
}
// ---------------------------------------------------------
// CHeatMeter2View::HandleClientRectChange()
// ---------------------------------------------------------
//
void CHeatMeter2View::HandleClientRectChange()
{
if ( iContainer )
{
//iContainer->SetRect( ClientRect() );
}
}
// ---------------------------------------------------------
// CHeatMeter2View::DoActivateL(...)
//
// ---------------------------------------------------------
//
void CHeatMeter2View::DoActivateL(
const TVwsViewId& /*aPrevViewId*/,TUid /*aCustomMessageId*/,
const TDesC8& /*aCustomMessage*/)
{
if (!iContainer)
{
iContainer = new (ELeave) CHeatMeter2Container;
iContainer->SetMopParent(this);
iContainer->ConstructL( ClientRect() );
AppUi()->AddToStackL( *this, iContainer );
}
}
// ---------------------------------------------------------
// CHeatMeter2View::DoDeactivate()
//
// ---------------------------------------------------------
//
void CHeatMeter2View::DoDeactivate()
{
if ( iContainer )
{
AppUi()->RemoveFromViewStack( *this, iContainer );
}
delete iContainer;
iContainer = NULL;
}
// End of File
void CHeatMeter2View::DoSettings()
{
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -