📄 svexserviceapplistview.cpp
字号:
// Copyright (c) 2006 Murray Read, All rights reserved
#include "SvexServiceAppListView.h"
#include "SvexInfo.h"
EXPORT_C CSvexServiceAppListView* CSvexServiceAppListView::NewLC(TUid aServiceUid, const CSvexInfoBase& aInfo)
{
CSvexServiceAppListView* self = new(ELeave) CSvexServiceAppListView(aServiceUid, aInfo);
CleanupStack::PushL(self);
self->ConstructMainPaneL();
return self;
}
EXPORT_C CSvexServiceAppListView::CSvexServiceAppListView(TUid aServiceUid, const CSvexInfoBase& aInfo)
: iServiceUid(aServiceUid), iInfo(aInfo)
{
}
EXPORT_C CSvexServiceAppListView::~CSvexServiceAppListView()
{
delete iService;
}
EXPORT_C CEikTextListBox* CSvexServiceAppListView::NewListBoxL() const
{
return new (ELeave) CAknSingleStyleListBox();
}
EXPORT_C TInt CSvexServiceAppListView::Count() const
{
return iService->MsasiCount();
}
EXPORT_C void CSvexServiceAppListView::GetText(TInt aIndex, TBuf<KMaxListText>& aText) const
{
// Use the app's caption as the list text
TSvexAppServiceInfo info = iService->MsasiAt(aIndex);
_LIT(KFormat, "\t%S\t\t");
// Get the caption from apparc
TApaAppCaption caption(iInfo.AppCaption(info.iAppUid));
aText.Format(KFormat, &caption);
}
EXPORT_C void CSvexServiceAppListView::ConstructMainPaneL()
{
// Get the apps list for a service directly from apparc
iService = iInfo.DirectServiceInfoLC(iServiceUid);
CleanupStack::Pop();
CSvexListView::ConstructMainPaneL();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -