qcpix/src/qcpixdocumentfield.cpp
changeset 13 fcb2a58c181b
parent 11 7c6f43cd91cf
child 14 8bd192d47aaa
equal deleted inserted replaced
11:7c6f43cd91cf 13:fcb2a58c181b
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: 
       
    15 *
       
    16 */
       
    17 
       
    18 #include <qcpixdocumentfield.h>
       
    19 #include "qcpixdocumentfieldprivate.h"
       
    20 
       
    21 /**
       
    22  * Note: Code in this file should never throw OR leak symbian exceptions.
       
    23  * Convert all leaves to C++ exceptions.
       
    24  */
       
    25 
       
    26 QCPixDocumentField::QCPixDocumentField( const QString aName, const QString aValue, const int aConfig )
       
    27     :iPvtImpl( new QCPixDocumentFieldPrivate(aName,aValue,aConfig) )
       
    28     {
       
    29     }
       
    30 
       
    31 QCPixDocumentField* QCPixDocumentField::newInstance( const QString aName, const QString aValue, const int aConfig )
       
    32     {
       
    33     QCPixDocumentField* field = NULL;
       
    34     try{
       
    35         field = new QCPixDocumentField( aName, aValue, aConfig );
       
    36     }
       
    37     catch(...){
       
    38         delete field;
       
    39         return NULL;
       
    40     }
       
    41     return field;
       
    42     }
       
    43 
       
    44 QCPixDocumentField::~QCPixDocumentField()
       
    45     {
       
    46     delete iPvtImpl;
       
    47     }
       
    48 
       
    49 QString QCPixDocumentField::name() const
       
    50     {
       
    51     return iPvtImpl->iName;
       
    52     }
       
    53 
       
    54 QString QCPixDocumentField::value() const
       
    55     {
       
    56     return iPvtImpl->iValue;
       
    57     }
       
    58 
       
    59 int QCPixDocumentField::config() const
       
    60     {
       
    61     return iPvtImpl->iConfig;
       
    62     }
       
    63     
       
    64 void QCPixDocumentField::setName(const QString aName)
       
    65     {
       
    66     iPvtImpl->iName = aName;
       
    67     }
       
    68 
       
    69 void QCPixDocumentField::setValue(const QString aValue)
       
    70     {
       
    71     iPvtImpl->iValue = aValue;
       
    72     }
       
    73 
       
    74 void QCPixDocumentField::setConfig(const int aConfig)
       
    75     {
       
    76     iPvtImpl->iConfig = aConfig;
       
    77     }
       
    78 
       
    79 //End of File