phoneuis/vmbx/inc/VmDetailsDialog.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Details dialog for last message.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CVMDETAILSDIALOG_H
       
    20 #define CVMDETAILSDIALOG_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <AknDialog.h>
       
    24 #include <centralrepository.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CPNGNumberGrouping;
       
    28 class CVmDetDlgPropertyObserver;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  Details dialog for last message.
       
    34 *
       
    35 *  Usage:
       
    36 *  CVmDetailsDialog* dlg = CVmDetailsDialog::NewL();
       
    37 *  dlg->ExecuteLD( R_VMBX_DETAIL_DIALOG );
       
    38 *
       
    39 *  @lib 
       
    40 *  @since 2.7
       
    41 */
       
    42 class CVmDetailsDialog : public CAknDialog
       
    43     {
       
    44     public:  // Constructors and destructor
       
    45         
       
    46         /**
       
    47         * Two-phased constructor.
       
    48         */
       
    49         static CVmDetailsDialog* NewL();
       
    50         
       
    51         /**
       
    52         * Destructor.
       
    53         */
       
    54         virtual ~CVmDetailsDialog();
       
    55         
       
    56         // Called when the key value is changed.
       
    57         void HandlePropertyNotificationEventL( const TDesC& aValue );
       
    58                 
       
    59     protected:  // New functions
       
    60         
       
    61         /**
       
    62         * Creates the listbox items
       
    63         * @param aItemArray Array to fill.
       
    64         */
       
    65         void PopulateListboxItemsL( CDesCArray& aItemArray );
       
    66 
       
    67         /**
       
    68         * Adds text line to the listbox.
       
    69         * @param aItemArray Array to append onto.
       
    70         * @param aHeading Text for the first (heading) column.
       
    71         * @param aData Text for the second (body/data) column.
       
    72         * @param aItemTextRect list box rectangle where the text is drawn
       
    73         * @param aUseMultipleLines ETrue if the text is wrapped into several
       
    74         *                                lines (if needed) in the listbox.
       
    75         *                          EFalse if the text is truncated into one
       
    76         *                                 line in the listbox (default).
       
    77         */
       
    78         static void AppendLineL( 
       
    79                         CDesCArray& aItemArray, 
       
    80                         const TDesC& aHeading, 
       
    81                         const TDesC& aData, 
       
    82                         TRect aItemTextRect,
       
    83                         TBool aUseMultipleLines = EFalse );
       
    84 
       
    85         /**
       
    86         * Sets the old title pane text.
       
    87         */
       
    88         void SetOldTitleL();
       
    89 
       
    90         /**
       
    91         * Format date string to UI style. Initial format must 
       
    92         * be DD/MM/YYYY. If not, this leaves with KErrCorrupt.
       
    93         * @param aDateString String to be modified.
       
    94         */
       
    95         static void FormatDateStringL( TDes& aDateString );
       
    96 
       
    97         /**
       
    98         * Format time string to UI style. Initial format must 
       
    99         * be HH:MM:SS. If not, this leaves with KErrCorrupt.
       
   100         * @param aTimeString String to be modified.
       
   101         */
       
   102         static void FormatTimeStringL( TDes& aTimeString );
       
   103 
       
   104 
       
   105     protected:  // Functions from CAknDialog
       
   106         
       
   107         /**
       
   108         * Called after the dialog is constructed and before it is launched.
       
   109         */
       
   110         void PreLayoutDynInitL();
       
   111 
       
   112         /**
       
   113         * Called when a key is pressed.
       
   114         */
       
   115         TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,
       
   116                                                      TEventCode aType );
       
   117 
       
   118         /**
       
   119         * Called when a softkey is pressed.
       
   120         */
       
   121         TBool OkToExitL( TInt aButtonId );
       
   122 
       
   123     private:
       
   124 
       
   125         /**
       
   126         * C++ default constructor.
       
   127         */
       
   128         CVmDetailsDialog();
       
   129 
       
   130         /**
       
   131         * By default Symbian 2nd phase constructor is private.
       
   132         */
       
   133         void ConstructL();
       
   134 
       
   135     private:    // Data
       
   136         // Old title pane text
       
   137         HBufC* iOldTitlePaneText;
       
   138 
       
   139         // Central Repository
       
   140         CRepository* iSession;
       
   141 
       
   142         // Does the number grouping.
       
   143         CPNGNumberGrouping* iNumberGrouping;
       
   144         
       
   145         // Observer class        
       
   146         CVmDetDlgPropertyObserver* iObserver;
       
   147     
       
   148         // Starts observing for key value changes.
       
   149         void StartObservingL();
       
   150     };
       
   151 
       
   152 #endif      // CVMDETAILSDIALOG_H   
       
   153             
       
   154 // End of File