📄 listview.cpp
字号:
/***************************************************************************/
/* */
/* ListView.cpp - Part of Open C FTP Client */
/* */
/* Copyright (C) 2007 Nokia Corporation */
/* */
/* Open C FTP Client is based on ftplib and qftp by Thomas Pfau. */
/* */
/* Copyright (C) 1996-2001 Thomas Pfau, pfau@eclipse.net */
/* 1407 Thomas Ave, North Brunswick, NJ, 08902 */
/* */
/* This program is free software; you can redistribute it and/or */
/* modify it under the terms of the GNU Library General Public */
/* License as published by the Free Software Foundation; either */
/* version 2 of the License, or (at your option) any later version. */
/* */
/* This program is distributed in the hope that it will be useful, */
/* but WITHOUT ANY WARRANTY; without even the implied warranty of */
/* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU */
/* Library General Public License for more details. */
/* */
/* You should have received a copy of the GNU Library General Public */
/* License along with this program; if not, write to the */
/* Free Software Foundation, Inc., 59 Temple Place - Suite 330, */
/* Boston, MA 02111-1307, USA. */
/* */
/***************************************************************************/
/*
* ============================================================================
* Name : ListView from ListView.cpp
* Part of : Open C FTP Client
* Created : 03/12/2007 by Forum Nokia
* Version : 1.0
* ============================================================================
*/
#include <aknviewappui.h>
#include <avkon.hrh>
#include <OpenCFTPClient.rsg>
#include "ListControl.h"
#include "ListView.h"
#include "OpenCFTPClient.hrh"
// ===========================================================
CListView* CListView::NewLC()
{
CListView* self = new (ELeave) CListView;
CleanupStack::PushL(self);
self->ConstructL();
return self;
}
// ===========================================================
CListView::CListView()
{
}
// ===========================================================
void CListView::ConstructL()
{
BaseConstructL( R_VIEW_FILELIST );
}
// ===========================================================
CListView::~CListView()
{
if ( iContainer )
{
AppUi()->RemoveFromStack( iContainer );
}
delete iContainer;
}
// ===========================================================
TUid CListView::Id() const
{
return KListViewId;
}
// ===========================================================
void CListView::HandleCommandL(TInt aCommand)
{
switch ( aCommand )
{
default:
{
AppUi()->HandleCommandL( aCommand );
break;
}
}
}
// ===========================================================
void CListView::DoActivateL(const TVwsViewId& aPrevViewId,TUid /*aCustomMessageId*/, const TDesC8& /*aCustomMessage*/)
{
iPrevious = aPrevViewId;
if (!iContainer)
{
iContainer = new (ELeave) CListControl(this);
iContainer->SetMopParent(this);
iContainer->ConstructL( ClientRect() );
AppUi()->AddToStackL( *this, iContainer );
}
}
// ===========================================================
void CListView::DoDeactivate()
{
if ( iContainer )
{
AppUi()->RemoveFromStack( iContainer );
}
delete iContainer;
iContainer = 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -