|
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: Certificate trust settings view in advanced security settings |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef ADVSECSETTINGSCERTTRUSTSETTINGSVIEW_H |
|
19 #define ADVSECSETTINGSCERTTRUSTSETTINGSVIEW_H |
|
20 |
|
21 #include "advsecsettingsviewbase.h" |
|
22 |
|
23 class AdvSecSettingsCertificate; |
|
24 class AdvSecSettingsCertificateModel; |
|
25 class HbGroupBox; |
|
26 class HbDataForm; |
|
27 class HbDataFormModel; |
|
28 |
|
29 |
|
30 /** |
|
31 * Certificate trust settings view in advanced security settings. Certificate |
|
32 * detail view shows certificate details (subject, issuer, validity |
|
33 * dates, fingerprints, etc). |
|
34 */ |
|
35 class AdvSecSettingsCertTrustSettingsView : public AdvSecSettingsViewBase |
|
36 { |
|
37 Q_OBJECT |
|
38 |
|
39 public: // constructor and destructor |
|
40 explicit AdvSecSettingsCertTrustSettingsView( |
|
41 AdvSecSettingsCertificateModel &model, QGraphicsItem *parent = 0); |
|
42 virtual ~AdvSecSettingsCertTrustSettingsView(); |
|
43 |
|
44 public: // new functions |
|
45 void setCertificate(const AdvSecSettingsCertificate &cert); |
|
46 |
|
47 private slots: |
|
48 void refreshDisplay(); |
|
49 void toggleChange(const QModelIndex &itemIndex); |
|
50 void saveTrustSettings(); |
|
51 void deleteCertificate(); |
|
52 void deleteConfirmationAccepted(); |
|
53 |
|
54 private: // new functions |
|
55 QString usageName(int usageId); |
|
56 |
|
57 private: // data |
|
58 AdvSecSettingsCertificateModel &mModel; |
|
59 const AdvSecSettingsCertificate *mCertificate; // not owned |
|
60 bool mIsCertDeletable; |
|
61 HbGroupBox *mViewLabel; |
|
62 HbDataForm *mDataForm; |
|
63 HbDataFormModel *mDataFormModel; |
|
64 QMap<int,bool> mUsageIdAndTrust; |
|
65 QMap<int,QString> mUsageIdAndName; |
|
66 }; |
|
67 |
|
68 #endif // ADVSECSETTINGSCERTTRUSTSETTINGSVIEW_H |
|
69 |