|
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 NMMAILBOXSELECTIONVIEW_H |
|
19 #define NMMAILBOXSELECTIONVIEW_H |
|
20 |
|
21 |
|
22 #include <QVariant> |
|
23 #include <cpbasesettingview.h> |
|
24 |
|
25 #include "nmsettingscommon.h" |
|
26 |
|
27 class QGraphicsItem; |
|
28 class QSignalMapper; |
|
29 class HbDataFormModel; |
|
30 class HbDataFormModelItem; |
|
31 class CpSettingFormItemData; |
|
32 class NmSettingsViewFactory; |
|
33 class NmMailboxSettingsManager; |
|
34 class NmMailboxEntryItem; |
|
35 class NmMailbox; |
|
36 class NmId; |
|
37 |
|
38 class NmMailboxSelectionView : public CpBaseSettingView |
|
39 { |
|
40 Q_OBJECT |
|
41 |
|
42 public: |
|
43 |
|
44 explicit NmMailboxSelectionView( |
|
45 const NmSettingsViewFactory &settingsFactory, |
|
46 NmMailboxSettingsManager &settingsManager, |
|
47 const QList<NmMailbox *> &mailboxList, |
|
48 QGraphicsItem *parent = 0); |
|
49 |
|
50 virtual ~NmMailboxSelectionView(); |
|
51 |
|
52 public slots: |
|
53 |
|
54 void buttonClick(QObject *item); |
|
55 void formActivate(const QModelIndex &index ); |
|
56 |
|
57 private slots: |
|
58 |
|
59 void mailboxListChanged(const NmId &mailboxId, NmSettings::MailboxEventType type); |
|
60 void mailboxPropertyChanged(const NmId &mailboxId, QVariant property, QVariant value); |
|
61 |
|
62 |
|
63 private: |
|
64 |
|
65 Q_DISABLE_COPY(NmMailboxSelectionView) |
|
66 void populateDataModel(const QList<NmMailbox *> &mailboxList); |
|
67 |
|
68 private: // data |
|
69 |
|
70 NmMailboxSettingsManager &mSettingsManager; |
|
71 const NmSettingsViewFactory &mSettingsFactory; |
|
72 // Owned. |
|
73 CpItemDataHelper *mItemDataHelper; |
|
74 // Owned. |
|
75 HbDataFormModel *mModel; |
|
76 // Owned. |
|
77 QSignalMapper *mSignalMapper; |
|
78 bool mSignalMapperConnected; |
|
79 bool mRefreshForm; |
|
80 }; |
|
81 |
|
82 #endif // NMMAILBOXSELECTIONVIEW_H |