filemanager/View/inc/FileManagerDlgUtils.h
branchRCL_3
changeset 39 65326cf895ed
parent 0 6a9f87576119
equal deleted inserted replaced
38:491b3ed49290 39:65326cf895ed
       
     1 /*
       
     2 * Copyright (c) 2006-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:  Dialog utilities
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef FILEMANAGERVIEWUTILS_H
       
    21 #define FILEMANAGERVIEWUTILS_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 
       
    27 // CONSTANTS
       
    28 const TInt KIndexNotUsed = -1;
       
    29 
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class TFileManagerDriveInfo;
       
    33 class CFileManagerEngine;
       
    34 class CFileManagerItemProperties;
       
    35 class CFileManagerFeatureManager;
       
    36 
       
    37 
       
    38 // CLASS DECLARATION
       
    39 /**
       
    40  *  This class is used for static dialog utilities
       
    41  *
       
    42  *  @lib FileManagerView.lib
       
    43  *  @since S60 3.1
       
    44  */
       
    45 class FileManagerDlgUtils
       
    46     {
       
    47 
       
    48 public:
       
    49     /**
       
    50      * Shows one of many setting page
       
    51      *
       
    52      * @since S60 3.1
       
    53      * @param aTitleId Title text id
       
    54      * @param aTextArray Text array for available settings
       
    55      * @param aSelectedIndex For storing selected index
       
    56      * @return ETrue if selection made, otherwise EFalse
       
    57      */
       
    58     IMPORT_C static TBool ShowOOfMSettingQueryL(
       
    59         const TInt aTitleId,
       
    60         const MDesCArray* aTextArray,
       
    61         TInt& aSelectedIndex );
       
    62 
       
    63     /**
       
    64      * Shows one of many setting page
       
    65      *
       
    66      * @since S60 3.1
       
    67      * @param aTitleId Title text id
       
    68      * @param aTextIds Text id array for available settings
       
    69      * @param aSelectedIndex For storing selected index
       
    70      * @return ETrue if selection made, otherwise EFalse
       
    71      */
       
    72     IMPORT_C static TBool ShowOOfMSettingQueryL(
       
    73         const TInt aTitleId,
       
    74         const TInt aTextIds,
       
    75         TInt& aSelectedIndex );
       
    76 
       
    77     /**
       
    78      * Shows weekday selection setting page
       
    79      *
       
    80      * @since S60 3.1
       
    81      * @param aTitleId Title text id
       
    82      * @param aDay For storing selected weekday
       
    83      * @return ETrue if selection made, otherwise EFalse
       
    84      */
       
    85     IMPORT_C static TBool ShowWeekdayQueryL(
       
    86         const TInt aTitleId,
       
    87         TDay& aDay );
       
    88 
       
    89     /**
       
    90      * Shows n of many setting page
       
    91      *
       
    92      * @since S60 3.1
       
    93      * @param aTitleId Title text id
       
    94      * @param aTextIds Text id array for available settings
       
    95      * @param aSelection For storing selected indexes as bitmask
       
    96      * @param aDominantIndex Dominant index for select all behaviour
       
    97      * @return ETrue if selection made, otherwise EFalse
       
    98      */
       
    99     IMPORT_C static TBool ShowNOfMSettingQueryL(
       
   100         const TInt aTitleId,
       
   101         const TInt aTextIds,
       
   102         TUint32& aSelection,
       
   103         const TInt aDominantIndex = KIndexNotUsed );
       
   104 
       
   105     /**
       
   106      * Shows time setting page
       
   107      *
       
   108      * @since S60 3.1
       
   109      * @param aTitleId Title text id
       
   110      * @param aTime Selected time
       
   111      * @return ETrue if selection made, otherwise EFalse
       
   112      */
       
   113     IMPORT_C static TBool ShowTimeSettingQueryL(
       
   114         const TInt aTitleId, TTime& aTime );
       
   115 
       
   116     /**
       
   117      * Shows memory store info popup
       
   118      *
       
   119      * @since S60 3.1
       
   120      * @param aInfo Memory store info
       
   121      */
       
   122     IMPORT_C static void ShowMemoryStoreInfoPopupL(
       
   123         const TFileManagerDriveInfo& aInfo );
       
   124 
       
   125     /**
       
   126      * Shows info query in message query format
       
   127      *
       
   128      * @since S60 3.1
       
   129      * @param aText Text to display
       
   130      */
       
   131     IMPORT_C static void ShowInfoQueryL(
       
   132         const TDesC& aText );
       
   133 
       
   134     /**
       
   135      * Shows info query in message query format
       
   136      *
       
   137      * @since S60 3.1
       
   138      * @param aTextId TextId to display
       
   139      * @param aValue Text value to display
       
   140      */
       
   141     IMPORT_C static void ShowInfoQueryL(
       
   142         const TInt aTextId,
       
   143         const TDesC& aValue = KNullDesC );
       
   144 
       
   145     /**
       
   146      * Shows info query in message query format
       
   147      *
       
   148      * @since S60 3.1
       
   149      * @param aTextId TextId to display
       
   150      * @param aValue Integer value to display
       
   151      */
       
   152     IMPORT_C static void ShowInfoQueryL(
       
   153         const TInt aTextId,
       
   154         const TInt aValue );
       
   155 
       
   156     /**
       
   157      * Shows error note
       
   158      *
       
   159      * @since S60 3.1
       
   160      * @param aTextId TextId to display
       
   161      * @param aValue Text value to display
       
   162      */
       
   163     IMPORT_C static void ShowErrorNoteL(
       
   164         const TInt aTextId,
       
   165         const TDesC& aValue = KNullDesC );
       
   166 
       
   167     /**
       
   168      * Shows confirm note
       
   169      *
       
   170      * @since S60 3.1
       
   171      * @param aTextId TextId to display
       
   172      */
       
   173     IMPORT_C static void ShowConfirmNoteL( const TInt aTextId );
       
   174 
       
   175     /**
       
   176      * Shows warning note
       
   177      *
       
   178      * @since S60 3.1
       
   179      * @param aTextId TextId to display
       
   180      */
       
   181     IMPORT_C static void ShowWarningNoteL( const TInt aTextId );
       
   182 
       
   183     /**
       
   184      * Shows confirm query with yes no softkey
       
   185      *
       
   186      * @since S60 3.1
       
   187      * @param aTextId TextId to display
       
   188      * @param aValue Text value to display
       
   189      * @return ETrue is Yes selected, otherwise EFalse
       
   190      */
       
   191     IMPORT_C static TBool ShowConfirmQueryWithYesNoL(
       
   192         const TInt aTextId,
       
   193         const TDesC& aValue = KNullDesC );
       
   194 
       
   195     /**
       
   196      * Shows confirm query with yes no softkey
       
   197      *
       
   198      * @since S60 3.1
       
   199      * @param aText Text to display
       
   200      * @return ETrue is Yes selected, otherwise EFalse
       
   201      */
       
   202     IMPORT_C static TBool ShowConfirmQueryWithYesNoL(
       
   203         const TDesC& aText );
       
   204 
       
   205     // Dialog icon types
       
   206     enum TIcons
       
   207         {
       
   208         EInfoIcons = 0,
       
   209         EErrorIcons
       
   210         };
       
   211 
       
   212     /**
       
   213      * Shows confirm query with ok softkey
       
   214      *
       
   215      * @since S60 3.1
       
   216      * @param aIcons Icons to display
       
   217      * @param aText Text to display
       
   218      * @param aValue Text value to display
       
   219      */
       
   220     IMPORT_C static void ShowConfirmQueryWithOkL(
       
   221         const TIcons aIcons,
       
   222         const TInt aTextId,
       
   223         const TDesC& aValue = KNullDesC );
       
   224 
       
   225     /**
       
   226      * Shows confirm query with ok softkey
       
   227      *
       
   228      * @since S60 3.1
       
   229      * @param aIcons Icons to display
       
   230      * @param aText Text to display
       
   231      * @param aValue Integer value to display
       
   232      */
       
   233     IMPORT_C static void ShowConfirmQueryWithOkL(
       
   234         const TIcons aIcons,
       
   235         const TInt aTextId,
       
   236         const TInt aValue );
       
   237 
       
   238     /**
       
   239      * Shows confirm query with ok softkey
       
   240      *
       
   241      * @since S60 3.1
       
   242      * @param aIcons Icons to display
       
   243      * @param aText Text to display
       
   244      */
       
   245     IMPORT_C static void ShowConfirmQueryWithOkL(
       
   246         const TIcons aIcons,
       
   247         const TDesC& aText );
       
   248 
       
   249     /**
       
   250      * Shows confirm query with ok cancel softkeys
       
   251      *
       
   252      * @since S60 3.1
       
   253      * @param aTextId TextId to display
       
   254      * @param aValue Text value to display
       
   255      * @return ETrue is Cancel selected, otherwise EFalse
       
   256      */
       
   257     IMPORT_C static TBool ShowConfirmQueryWithOkCancelL(
       
   258         const TInt aTextId,
       
   259         const TDesC& aValue = KNullDesC );
       
   260 
       
   261     /**
       
   262      * Shows confirm query with ok cancel softkeys
       
   263      *
       
   264      * @since S60 3.1
       
   265      * @param aText Text to display
       
   266      * @return ETrue is Cancel selected, otherwise EFalse
       
   267      */
       
   268     IMPORT_C static TBool ShowConfirmQueryWithOkCancelL(
       
   269         const TDesC& aText );
       
   270 
       
   271     /**
       
   272      * Shows info note
       
   273      *
       
   274      * @since S60 3.1
       
   275      * @param aText Text to display
       
   276      */
       
   277     IMPORT_C static void ShowInfoNoteL(
       
   278         const TDesC& aText );
       
   279 
       
   280     /**
       
   281      * Shows info note
       
   282      *
       
   283      * @since S60 3.1
       
   284      * @param aTextId TextId to display
       
   285      * @param aValue Text value to display
       
   286      */
       
   287     IMPORT_C static void ShowInfoNoteL(
       
   288         const TInt aTextId,
       
   289         const TDesC& aValue = KNullDesC );
       
   290 
       
   291     /**
       
   292      * Shows info note
       
   293      *
       
   294      * @since S60 3.1
       
   295      * @param aTextId TextId to display
       
   296      * @param aValue Integer value to display
       
   297      */
       
   298     IMPORT_C static void ShowInfoNoteL(
       
   299         const TInt aTextId,
       
   300         const TInt aValue );
       
   301 
       
   302     /**
       
   303      * Shows simple password query
       
   304      *
       
   305      * @since S60 3.1
       
   306      * @param aTitleId Title to display
       
   307      * @param aPwd For storing given password
       
   308      * @return ETrue if password is given, otherwise EFalse
       
   309      */
       
   310     IMPORT_C static TBool ShowSimplePasswordQueryL(
       
   311         const TInt aTitleId, TDes& aPwd );
       
   312 
       
   313     /**
       
   314      * Shows password query
       
   315      *
       
   316      * @since S60 3.1
       
   317      * @param aPwd For storing given password
       
   318      * @return ETrue if password is given correctly, otherwise EFalse
       
   319      */
       
   320     IMPORT_C static TBool ShowPasswordQueryL( TDes& aPwd );
       
   321 
       
   322     /**
       
   323      * Shows file name query
       
   324      *
       
   325      * @since S60 3.2
       
   326      * @param aTitleId Title text id
       
   327      * @param aOldName Old file name
       
   328      * @param aNewName User given new name
       
   329      * @param aEngine Reference to the engine
       
   330      * @return ETrue if name is given, otherwise EFalse
       
   331      */
       
   332     IMPORT_C static TBool ShowFileNameQueryL(
       
   333         const TInt aTitleId,
       
   334         const TDesC& aOldName,
       
   335         TDes& aNewName,
       
   336         CFileManagerEngine& aEngine );
       
   337 
       
   338     /**
       
   339      * Shows folder name query
       
   340      *
       
   341      * @since S60 3.2
       
   342      * @param aTitleId Title text id
       
   343      * @param aName Old folder name, this will be the default for new
       
   344      * @param aEngine Reference to the engine
       
   345      * @param aNameGeneration ETrue if name generation will be used,
       
   346      *                        EFalse otherwise
       
   347      * @return ETrue if name is given, otherwise EFalse
       
   348      */
       
   349     IMPORT_C static TBool ShowFolderNameQueryL(
       
   350         const TInt aTitleId,
       
   351         TDes& aName,
       
   352         CFileManagerEngine& aEngine,
       
   353         const TBool aNameGeneration = EFalse );
       
   354 
       
   355     /**
       
   356      * Shows item info popup
       
   357      *
       
   358      * @since S60 3.2
       
   359      * @param aProperties Item properties
       
   360      * @param aFeatureManager Reference to the feature manager
       
   361      */
       
   362     IMPORT_C static void ShowItemInfoPopupL(
       
   363         CFileManagerItemProperties& aProperties,
       
   364         const CFileManagerFeatureManager& aFeatureManager );
       
   365 
       
   366     /**
       
   367      * Shows simple password query with drive name
       
   368      *
       
   369      * @since S60 3.2
       
   370      * @param aText Name to display
       
   371      * @param aPwd For storing given password
       
   372      * @return ETrue if password is given, otherwise EFalse
       
   373      */
       
   374     IMPORT_C static TBool ShowSimplePasswordQueryL(
       
   375         const TDesC& aText, TDes& aPwd );
       
   376 
       
   377     /**
       
   378      * Shows error note
       
   379      *
       
   380      * @since S60 3.2
       
   381      * @param aText Text to display
       
   382      */
       
   383     IMPORT_C static void ShowErrorNoteL( const TDesC& aText );
       
   384 
       
   385     };
       
   386 
       
   387 #endif // FILEMANAGERVIEWUTILS_H
       
   388 
       
   389 // End of File