cbs/cbsui/UiInc/CCbsUiEditTopicDlg.h
changeset 0 ff3b6d0fd310
equal deleted inserted replaced
-1:000000000000 0:ff3b6d0fd310
       
     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:  Header file for the CCbsUiEditTopicDlg class.
       
    15 *
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __CBS_UI_TOPIC_QUERY_H
       
    21 #define __CBS_UI_TOPIC_QUERY_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <AknQueryDialog.h>  // CAknMultiLineDataQueryDialog
       
    25 
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CCbsUiTopicListView;
       
    29 
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 * Class CCbsUiEditTopicDlg implements a dialog for 
       
    35 * Edit and Add topics.
       
    36 */
       
    37 class CCbsUiEditTopicDlg : public CAknMultiLineDataQueryDialog
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40         
       
    41         /** 
       
    42         * Two-phased constructor.
       
    43         *
       
    44         * @param aDataText topic name
       
    45         * @param aDataText2 topic number
       
    46         * @param aTopicListView for adding a topic
       
    47         * @param aType EFalse is Edit and ETrue is Add query
       
    48         */
       
    49         static CCbsUiEditTopicDlg* NewL(            
       
    50                     TDes& aDataText,
       
    51                     TDes& aDataText2,
       
    52                     CCbsUiTopicListView& aTopicListView,
       
    53                     TBool aType);
       
    54         
       
    55         /**
       
    56         * Destructor.
       
    57         */
       
    58         virtual ~CCbsUiEditTopicDlg();
       
    59    
       
    60     public: // From CAknNoteDialog
       
    61        
       
    62         /**
       
    63         * Adds or over writes topic. On error shows a error note.
       
    64         *
       
    65         * @param aButtonId button which has been selected
       
    66         */
       
    67         TBool OkToExitL( TInt aButtonId );
       
    68 
       
    69         // From CeikDialog
       
    70         /**
       
    71         * Handles changes required when switching to a specified line.
       
    72         *
       
    73         * @param aControlId The Id of the control being switched to.
       
    74         */
       
    75         void LineChangedL( TInt aControlId );
       
    76 
       
    77         /**
       
    78         * Handles a change to the control's resources.
       
    79         * @param aType A message UID value.
       
    80         */
       
    81         void HandleResourceChange( TInt aType );
       
    82 
       
    83 
       
    84 	protected: // From CAknMultiLineDataQueryDialog
       
    85 
       
    86         /**
       
    87         * Changes left soft key to visible if number line is valid
       
    88         */
       
    89 	    void UpdateLeftSoftKeyL();
       
    90 
       
    91     private: // New functions
       
    92 
       
    93         /**
       
    94         * Sets cursor in the end of number line.
       
    95         */
       
    96         void SetCursorAndFocusL();
       
    97 
       
    98     private: 
       
    99 
       
   100         /**
       
   101         * C++ constructor.
       
   102         *
       
   103         * @param aTopicListView for adding a topic
       
   104         * @param aType EFalse is Edit and ETrue is Add query
       
   105         */
       
   106         CCbsUiEditTopicDlg(
       
   107             CCbsUiTopicListView& aTopicListView,
       
   108             TBool aType );
       
   109 
       
   110         /**
       
   111         * Symbian OS constructor
       
   112         *
       
   113         * @param aDataText topic name
       
   114         * @param aDataText2 topic number
       
   115         */
       
   116         void ConstructL( TDes& aDataText, TDes& aDataText2 );
       
   117 
       
   118     private: // Data
       
   119 
       
   120         // to add or change a topic
       
   121         CCbsUiTopicListView& iTopicListView;
       
   122 
       
   123         // EFalse is Edit query and ETrue is Add query
       
   124         const TBool iType;
       
   125 
       
   126         // iUpdateLeftSoftKeyFirstTime is used when update first time Left soft key method.
       
   127         TBool iUpdateLeftSoftKeyFirstTime; 
       
   128 
       
   129     };
       
   130 
       
   131 #endif      // __CBS_UI_TOPIC_QUERY_H
       
   132             
       
   133 // End of File