cprogressdlg.cpp
来自「symbian uiq 例子代码,功能包括文件断点续传、编辑通讯录、后台短信回复」· C++ 代码 · 共 105 行
CPP
105 行
/*
* Copyright (c) 2007,苏州丰达
* All rights reserved.
* 版权所有(C)2007-2008 苏州丰达
* 公司地址:中国,江苏省苏州市
* 网址:http://www.
*
* 文件名称:CM3UIQ2AppUi.cpp
* 摘 要:
*
* 产品版本:彩视 1.0
*
* 作 者:xxxx
* 创建日期:xxxxx
* 负责人:xxxxx
*
* 修改者:司治国
* 修改日期:2008.1.17
*
* 编译器或环境等描述:uiqsdk2.1
* 适用于VC2003+symbian 7.x的环境开发。
*
**/
#include <coecntrl.h>
#include <eikprogi.h>
#include "m3uiq2.hrh"
#include "CProgressDlg.h"
#include "M3UIQ2Appui.h"
CProgressDlg::CProgressDlg()
{
// No implementation required
}
CProgressDlg::~CProgressDlg()
{
}
CProgressDlg* CProgressDlg::NewLC()
{
CProgressDlg* self = new (ELeave)CProgressDlg();
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
CProgressDlg* CProgressDlg::NewL()
{
CProgressDlg* self=CProgressDlg::NewLC();
CleanupStack::Pop(); // self;
return self;
}
void CProgressDlg::ConstructL()
{
}
void CProgressDlg::PreLayoutDynInitL()
{
}
TBool CProgressDlg::OkToExitL( TInt aButtonId )
{
CM3UIQ2AppUi *iAppUi = STATIC_CAST(CM3UIQ2AppUi *, iEikonEnv->EikAppUi());
iAppUi->SetCancel(ETrue);
if (aButtonId == EButtonSave)
{
return ETrue;
}
return ETrue;
}
TInt CProgressDlg::PrepareForcedExitL()
{
OkToExitL(EEikBidCancel);
return EEikBidCancel;
}
void CProgressDlg::Increase( TInt aIncrease )
{
// Get a pointer to the control.
CCoeControl* myControlPtr = this->Control(EMyProgressInfoControlId);
// Downcast the returned CCoeControl* pointer to the correct type.
CEikProgressInfo* myProgInfo = static_cast<CEikProgressInfo*>(myControlPtr);
// Increments the value by one step
myProgInfo->IncrementAndDraw(aIncrease);
}
TBool CProgressDlg::ShutL()
{
return EFalse;
}
void CProgressDlg::SetFinalval(TInt aFinalValue)
{
// Get a pointer to the control.
CCoeControl* myControlPtr = this->Control(EMyProgressInfoControlId);
// Downcast the returned CCoeControl* pointer to the correct type.
CEikProgressInfo* myProgInfo = static_cast<CEikProgressInfo*>(myControlPtr);
// Increments the value by one step
myProgInfo->SetFinalValue(aFinalValue);
}
//end file
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?