亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? listview2.cpp

?? symbian c++ 源代碼。各種listbox的代碼
?? CPP
?? 第 1 頁(yè) / 共 3 頁(yè)
字號(hào):
//
// ListView2.cpp - Simple list view example
//
// Copyright (C) UIQ Technology AB, 2007
//
// This material is provided "as is" without any warranty to its performance or functionality. 
// In no event shall UIQ Technology be liable for any damages whatsoever arising out of the
// use or inabilty to use this material. 
//

#include "ListView2.h"
#include "ListView2.hrh"
#include <ListView2.rsg>
#include <ListView2.mbg>

#include <QikMultiPageViewBase.h>
#include <QikCommand.h>
#include <QikListBoxModel.h>
#include <QikListBox.h>
#include <MQikListBoxData.h>
#include <QikContent.h>
#include <QikZoomDlg.h>
#include <eikstart.h>

//////////////////////////////////////////////////////////////////////////////
// The application Uid here MUST match UID3 defined in the MMP file 
// This is a development UID and must NOT be used in production type software
const TUid KAppSpecificUid={0xEDEAD002};

// internal secondary view id, must be unique amongst this applications views
const TUid KUidListView={0x00000001};

// views within applications are fully identified by the app Uid and secondary view id
#define KViewIdListView TVwsViewId(KAppSpecificUid,KUidListView)

_LIT(KMbmFile,"*"); // '*' is a shortcut to reference this app specific mbm (true for all apps)

//////////////////////////////////////////////////////////////////////////////////

const TInt KMaxListItemText=32;	// we support a max of 32 chars for each text item to be displayed

class CAppEngine : public CBase
	{
protected:

public:
	CAppEngine(const TInt aZoomLevel);

	TInt ListViewZoomState() const;
	TBool SetListViewZoomState(const TInt aZoomLevel);
protected:
	// The 'engine' stores 'UI' information since UI components come and go, yet we want to preserve
	// UI configuration information between invocations of the view.
	TInt iZoomLevel;
	};

CAppEngine::CAppEngine(const TInt aZoomLevel) : 
	iZoomLevel(aZoomLevel)
	{}

TInt CAppEngine::ListViewZoomState() const
// Report the currently stored zoom state
	{
	return(iZoomLevel);
	}

TBool CAppEngine::SetListViewZoomState(const TInt aZoomLevel)
//
// Update list view zoom state. 
// Return TRUE if zoom state set is different to current level
//
	{
	if (aZoomLevel==iZoomLevel)
		return(EFalse);
	iZoomLevel=aZoomLevel;
	return(ETrue);
	}

//////////////////////////////////////////////////////////////////////////////////
class CAppSpecificListView : public CQikMultiPageViewBase, public MQikListBoxObserver
	{
protected: 
	// from CQikMultiPageViewBase
	TVwsViewId ViewId() const;
	void HandleCommandL(CQikCommand& aCommand);
	void ViewConstructL();
	void ViewDeactivated();
	void ViewActivatedL(const TVwsViewId& aPrevViewId,const TUid aCustomMessageId,const TDesC8& aCustomMessage);
	void TabActivatedL(TInt aTabId);
	
	// from MQikListBoxObserver
	void HandleListBoxEventL(CQikListBox* aListBox,TQikListBoxEvent aEventType,TInt aItemIndex,TInt aSlotId);

	// new methods
	void AddItemsToList1L();
	void AddItemsToList2L();
	void AddItemsToList3L();
	void AddItemsToList4L();
	void AddItemsToList5L();
	void AddItemsToList6L();
	void AddItemsToList7L();
	void AddItemsToList8L();
	void AddItemsToList9L();
	void AddItemsToList10L();
	void AddItemsToList11L();
	void AddItemsToList12L();
public:
	// new methods
	CAppSpecificListView(CAppSpecificUi& aAppUi,CAppEngine* aEngine);
	
protected:
	CAppEngine* iEngine;
	};

CAppSpecificListView::CAppSpecificListView(CAppSpecificUi& aAppUi,CAppEngine* aEngine) :
	CQikMultiPageViewBase(aAppUi,KNullViewId),iEngine(aEngine)
	{
	}

TVwsViewId CAppSpecificListView::ViewId() const
//
// All views are uniquely identified within the entire system. A TVwsViewId consists of 
// the application uid (uid3) and app specific view uid
//
	{
	return(KViewIdListView);
	}

void CAppSpecificListView::HandleCommandL(CQikCommand& aCommand)
//
// Handle the commands coming in from the controls that can deliver cmds..
//
	{
	switch (aCommand.Id())
		{
	case EAppCmdZoom:	// Launch the system std zoom dialog
		CQikZoomDialog::RunDlgLD(iEngine->ListViewZoomState(),*this);
		break;

	case EQikCmdZoomLevel1:	// delivered by the std system zoom dlg...
	case EQikCmdZoomLevel2:
	case EQikCmdZoomLevel3:
		if (iEngine->SetListViewZoomState(aCommand.Id()))
			{ // zoom state has changed 
			CQikMultiPageViewBase::SetZoomFactorL(CQikAppUi::ZoomFactorL(aCommand.Id(),*iEikonEnv));	
			PerformLayout();
			}
		break;

	default: // e.g. the back button...
		CQikViewBase::HandleCommandL(aCommand);
		break;
		}
	}

void CAppSpecificListView::HandleListBoxEventL(
//
// List box event occured - its reporting back what that might be.
//
	CQikListBox* aListBox,
	TQikListBoxEvent aEventType,
	TInt aItemIndex,
	TInt aSlotId)
	{
	switch (aEventType)
		{
	case EEventItemConfirmed:
	case EEventItemTapped:
		{
		// Some code showing that you can use the ActivePageId() to deterime what page is 
		// currently selected if required by your application.
		CQikListBox* listbox=NULL;
		switch (ActivePageId())
			{
		case EAppSpecificListViewPageId1:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId1);
			break;
		case EAppSpecificListViewPageId2:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId2);
			break;
		case EAppSpecificListViewPageId3:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId3);
			break;
		case EAppSpecificListViewPageId4:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId4);
			break;
		case EAppSpecificListViewPageId5:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId5);
			break;
		case EAppSpecificListViewPageId6:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId6);
			break;
		case EAppSpecificListViewPageId7:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId7);
			break;
		case EAppSpecificListViewPageId8:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId8);
			break;
		case EAppSpecificListViewPageId9:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId9);
			break;
		case EAppSpecificListViewPageId10:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId10);
			break;
		case EAppSpecificListViewPageId11:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId11);
			break;
		case EAppSpecificListViewPageId12:
			listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId12);
			break;
		default:
			break;
			}
		if (aListBox!=listbox)		
			{
			_LIT(KListboxesDiffer,"Listboxes not as expected");
			iEikonEnv->InfoMsg(KListboxesDiffer);
			break;
			}

		// instead of obtaining the information to display from extracting item ids as we
		// did in ListView1 we can obtain information directly from the listbox..

		// you may wish to note there are slightly different UI behaviours with the different
		// listbox types. E.g. those that display 2 lines for the highlighted entry DO NOT
		// report EEventItemTapped when the highlight is move to those items. They only 
		// report EEventItemTapped when the highlighted item is selected. By comparison the
		// single list boxes report EEventItemTapped when highlight is moved.
		MQikListBoxData* lbData=aListBox->Model().RetrieveDataL(aItemIndex);
		CleanupClosePushL(*lbData); // its retrieved in an 'Open' state
		iEikonEnv->InfoMsg(lbData->Text(EQikListBoxSlotText1));
		CleanupStack::PopAndDestroy(lbData);
		break;
		}
	default:
		break;
		}
	}

const TInt KListView2Items=7;
void CAppSpecificListView::AddItemsToList1L()
//
// We are a single line list box. Add each of the items to the listbox for display
//
	{
	CQikListBox* listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId1);
	MQikListBoxModel& model(listbox->Model());
	model.ModelBeginUpdateLC();
	TBuf<KMaxListItemText>bb;
	for (TInt i=0;i<KListView2Items;i++)
		{
		MQikListBoxData* lbData=model.NewDataL(MQikListBoxModel::EDataNormal);
		CleanupClosePushL(*lbData); // alternativly use NewDataLC() to save this line of code
		iEikonEnv->ReadResourceL(bb,R_STR_LIST_CONTENT_1+i);
		lbData->AddTextL(bb,EQikListBoxSlotText1);
		CleanupStack::PopAndDestroy(lbData);

		// add some listbox row separators - first has a caption, second is plain line separator. 
		if (i==0)
			{	// Add a captioned separator between our 1st and 2nd entries
		    lbData=model.NewDataLC(MQikListBoxModel::EDataSeparator);
			iEikonEnv->ReadResourceL(bb,R_STR_LIST_SEPARATOR_1);
		    lbData->AddTextL(bb,MQikListBoxData::EDefaultSlot);
		    CleanupStack::PopAndDestroy(lbData);
			}
		if (i==3)
			{	// Add a separator with no caption between our 4th and 5th entries
		    lbData=model.NewDataLC(MQikListBoxModel::EDataSeparator);
		    CleanupStack::PopAndDestroy(lbData);
			}

		}
	model.ModelEndUpdateL();
	}

void CAppSpecificListView::AddItemsToList2L()
//
// The highlighted entry is displayed as a two line list box entry. 
//	standard_normal_layout = EQikListBoxLineIcon;
//	standard_highlight_layout = EQikListBoxTwoLines;
//
	{
	CQikListBox* listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId2);
	MQikListBoxModel& model(listbox->Model());
	model.ModelBeginUpdateLC();
	TBuf<KMaxListItemText>bb;
	for (TInt i=0;i<KListView2Items;i++)
		{
		MQikListBoxData* lbData=model.NewDataL(MQikListBoxModel::EDataNormal);
		CleanupClosePushL(*lbData);

		// This listbox has 2 slots, the second is only displayed when the current item
		// is highlighted.
		iEikonEnv->ReadResourceL(bb,R_STR_LIST_CONTENT_1+i);
		lbData->AddTextL(bb,EQikListBoxSlotText1);

		// we have an icon to right of the single line of text
		CQikContent* icon=CQikContent::NewL(NULL,KMbmFile,EMbmListview2Icon0,EMbmListview2Icon0mask);
		CleanupStack::PushL(icon);
		lbData->AddIconL(icon,EQikListBoxSlotRightSmallIcon1);
		CleanupStack::Pop(icon); // since lbData now taken ownership

		// displayed in highlighted item
		iEikonEnv->ReadResourceL(bb,R_STR_LIST_DETAILS_1+i);
		lbData->AddTextL(bb,EQikListBoxSlotText2);

		// entries within a list box can be given a 32-bit id. This enables listbox entries
		// to maintain a link with any underlying data structure. We dont happen to have such
		// a structure in this example, however more often than not an application will. So
		// whilst SetItemId() is not strictly necessary in this app, its left here with this comment
		lbData->SetItemId(i);

		CleanupStack::PopAndDestroy(lbData);
		}
	model.ModelEndUpdateL();
	}


void CAppSpecificListView::AddItemsToList3L()
//
// We are a small icon to left list box.
// The highlighted entry is displayed as a two line list box entry with large icon. 
//	standard_normal_layout = EQikListBoxIconLine;
//	standard_highlight_layout = EQikListBoxMediumIconTwoLines;
//
	{
	CQikListBox* listbox=LocateControlByUniqueHandle<CQikListBox>(EAppSpecificListViewListId3);
	MQikListBoxModel& model(listbox->Model());
	model.ModelBeginUpdateLC();
	TBuf<KMaxListItemText>bb;
	for (TInt i=0;i<KListView2Items;i++)
		{
		MQikListBoxData* lbData=model.NewDataL(MQikListBoxModel::EDataNormal);
		CleanupClosePushL(*lbData);

		// This listbox has 2 slots, the second is only displayed when the current item
		// is highlighted. Also has Icon to the left.
		iEikonEnv->ReadResourceL(bb,R_STR_LIST_CONTENT_1+i);
		lbData->AddTextL(bb,EQikListBoxSlotText1);
		iEikonEnv->ReadResourceL(bb,R_STR_LIST_DETAILS_1+i);
		lbData->AddTextL(bb,EQikListBoxSlotText2);

		// Creates a CQikContent that loads the CFbsBitmap from our mbm file and set the
		// listbox slot for small icons with the loaded image. 
		// In general apps will do something more intelligent about assigning images to 
		// rows in the list box than what row they are in. For the purposes of the example
		// we dont.
		CQikContent* icon=NULL;
		switch (i)
			{
		case 0:
			icon=CQikContent::NewL(NULL,KMbmFile,EMbmListview2Icon0,EMbmListview2Icon0mask);
			break;
		case 1:
		case 5:
			icon=CQikContent::NewL(NULL,KMbmFile,EMbmListview2Icon1,EMbmListview2Icon1mask);
			break;
		case 2:
		case 6:
			icon=CQikContent::NewL(NULL,KMbmFile,EMbmListview2Icon2,EMbmListview2Icon2mask);
			break;
		case 3:
			icon=CQikContent::NewL(NULL,KMbmFile,EMbmListview2Icon3,EMbmListview2Icon3mask);
			break;
		// the remaining items (case 4) dont have images... so show its entirely feasible
		// to have rows with no image.
		default:
			break;
			}
		if (icon)
			{
			CleanupStack::PushL(icon);
			lbData->AddIconL(icon,EQikListBoxSlotLeftSmallIcon1);
			CleanupStack::Pop(icon); // since lbData now taken ownership
			}

		// Now the medium icon
		// Note that combining the two switch statements requires us to change our current
		// object ownership/error handling strategy so we dont cause alloc heaven should
		// loading one icon fail.Whilst entirely feasible, we have chosen not to do that here.
		icon=NULL;
		switch (i)
			{
		case 0:
			icon=CQikContent::NewL(NULL,KMbmFile,EMbmListview2Largeicon0,EMbmListview2Largeicon0mask);
			break;

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费高清视频精品| 国产91在线|亚洲| 亚洲人成在线播放网站岛国| 久久网站最新地址| 欧美电影免费观看高清完整版 | 欧美精品乱码久久久久久按摩| 色天天综合久久久久综合片| 91啪亚洲精品| 亚洲综合视频在线| 国产精品久久久久婷婷| 欧美日韩国产小视频在线观看| 制服丝袜亚洲色图| 欧美片网站yy| 欧美精品乱码久久久久久| 欧美日韩一二区| 制服丝袜日韩国产| 日韩午夜中文字幕| 精品久久五月天| 国产亚洲一区二区三区四区| 国产亚洲精品超碰| 国产精品国产三级国产普通话99 | 一区二区三区四区国产精品| 亚洲欧美福利一区二区| 亚洲精品视频观看| 午夜影视日本亚洲欧洲精品| 日本成人中文字幕在线视频| 精品写真视频在线观看| 国产成人在线网站| 99久久免费精品高清特色大片| 91免费视频网址| 欧美日韩二区三区| 欧美精品一区二区三区蜜桃| 中文久久乱码一区二区| 亚洲精品美腿丝袜| 免费成人在线视频观看| 国产成人综合亚洲91猫咪| 91天堂素人约啪| 欧美二区三区91| 久久久国产一区二区三区四区小说| 国产日产欧美一区二区视频| 亚洲精品伦理在线| 免费观看91视频大全| 成人综合在线观看| 欧美老年两性高潮| 国产日韩欧美综合在线| 亚洲一区二区精品3399| 黄色资源网久久资源365| 97久久精品人人做人人爽| 欧美日本免费一区二区三区| 久久久精品人体av艺术| 一区二区在线观看视频| 毛片av中文字幕一区二区| gogo大胆日本视频一区| 91精品在线观看入口| 日本一区二区三级电影在线观看 | 中文字幕乱码日本亚洲一区二区| 一区二区三区在线影院| 美国一区二区三区在线播放| aaa亚洲精品一二三区| 日韩欧美精品三级| 一区二区三区四区在线免费观看| 老司机精品视频在线| 91丨porny丨首页| 欧美精品一区二区在线观看| 一区二区理论电影在线观看| 国产九九视频一区二区三区| 欧美亚洲一区二区在线观看| 国产亚洲精品aa午夜观看| 日韩中文字幕麻豆| 99re这里只有精品视频首页| 欧美成人精品福利| 亚洲福利视频三区| 97精品久久久久中文字幕| 欧美xfplay| 天堂午夜影视日韩欧美一区二区| 99久久综合99久久综合网站| 欧美精品一区二区在线观看| 三级在线观看一区二区 | 国产三级一区二区| 免费人成精品欧美精品| 91国偷自产一区二区使用方法| 国产欧美精品日韩区二区麻豆天美| 青青草伊人久久| 欧美曰成人黄网| 日韩美女视频一区| 国产精品白丝jk黑袜喷水| 欧美一区二区高清| 午夜电影网亚洲视频| 在线视频一区二区三| 国产精品萝li| 懂色av一区二区夜夜嗨| 精品国产乱码久久久久久图片| 午夜精品福利久久久| 欧美午夜精品一区二区蜜桃| 亚洲欧洲综合另类在线| 97se亚洲国产综合自在线 | 日本欧美在线观看| 欧美午夜精品久久久久久超碰| 亚洲欧美日韩国产另类专区| 91污在线观看| 亚洲视频免费观看| 一本色道久久综合精品竹菊| 自拍av一区二区三区| 92国产精品观看| 日韩美女久久久| 色综合色狠狠综合色| 亚洲精品五月天| 在线日韩国产精品| 亚洲一区在线观看免费 | 中文字幕av一区 二区| 国产99精品国产| 国产精品久久久一本精品 | 久久久久久久网| 国产成人在线网站| 国产精品国产馆在线真实露脸| 成人黄色小视频在线观看| 亚洲国产岛国毛片在线| eeuss鲁片一区二区三区在线观看| 国产精品黄色在线观看| 在线看国产一区| 婷婷一区二区三区| 精品久久国产字幕高潮| 风间由美一区二区av101| 国产精品嫩草久久久久| 一本久久精品一区二区| 亚洲成人中文在线| 日韩欧美激情一区| 风间由美一区二区三区在线观看 | 欧美videossexotv100| 黄网站免费久久| 国产精品久久久久久一区二区三区| av成人老司机| 亚洲成在人线免费| 亚洲精品在线三区| 成人午夜免费av| 亚洲一区二区三区四区五区黄| 这里只有精品99re| 国产成人免费9x9x人网站视频| 亚洲男人的天堂网| 欧美精品日韩综合在线| 国产乱对白刺激视频不卡| 亚洲另类在线一区| 欧美一卡二卡三卡| 成人免费视频视频在线观看免费 | 免费精品视频在线| 中文一区二区在线观看| 欧洲一区在线观看| 紧缚奴在线一区二区三区| 中文字幕亚洲视频| 91精品久久久久久蜜臀| 成人一区二区视频| 天堂影院一区二区| 欧美国产视频在线| 欧美精品黑人性xxxx| 不卡一区在线观看| 日韩中文字幕一区二区三区| 国产精品理伦片| 欧美电影免费观看高清完整版在线| 99久久99久久精品国产片果冻| 日韩avvvv在线播放| 亚洲欧洲www| 久久先锋影音av鲁色资源| 欧美性猛交一区二区三区精品| 国模一区二区三区白浆| 亚洲自拍偷拍麻豆| 国产精品免费aⅴ片在线观看| 欧美一级一区二区| 91蜜桃免费观看视频| 久久精品国产精品亚洲综合| 亚洲另类春色校园小说| 久久久91精品国产一区二区精品| 欧美精品xxxxbbbb| 91网站最新地址| 国产精品996| 免费欧美在线视频| 亚洲一区日韩精品中文字幕| 国产精品五月天| 久久综合九色综合久久久精品综合| 欧美在线影院一区二区| 国产iv一区二区三区| 另类专区欧美蜜桃臀第一页| 亚洲h在线观看| 亚洲欧美国产毛片在线| 亚洲国产成人在线| 久久久国产精品麻豆| 欧美一二三四在线| 欧美午夜理伦三级在线观看| 91丨porny丨最新| a美女胸又www黄视频久久| 国产麻豆一精品一av一免费| 蜜桃传媒麻豆第一区在线观看| 亚洲成人一区在线| 亚洲免费在线观看视频| 国产精品久久一级| 国产精品色在线| 国产欧美中文在线| 国产午夜三级一区二区三| 久久先锋影音av鲁色资源网| 精品精品国产高清一毛片一天堂| 制服丝袜亚洲色图|