filemanager/src/filemanager/src/components/fmdlgutils.h
branchRCL_3
changeset 21 65326cf895ed
parent 20 491b3ed49290
child 22 f5c50b8af68c
equal deleted inserted replaced
20:491b3ed49290 21:65326cf895ed
     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  * 
       
    15  * Description:
       
    16  *     The header file of the query dialog utility of file manager
       
    17  */
       
    18 
       
    19 #ifndef FMDLGUTILS_H
       
    20 #define FMDLGUTILS_H
       
    21 
       
    22 #include "fmcommon.h"
       
    23 
       
    24 #include <QString>
       
    25 #include <QStringList>
       
    26 #include <QTime>
       
    27 
       
    28 #include <hbglobal.h>
       
    29 #include <hbmessagebox.h>
       
    30 
       
    31 class FmDialog;
       
    32 class HbAction;
       
    33 
       
    34 /*!
       
    35     \class FmDlgUtils
       
    36     \brief The class FmDlgUtils is static utility class. Used to popup dialogs
       
    37  */
       
    38 class FmDlgUtils : public QObject
       
    39 {
       
    40     Q_OBJECT
       
    41 public:
       
    42     static bool showSingleSettingQuery(
       
    43         const QString &title,
       
    44         const QStringList &textList,
       
    45         int &selectedIndex,
       
    46 		const QString &associatedDrives = QString() );
       
    47 
       
    48 	static bool showMultiSettingQuery(
       
    49         const QString &title,
       
    50         const QStringList &textList,
       
    51         quint32 &selection,
       
    52         int dominantIndex,
       
    53 		const QString &associatedDrives = QString() );
       
    54 
       
    55     static bool showTimeSettingQuery(
       
    56         const QString &title, QTime &time,
       
    57         const QString &associatedDrives = QString() );
       
    58 
       
    59     static bool showTextQuery(     
       
    60         const QString &title, QString &text, QStringList validRegExpStringList = QStringList( Regex_ValidUnEmpty ),
       
    61 	    int maxLength = -1, const QString &associatedDrives = QString(), bool isReturnFalseWhenNoTextChanged = true );
       
    62 
       
    63     static bool showSinglePasswordQuery(     
       
    64         const QString &title, QString &pwd, int maxLength = -1,
       
    65 	    const QString &associatedDrives = QString() );
       
    66 
       
    67     static bool showMultiPasswordQuery(     
       
    68         const QString &firstLabel, const QString &secondLabel, QString &pwd, int maxLength = -1,
       
    69 	    const QString &associatedDrives = QString() );
       
    70     
       
    71     static bool question( const QString &questionText,
       
    72         HbMessageBox::StandardButtons buttons = HbMessageBox::Yes | HbMessageBox::No );
       
    73 
       
    74     static void information( const QString &informationText,
       
    75         HbMessageBox::StandardButtons buttons = HbMessageBox::Ok );
       
    76 
       
    77     static QString showBackupDriveQuery( const QString& title );
       
    78 
       
    79     ~FmDlgUtils();
       
    80 private:
       
    81     FmDlgUtils();
       
    82 	static HbAction *executeDialog( FmDialog *dialog, const QString &associatedDrives );
       
    83 };
       
    84 
       
    85 
       
    86 #endif