Symbian CAknSettingItemList使用心得
2010-09-06 08:11:00 来源:WEB开发网5, Slider setting item中,显示当前值而不显示滑动条的方法:
class CExtendedSliderSettingItem : public CAknSliderSettingItem
{
public:
const TDesC& SettingTextL()
{
LoadL();
iData.Format(_L("Current valud: %d"), InternalSliderValue());
return iData;
}
CFbsBitmap* CreateBitmapL()
{
return NULL;
}
private:
TBuf<128> iData;
};
6, 动态设置CAknEnumeratedTextPopupSettingItem的内容
在CAknEnumeratedTextPopupSettingItem继承类的EditItemL中,
virtual void EditItemL(TBool bCalledFromMenu)
{
CAknEnumeratedText* enumeratedText = NULL;
CArrayPtr
HBufC* selectionText = _L("Selection1").AllocLC();
enumeratedText = new ( ELeave) CAknEnumeratedText(0, selectionText);
CleanupStack::PushL( enumeratedText);
enumeratedTextArray->AppendL( enumeratedText);
HandleTextArrayUpdateL();
CAknEnumeratedTextPopupSettingItem::EditItemL(bCalledFromMenu));
}
7, 监控Setting page关闭时点击的是OK还是Cancel:
void HandleSettingPageEventL(CAknSettingPage *aSettingPage, TAknSettingPageEvent aEventType)
{
if(aEventType == MAknSettingPageObserver::EEventSettingChanged)
{
//Setting is changed
}
else if(aEventType == MAknSettingPageObserver::EEventSettingOked)
{
//OK button is changed
}
else if(aEventType == MAknSettingPageObserver::EEventSettingCancelled)
{
//Cancel button is changed
}
UpdateListBoxTextL();
}
Tags:Symbian CAknSettingItemList 使用
编辑录入:coldstar [复制链接] [打 印]更多精彩
赞助商链接