/*
============================================================================
Name : TestStatusAppUi.cpp
Author : Lion
Copyright : Your copyright notice
Description : CTestStatusAppUi implementation
============================================================================
*/
// INCLUDE FILES
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include <stringloader.h>
#include <TestStatus.rsg>
#include <f32file.h>
#include <s32file.h>
#include <FBS.H>
#include "TestStatus.pan"
#include "TestStatusAppUi.h"
#include "TestStatusAppView.h"
#include "TestStatus.hrh"
#include "example.mbg"
_LIT( KFileName, "C:\\private\\0F07F5DD\\TestStatus.txt" );
_LIT( KText, "Hello World!");
// ============================ MEMBER FUNCTIONS ===============================
// -----------------------------------------------------------------------------
// CTestStatusAppUi::ConstructL()
// Symbian 2nd phase constructor can leave.
// -----------------------------------------------------------------------------
//
void CTestStatusAppUi::ConstructL()
{
// Initialise app UI with standard value.
BaseConstructL();
// Create view object
iAppView = CTestStatusAppView::NewL( ClientRect() );
// Create a file to write the text to
RFs fsSession;
User::LeaveIfError(fsSession.Connect());
CleanupClosePushL( fsSession );
TInt err = fsSession.MkDirAll(KFileName);
if ( KErrNone != err )
{
CleanupStack::PopAndDestroy(1); // fsSession
return;
}
RFile file;
err = file.Replace(fsSession, KFileName, EFileWrite );
CleanupClosePushL( file );
if ( KErrNone != err )
{
CleanupStack::PopAndDestroy(2); // file, fsSession
return;
}
RFileWriteStream outputFileStream( file );
CleanupClosePushL( outputFileStream );
outputFileStream << KText;
CleanupStack::PopAndDestroy(3); // outputFileStream, file, fsSession
}
// -----------------------------------------------------------------------------
// CTestStatusAppUi::CTestStatusAppUi()
// C++ default constructor can NOT contain any code, that might leave.
// -----------------------------------------------------------------------------
//
CTestStatusAppUi::CTestStatusAppUi()
{
// No implementation required
}
// -----------------------------------------------------------------------------
// CTestStatusAppUi::~CTestStatusAppUi()
// Destructor.
// -----------------------------------------------------------------------------
//
CTestStatusAppUi::~CTestStatusAppUi()
{
if ( iAppView )
{
delete iAppView;
iAppView = NULL;
}
}
// -----------------------------------------------------------------------------
// CTestStatusAppUi::HandleCommandL()
// Takes care of command handling.
// -----------------------------------------------------------------------------
//
void CTestStatusAppUi::HandleCommandL( TInt aCommand )
{
switch( aCommand )
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case ECommand1:
{
CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
CAknTitlePane* titlePane = static_cast<CAknTitlePane*>(statusPane->ControlL(TUid::Uid(EEikStatusPaneUidTitle)));
titlePane->SetTextL(_L("New Title"));
}
break;
case ECommand2:
{
CEikStatusPane* statusPane = iAvkonAppUi->StatusPane();
CAknContextPane* contextPane = (CAknContextPane*) statusPane->ControlL(TUid::Uid(EEikStatusPaneUidContext));
_LIT(KContextBitMapFile, "\\resource\\apps\\example.mbm");
CFbsBitmap* bitmap = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmExamplePic);
CFbsBitmap* bitmapM = iEikonEnv->CreateBitmapL(KContextBitMapFile, EMbmExamplePic_mask);
contextPane->SetPicture(bitmap, bitmapM);
}
break;
default:
Panic( ETestStatusUi );
break;
}
}
// -----------------------------------------------------------------------------
// Called by the framework when the application status pane
// size is changed. Passes the new client rectangle to the
// AppView
// -----------------------------------------------------------------------------
//
void CTestStatusAppUi::HandleStatusPaneSizeChange()
{
iAppView->SetRect( ClientRect() );
}
// End of File
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
TestStatus.rar (54个子文件)
TestStatus
.generated
winscw_uid.cpp 252B
.project 810B
sis
backup_registration.xml 144B
TestStatus.pkg 1KB
.settings
org.eclipse.cdt.managedbuilder.core.prefs 3KB
inc
TestStatus.pan 678B
TestStatus.hrh 629B
TestStatusAppUi.h 2KB
TestStatusDocument.h 3KB
TestStatusApplication.h 1KB
TestStatusAppView.h 2KB
S60 3.0 Emulator Debug
.generated
subdir.mk 3KB
winscw_uid.o 3KB
winscw_uid.d 445B
sis
TestStatus.pkg 1KB
TestStatusAppUi.inc 2.02MB
objects.mk 379B
TestStatus.inc 535KB
TestStatusAppView.inc 771KB
makefile 2KB
winscw_uid.inc 163KB
src
TestStatusDocument.d 646B
TestStatusAppView.d 545B
TestStatusAppView.o 36KB
TestStatus.o 19KB
TestStatus.d 532B
TestStatusApplication.d 667B
TestStatusApplication.o 12KB
subdir.mk 12KB
TestStatusAppUi.o 448KB
TestStatusAppUi.d 815B
TestStatusDocument.o 396KB
TestStatusDocument.inc 1.71MB
sources.mk 1010B
gfx
subdir.mk 2KB
TestStatusApplication.inc 540KB
data
subdir.mk 2KB
src
TestStatus.cpp 553B
TestStatusAppUi.cpp 4KB
TestStatusDocument.cpp 3KB
TestStatusApplication.cpp 1KB
TestStatusAppView.cpp 3KB
.cdtbuild 13KB
gfx
TestStatus.mifdef 32B
pic_mask.bmp 29KB
pic.jpg 6KB
qgn_menu_TestStatus.svg 4KB
pic.bmp 29KB
pic_mask_temp.bmp 29KB
example.mbmdef 35B
data
TestStatus.rls 937B
TestStatus.rss 4KB
TestStatus_reg.rss 726B
.cdtproject 906B
共 54 条
- 1
资源评论
sijialogin
- 粉丝: 3
- 资源: 8
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 111111111111111111
- Screenshot_2024-04-30-21-47-24-26.jpg
- Cpp1.cpp1111111111
- 利用ERP流程操作的整个订单流程.ppt
- 最新二开版本源码博客论坛源码,UI很漂亮,可切换皮肤界面.rar
- ModStartBlog现代化个人博客系统 v5.2.0源码.rar
- 带posix库的mingw编译器
- SoraAI是一款功能强大的AI助手,由OpenAI开发,以其出色的语音识别技术、广泛的知识库和高度的人工智能特性而备受瞩目
- Thinkphp开发大气响应式个人博客青春博客网站源码.rar
- 最新PHP博客网站程序源码 ThinkPHP.rar
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功