phonebookui/Phonebook2/ccapplication/ccamycardplugin/inc/ccappmycardlistboxrow.h
branchRCL_3
changeset 21 b3431bff8c19
parent 15 e8e3147d53eb
child 23 5586b4d2ec3e
equal deleted inserted replaced
15:e8e3147d53eb 21:b3431bff8c19
     1 /*
       
     2 * Copyright (c) 2009 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:  Listbox model row for MyCard details list
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CCAPPMYCARDLISTBOXROW_H
       
    19 #define CCAPPMYCARDLISTBOXROW_H
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 
       
    24 /**
       
    25  * MyCard view list box model row.
       
    26  *
       
    27  */
       
    28 class CCCAppMyCardListBoxRow : public CBase
       
    29 {
       
    30 public: // Constructors and destructor
       
    31 
       
    32     /**
       
    33      * Creates a new instance of this class.
       
    34      *
       
    35      * @return  A new instance of this class.
       
    36      */
       
    37     static CCCAppMyCardListBoxRow* NewL();
       
    38 
       
    39     /**
       
    40      * Destructor.
       
    41      */
       
    42     ~CCCAppMyCardListBoxRow();
       
    43 
       
    44 public: // Interface
       
    45 
       
    46     /**
       
    47      * Returns the number of columns in this row.
       
    48      *
       
    49      * @return  Number of columns in this row.
       
    50      */
       
    51     TInt ColumnCount() const;
       
    52 
       
    53     /**
       
    54      * Returns the descriptor at the given position.
       
    55      *
       
    56      * @param aColumnIndex  Column index.
       
    57      * @return  The descriptor at the given index.
       
    58      */
       
    59     TPtrC At(TInt aColumnIndex) const;
       
    60 
       
    61     /**
       
    62      * Appends a given column to the row.
       
    63      *
       
    64      * @param aColumnText   Column to append.
       
    65      */
       
    66     void AppendColumnL(const TDesC& aColumnText);
       
    67 
       
    68     /**
       
    69      * Is clip required.
       
    70      */
       
    71     TBool IsClipRequired() const;
       
    72 
       
    73     /**
       
    74      * Clip text from beginning if field is numeric field or e-mail field.
       
    75      */
       
    76     void SetClipRequired(TBool aFlag);
       
    77 
       
    78     /**
       
    79      * Returns the total descriptor length of all the columns.
       
    80      *
       
    81      * @return  Total row length.
       
    82      */
       
    83     TInt TotalLength() const;
       
    84 
       
    85     /**
       
    86      * Returns the maximum column length of this row.
       
    87      *
       
    88      * @return  Maximum column length.
       
    89      */
       
    90     TInt MaxColumnLength() const;
       
    91 
       
    92 private: // Implementation
       
    93 
       
    94     CCCAppMyCardListBoxRow();
       
    95 
       
    96 private: // Data
       
    97 
       
    98     /// Own: Column array
       
    99     RPointerArray<HBufC> iColumns;
       
   100 
       
   101     /// Is clip required.
       
   102     TBool iClipBeginning;
       
   103 };
       
   104 
       
   105 #endif //CCAPPMYCARDLISTBOXROW_H
       
   106 
       
   107 // End of file