ipsservices/ipssossettings/src/ipssetuiitemtext.cpp
changeset 0 8466d47a6819
equal deleted inserted replaced
-1:000000000000 0:8466d47a6819
       
     1 /*
       
     2 * Copyright (c) 2007 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: This file implements class CIpsSetUiItemsEditText.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #include "emailtrace.h"
       
    20 #include <e32base.h>
       
    21 
       
    22 #include "ipssetuiitemtext.h"
       
    23 #include "ipssetutilsconsts.h"
       
    24 #include "ipssetutilsexception.h"
       
    25 
       
    26 // ----------------------------------------------------------------------------
       
    27 // CIpsSetUiItemsEditText::CIpsSetUiItemsEditText()
       
    28 // ----------------------------------------------------------------------------
       
    29 CIpsSetUiItemsEditText::CIpsSetUiItemsEditText()
       
    30     :
       
    31     iUserText( NULL ),
       
    32     iItemMaxLength( KIpsSetUiMaxSettingsTextLength )
       
    33     {
       
    34     FUNC_LOG;
       
    35     }
       
    36 
       
    37 // ----------------------------------------------------------------------------
       
    38 // CIpsSetUiItemsEditText::ConstructL()
       
    39 // ----------------------------------------------------------------------------
       
    40 //
       
    41 void CIpsSetUiItemsEditText::ConstructL()
       
    42     {
       
    43     FUNC_LOG;
       
    44     CIpsSetUiItem::ConstructL();
       
    45     }
       
    46 
       
    47 // ----------------------------------------------------------------------------
       
    48 // CIpsSetUiItemsEditText::CIpsSetUiItemsEditText()
       
    49 // ----------------------------------------------------------------------------
       
    50 //
       
    51 CIpsSetUiItemsEditText::~CIpsSetUiItemsEditText()
       
    52     {
       
    53     FUNC_LOG;
       
    54     iUserText.Close();
       
    55     }
       
    56 
       
    57 // ----------------------------------------------------------------------------
       
    58 // CIpsSetUiItemsEditText::NewL()
       
    59 // ----------------------------------------------------------------------------
       
    60 //
       
    61 CIpsSetUiItemsEditText* CIpsSetUiItemsEditText::NewL()
       
    62     {
       
    63     FUNC_LOG;
       
    64     CIpsSetUiItemsEditText* self = NewLC();
       
    65     CleanupStack::Pop( self );
       
    66 
       
    67     return self;
       
    68     }
       
    69 
       
    70 // ----------------------------------------------------------------------------
       
    71 // CIpsSetUiItemsEditText::NewLC()
       
    72 // ----------------------------------------------------------------------------
       
    73 //
       
    74 CIpsSetUiItemsEditText* CIpsSetUiItemsEditText::NewLC()
       
    75     {
       
    76     FUNC_LOG;
       
    77     CIpsSetUiItemsEditText* self =
       
    78         new ( ELeave ) CIpsSetUiItemsEditText();
       
    79     CleanupStack::PushL( self );
       
    80     self->ConstructL();
       
    81 
       
    82     return self;
       
    83     }
       
    84 
       
    85 // ----------------------------------------------------------------------------
       
    86 // CIpsSetUiItemsEditText::operator=()
       
    87 // ----------------------------------------------------------------------------
       
    88 //
       
    89 CIpsSetUiItemsEditText& CIpsSetUiItemsEditText::operator=(
       
    90     const CIpsSetUiItemsEditText& aBaseItem )
       
    91     {
       
    92     FUNC_LOG;
       
    93     IPS_ASSERT_DEBUG( iItemLabel, ENullPointer, EItemText );
       
    94     IPS_ASSERT_DEBUG( aBaseItem.iItemLabel, ENullPointerInParam, EItemText );
       
    95     IPS_ASSERT_DEBUG( iUserText, ENullPointer, EItemText );
       
    96     IPS_ASSERT_DEBUG( aBaseItem.iUserText, ENullPointerInParam, EItemText );
       
    97 
       
    98     iItemFlags = aBaseItem.iItemFlags;
       
    99     iItemType = aBaseItem.iItemType;
       
   100     iItemLabel->Copy( *aBaseItem.iItemLabel );
       
   101     iItemId = aBaseItem.iItemId;
       
   102     iItemResourceId = aBaseItem.iItemResourceId;
       
   103     iItemMaxLength = aBaseItem.iItemMaxLength;
       
   104     iUserText.Close();
       
   105     iUserText.Create( aBaseItem.iUserText );
       
   106 
       
   107     return *this;
       
   108     }
       
   109 
       
   110 // End of file
       
   111