📄 userlistboxappui.cpp
字号:
/* Copyright (c) 2009, Nokia. All rights reserved */
#include <avkon.hrh>
#include <aknnotewrappers.h>
#include "UserListbox.pan"
#include "UserListboxAppUi.h"
//#include "UserListboxAppView.h"
#include "UserListboxView.h"
#include "UserListbox.hrh"
#include "Userlistboxcontainer.h"
void CUserListboxAppUi::ConstructL()
{
BaseConstructL(EAknEnableSkin);
// iAppView = CUserListboxAppView::NewL(ClientRect());
// AddToStackL(iAppView);
ipUserLbView = CUserListboxView::NewL();
AddViewL(ipUserLbView);
}
CUserListboxAppUi::CUserListboxAppUi()
{
// add any construction that cannot leave here
}
CUserListboxAppUi::~CUserListboxAppUi()
{
}
void CUserListboxAppUi::HandleCommandL(TInt aCommand)
{
switch(aCommand)
{
case EEikCmdExit:
case EAknSoftkeyExit:
Exit();
break;
case EUserListboxCommand1:
{
ipUserLbView->m_pAppContainer->AppendAnItem(_L("1"));
ipUserLbView->m_pAppContainer->AppendAnItem(_L("2"));
ipUserLbView->m_pAppContainer->AppendAnItem(_L("3"));
ipUserLbView->m_pAppContainer->AppendAnItem(_L("4"));
ipUserLbView->m_pAppContainer->AppendAnItem(_L("5"));
ipUserLbView->m_pAppContainer->AppendAnItem(_L("6"));
ipUserLbView->m_pAppContainer->AppendAnItem(_L("7"));
ipUserLbView->m_pAppContainer->AppendAnItem(_L("8"));
ipUserLbView->m_pAppContainer->SetSelected(0);
ipUserLbView->m_pAppContainer->SetSelected(1);
ipUserLbView->m_pAppContainer->SetSelected(2);
ipUserLbView->m_pAppContainer->SetSelected(3);
ipUserLbView->m_pAppContainer->SetSelected(4);
ipUserLbView->m_pAppContainer->SetSelected(5);
}
break;
case EUserListboxCommand2:
{
for(TInt i=0; i<4; ++i)
{
ipUserLbView->m_pAppContainer->DeleteAnItem(0);
}
}
break;
default:
Panic(EUserListboxBasicUi);
break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -