phonebookui/pbkcommonui/src/cntcontactcarddataitem.cpp
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Thu, 02 Sep 2010 20:16:15 +0300
changeset 65 ae724a111993
parent 37 fd64c38c277d
permissions -rw-r--r--
Revision: 201033 Kit: 201035

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description:
*
*/

#include "cntcontactcarddataitem.h"

CntContactCardDataItem::CntContactCardDataItem(const QString& aTitle, int aPosition, bool aIsFocusable) :
    mIcon(HbIcon()),
    mSecondaryIcon(HbIcon()),
    mTitle(aTitle),
    mValueText(QString("")),
    mAction(QString("")),
    mActionDescriptor(QContactActionDescriptor()),
    mValueTextElideMode(Qt::ElideRight),
    mIsFocusable(aIsFocusable),
    mExtension(NULL),
    mExtensionActionIndex(0),
    mPosition(aPosition)
{
    
}

CntContactCardDataItem::~CntContactCardDataItem()
{

}

void CntContactCardDataItem::setTitleText(const QString& aTitle)
{
    mTitle = aTitle;
}

void CntContactCardDataItem::setValueText(
    const QString& aValueText,
    Qt::TextElideMode aValueTextElideMode)
{
    mValueText = aValueText;
    mValueTextElideMode = aValueTextElideMode;
}

void CntContactCardDataItem::setIcon(HbIcon aIcon)
{
    mIcon = aIcon;
}

void CntContactCardDataItem::setSecondaryIcon(HbIcon aSecondaryIcon)
{
    mSecondaryIcon = aSecondaryIcon;
}

void CntContactCardDataItem::setAction(const QString& aAction)
{
    mAction = aAction;
}

void CntContactCardDataItem::setContactDetail(QContactDetail aDetail)
{
    mDetail = aDetail;
}

void CntContactCardDataItem::setActionDescriptor(const QContactActionDescriptor& aActionDescriptor)
{
    mActionDescriptor = aActionDescriptor;
}

void CntContactCardDataItem::setLongPressText(const QString& aLongPressText)
{
    mLongPressText = aLongPressText;
}

void CntContactCardDataItem::setContactCardExtensionAndActionIndex( CntUiContactCardExtension& aExtension, int aIndex )
{
    mExtension = &aExtension;
    mExtensionActionIndex = aIndex;
}