readbarcappui.cpp
来自「barcode readers [ from Image]」· C++ 代码 · 共 72 行
CPP
72 行
/* Copyright (c) 2001, Nokia Mobile Phones. All rights reserved */
#include <avkon.hrh>
#include <eikmenup.h>
#include <CameraServ.h>
#include <SnapShot.rsg>
#include "SnapShot.pan"
#include "SnapShotAppUi.h"
#include "SnapShotAppView.h"
#include "SnapShot.hrh"
void CSnapShotAppUi::ConstructL()
{
BaseConstructL();
iAppView = CSnapShotAppView::NewL(ClientRect());
AddToStackL(iAppView);
}
CSnapShotAppUi::CSnapShotAppUi()
{
// add any construction that cannot leave here
}
CSnapShotAppUi::~CSnapShotAppUi()
{
if (iAppView)
{
RemoveFromStack(iAppView);
}
delete iAppView;
iAppView = NULL;
}
void CSnapShotAppUi::DynInitMenuPaneL(TInt aResourceId, CEikMenuPane* aMenuPane)
{
if (aResourceId == R_SNAPSHOT_MENU)
{
if (iAppView->IsCameraReady())
{
aMenuPane->SetItemDimmed(ESnapShotTakePicture, EFalse);
}
else
{
aMenuPane->SetItemDimmed(ESnapShotTakePicture, ETrue);
}
}
}
void CSnapShotAppUi::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EAknSoftkeyExit:
Exit();
break;
case ESnapShotTakePicture:
iAppView->Snap();
break;
default:
User::Panic (_L("SnapShot"), ECameraBasicUi);
break;
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?