emailuis/nmsettingui/inc/nmsettingsviewfactory.h
branchRCL_3
changeset 63 d189ee25cf9d
equal deleted inserted replaced
61:dcf0eedfc1a3 63:d189ee25cf9d
       
     1 /*
       
     2 * Copyright (c) 2010 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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef NMSETTINGSVIEWFACTORY_H
       
    19 #define NMSETTINGSVIEWFACTORY_H
       
    20 
       
    21 #include <cpsettingformentryitemdata.h>
       
    22 
       
    23 #include "nmsettinguidef.h"
       
    24 #include "nmsettingscommon.h"
       
    25 
       
    26 class NmMailboxSettingsManager;
       
    27 class CpItemDataHelper;
       
    28 class QString;
       
    29 class HbIcon;
       
    30 class HbDataFormModelItem;
       
    31 class NmId;
       
    32 class NmSettingsViewLauncher;
       
    33 class HbView;
       
    34 class HbMessageBox;
       
    35 class HbAction;
       
    36 
       
    37 class NMAILSETTINGUI_EXPORT NmSettingsViewFactory : public CpSettingFormEntryItemData
       
    38 {
       
    39     Q_OBJECT
       
    40 
       
    41 public:
       
    42 
       
    43     explicit NmSettingsViewFactory(CpItemDataHelper &itemDataHelper,
       
    44         const QString &text = QString(),
       
    45         const QString &description = QString(),
       
    46         const HbIcon &icon = HbIcon(),
       
    47         const HbDataFormModelItem *parent = 0);
       
    48 
       
    49     explicit NmSettingsViewFactory(const NmSettingsViewLauncher *viewLauncher,
       
    50         CpItemDataHelper &itemDataHelper,
       
    51         const QString &text = QString(),
       
    52         const QString &description = QString(),
       
    53         const HbIcon &icon = HbIcon(),
       
    54         const HbDataFormModelItem *parent = 0);
       
    55     
       
    56     virtual ~NmSettingsViewFactory();
       
    57 
       
    58     virtual CpBaseSettingView *createSettingView() const;
       
    59 
       
    60     void launchSettingView(const NmId &mailboxId,
       
    61                            const QString &mailboxName) const;
       
    62 
       
    63 signals:
       
    64 
       
    65 	void aboutToClose();
       
    66 	
       
    67 private slots:
       
    68 
       
    69     void backPress();
       
    70     void launchWizard(HbAction *action);
       
    71 
       
    72 private:
       
    73 
       
    74     void createMessageBox();
       
    75 
       
    76     Q_DISABLE_COPY(NmSettingsViewFactory)
       
    77 
       
    78 private: // data
       
    79 
       
    80     // Owned.
       
    81     NmMailboxSettingsManager *mSettingsManager;
       
    82     
       
    83     // Not owned.
       
    84     const NmSettingsViewLauncher *mSettingsViewLauncher;
       
    85 
       
    86     // Not Owned.
       
    87     mutable HbView* mPrevView;
       
    88 
       
    89     // Owned.
       
    90     HbMessageBox *mMessageBox;
       
    91 };
       
    92 
       
    93 
       
    94 #endif // NMSETTINGSVIEWFACTORY_H
       
    95 
       
    96 // End of file.