|
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 |
|
35 class NMAILSETTINGUI_EXPORT NmSettingsViewFactory : public CpSettingFormEntryItemData |
|
36 { |
|
37 Q_OBJECT |
|
38 |
|
39 public: |
|
40 |
|
41 explicit NmSettingsViewFactory(CpItemDataHelper &itemDataHelper, |
|
42 const QString &text = QString(), |
|
43 const QString &description = QString(), |
|
44 const HbIcon &icon = HbIcon(), |
|
45 const HbDataFormModelItem *parent = 0); |
|
46 |
|
47 explicit NmSettingsViewFactory(const NmSettingsViewLauncher *viewLauncher, |
|
48 CpItemDataHelper &itemDataHelper, |
|
49 const QString &text = QString(), |
|
50 const QString &description = QString(), |
|
51 const HbIcon &icon = HbIcon(), |
|
52 const HbDataFormModelItem *parent = 0); |
|
53 |
|
54 virtual ~NmSettingsViewFactory(); |
|
55 |
|
56 virtual CpBaseSettingView *createSettingView() const; |
|
57 |
|
58 void launchSettingView(const NmId &mailboxId, |
|
59 const QString &mailboxName) const; |
|
60 |
|
61 private slots: |
|
62 |
|
63 void backPress(); |
|
64 |
|
65 private: |
|
66 |
|
67 Q_DISABLE_COPY(NmSettingsViewFactory) |
|
68 |
|
69 private: // data |
|
70 |
|
71 // Owned. |
|
72 NmMailboxSettingsManager *mSettingsManager; |
|
73 |
|
74 // Not owned. |
|
75 const NmSettingsViewLauncher *mSettingsViewLauncher; |
|
76 |
|
77 // Not Owned. |
|
78 mutable HbView* mPrevView; |
|
79 }; |
|
80 |
|
81 |
|
82 #endif // NMSETTINGSVIEWFACTORY_H |
|
83 |
|
84 // End of file. |