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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? listview2.cpp

?? symbian c++ 源代碼。各種listbox的代碼
?? CPP
?? 第 1 頁 / 共 3 頁
字號:
//
// 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;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
2020国产精品| 欧美久久高跟鞋激| 成人黄色电影在线| 99免费精品在线观看| 成人动漫一区二区| 99综合电影在线视频| 99riav一区二区三区| 91福利在线导航| 91精品国产综合久久精品 | 亚洲精品日韩一| 欧美日韩一区二区三区在线| 99国产一区二区三精品乱码| 99久久精品久久久久久清纯| 色www精品视频在线观看| 欧洲精品视频在线观看| 日韩欧美激情一区| 欧美国产成人精品| 丝袜脚交一区二区| 国产一区二区三区| 欧美日韩在线播放三区| 日韩精品一区二区三区在线观看| 久久丝袜美腿综合| 性做久久久久久久免费看| 国产精品综合二区| 在线观看欧美黄色| 国产精品国产馆在线真实露脸| 夜夜精品视频一区二区| 久久99久国产精品黄毛片色诱| 国产尤物一区二区| 欧美亚洲图片小说| 精品国产免费人成电影在线观看四季 | 波多野结衣欧美| 91麻豆精品国产综合久久久久久| 日韩欧美国产综合在线一区二区三区| 日韩欧美卡一卡二| 一区二区三区电影在线播| 青青草精品视频| 日本久久一区二区| 中文字幕一区二区三区视频 | 亚洲一区二区欧美激情| 日韩电影免费一区| 国产精品69毛片高清亚洲| 久久久久久夜精品精品免费| 亚洲精品水蜜桃| 91偷拍与自偷拍精品| 国产色产综合产在线视频| 日日欢夜夜爽一区| 色呦呦日韩精品| 亚洲三级久久久| 成人av动漫网站| 国产精品全国免费观看高清 | 国产福利一区二区三区视频| 日韩你懂的在线播放| 亚洲精品乱码久久久久久黑人| 92国产精品观看| 亚洲乱码一区二区三区在线观看| 懂色av一区二区三区免费观看 | 国产午夜精品理论片a级大结局| 亚洲成人激情av| 91精品福利在线一区二区三区 | 国产偷v国产偷v亚洲高清| 日本视频在线一区| 一本色道综合亚洲| 日本在线观看不卡视频| 欧美一区二区视频免费观看| 日韩欧美国产精品| 亚洲精品网站在线观看| 97久久精品人人澡人人爽| 亚洲黄色小视频| 欧美视频一区二区三区四区 | 成人免费在线观看入口| 色婷婷综合五月| 亚洲综合色在线| 久久亚洲精品小早川怜子| 成人做爰69片免费看网站| 亚洲一区二区中文在线| 日韩欧美国产1| 日本高清免费不卡视频| 狠狠色丁香婷综合久久| 亚洲福利一二三区| 中文字幕欧美国产| 欧美一区二区三区视频免费播放| 国产高清一区日本| 久久不见久久见中文字幕免费| **欧美大码日韩| 91黄色免费看| 国产一区二区精品久久| 亚洲精品国产精华液| 国产欧美日韩在线| 久久影院电视剧免费观看| 国产成人av一区二区三区在线 | 91精品国产综合久久久久| 日韩在线一二三区| 国产精品亲子伦对白| 久久精品男人天堂av| 精品久久国产老人久久综合| 欧美一区二区久久久| 91精品综合久久久久久| 在线观看视频一区二区| 不卡高清视频专区| 91美女片黄在线| 日本二三区不卡| 欧美亚日韩国产aⅴ精品中极品| www.欧美.com| 欧美日韩电影在线播放| 欧美亚一区二区| 777亚洲妇女| 日韩一级片在线观看| 欧美精品一区二| 国产精品视频一区二区三区不卡| 久久精品一区八戒影视| 亚洲色大成网站www久久九九| 国产嫩草影院久久久久| 久久综合国产精品| 日韩伦理电影网| 亚洲天堂中文字幕| 美女尤物国产一区| 国产成人av电影在线播放| 国产麻豆午夜三级精品| 丁香桃色午夜亚洲一区二区三区 | 石原莉奈一区二区三区在线观看| 亚洲蜜臀av乱码久久精品| 国产精品三级久久久久三级| 亚洲视频狠狠干| 紧缚奴在线一区二区三区| 91丨porny丨蝌蚪视频| 精品国产一区久久| 亚洲精品中文在线| 国产乱一区二区| 欧美精品丝袜久久久中文字幕| 国产精品天美传媒沈樵| 午夜影院久久久| 欧美亚洲日本国产| 国产亚洲女人久久久久毛片| 国产欧美一区二区精品忘忧草 | 久久精品久久精品| 91视频国产资源| 久久综合国产精品| 精品一区二区三区免费毛片爱| 欧美日韩极品在线观看一区| 成人欧美一区二区三区小说| 床上的激情91.| 日韩一级完整毛片| 狠狠狠色丁香婷婷综合久久五月| 6080午夜不卡| 亚洲一区二区av电影| 91亚洲永久精品| 中文字幕中文字幕中文字幕亚洲无线| 精品制服美女丁香| 制服丝袜亚洲播放| 精品在线亚洲视频| 国产精品全国免费观看高清| 99精品欧美一区| 亚洲大片在线观看| 欧美高清hd18日本| 国产999精品久久久久久| 久久夜色精品国产欧美乱极品| 韩国v欧美v日本v亚洲v| 国产精品美女久久久久久久久| 激情综合色丁香一区二区| 国产午夜精品一区二区三区四区| 麻豆成人久久精品二区三区红 | 成人黄色a**站在线观看| 欧美日韩www| 日本aⅴ免费视频一区二区三区| 91色porny蝌蚪| 狠狠色丁香九九婷婷综合五月| 久久久精品人体av艺术| 色偷偷成人一区二区三区91 | 亚洲黄色av一区| 欧美tickling网站挠脚心| 色综合一个色综合| 六月丁香综合在线视频| 国产精品伦一区| 欧洲精品中文字幕| 国产综合色视频| 亚洲成av人片| 亚洲最大成人网4388xx| 欧美剧情电影在线观看完整版免费励志电影 | 亚洲成人tv网| 亚洲国产成人高清精品| 国产精品免费视频观看| 在线视频国内自拍亚洲视频| 国产电影精品久久禁18| 久久精品国产亚洲aⅴ | 五月天激情综合| 亚洲日本青草视频在线怡红院| 337p粉嫩大胆噜噜噜噜噜91av | 欧美色综合久久| 色哟哟一区二区三区| 激情图区综合网| 国产一区二区三区久久悠悠色av| 日韩极品在线观看| 美国毛片一区二区三区| 偷拍亚洲欧洲综合| 免费在线观看精品| 久久99热这里只有精品| 国产一区二区在线影院| 粉嫩一区二区三区在线看| 99在线视频精品|