63
|
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 list view in advanced security settings
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
#ifndef ADVSECSETTINGSCERTIFICATELISTVIEW_H
|
|
19 |
#define ADVSECSETTINGSCERTIFICATELISTVIEW_H
|
|
20 |
|
|
21 |
#include "advsecsettingsviewbase.h"
|
|
22 |
#include "advsecsettingscertificate.h" // CertificateType
|
|
23 |
|
|
24 |
class HbAbstractViewItem;
|
|
25 |
class HbGroupBox;
|
|
26 |
class HbListWidget;
|
|
27 |
class HbLabel;
|
|
28 |
class HbStackedWidget;
|
|
29 |
class AdvSecSettingsCertificateModel;
|
|
30 |
class AdvSecSettingsCertificateDetailView;
|
|
31 |
class AdvSecSettingsCertTrustSettingsView;
|
|
32 |
|
|
33 |
|
|
34 |
/**
|
|
35 |
* Certificate list view in advanced security settings. Certificate
|
|
36 |
* list view shows certificate list -- either authority certificates,
|
|
37 |
* list, trusted site certificates list, personal certificates list,
|
|
38 |
* or dervice certificates list.
|
|
39 |
*/
|
|
40 |
class AdvSecSettingsCertificateListView : public AdvSecSettingsViewBase
|
|
41 |
{
|
|
42 |
Q_OBJECT
|
|
43 |
|
|
44 |
public: // constructor and destructor
|
|
45 |
explicit AdvSecSettingsCertificateListView(QGraphicsItem *parent = 0);
|
|
46 |
virtual ~AdvSecSettingsCertificateListView();
|
|
47 |
|
|
48 |
public: // new functions
|
|
49 |
void displayCertificates(AdvSecSettingsCertificate::CertificateType type);
|
|
50 |
void setCurrentIndex(const QModelIndex& index);
|
|
51 |
|
|
52 |
private slots:
|
|
53 |
void indicateLongPress(HbAbstractViewItem *item, const QPointF &position);
|
|
54 |
void openCertificate(const QModelIndex& modelIndex);
|
|
55 |
void openCurrentCertificate();
|
|
56 |
void displayCurrentCertTrustSettings();
|
|
57 |
void deleteCurrentCertificate();
|
|
58 |
void deleteConfirmationAccepted();
|
|
59 |
void moveCurrentCertToDeviceCertificates();
|
|
60 |
void moveToDeviceCertsConfirmationAccepted();
|
|
61 |
void moveCurrentCertToPersonalCertificates();
|
|
62 |
void moveToPersonalCertsConfirmationAccepted();
|
|
63 |
void readAllCertificatesFromModel();
|
|
64 |
void displayAllCertificatesReadFromModel();
|
|
65 |
void refreshAfterCurrentCertRemoved();
|
|
66 |
|
|
67 |
private: // new functions
|
|
68 |
void clearModelCertificates();
|
|
69 |
void refreshDisplayedCertificates();
|
|
70 |
|
|
71 |
private: // data
|
|
72 |
AdvSecSettingsCertificate::CertificateType mCertType;
|
|
73 |
HbGroupBox *mViewLabel;
|
|
74 |
HbListWidget *mListWidget; // Displayed cert list, for example Authority certificates
|
|
75 |
HbLabel *mEmptyText;
|
|
76 |
HbLabel *mRetrievingText;
|
|
77 |
HbStackedWidget *mStackedWidget;
|
|
78 |
bool mIsRetrieving;
|
|
79 |
QList<AdvSecSettingsCertificate *> mModelCertificateList; // All certs read from model
|
|
80 |
QList<AdvSecSettingsCertificate *> mDisplayedCertificates; // Displayed (like Authority) certs
|
|
81 |
AdvSecSettingsCertificateModel *mModel;
|
|
82 |
AdvSecSettingsCertificateDetailView *mDetailView;
|
|
83 |
AdvSecSettingsCertTrustSettingsView *mTrustSettingsView;
|
|
84 |
AdvSecSettingsCertificate *mCurrentCertificate; // not owned
|
|
85 |
};
|
|
86 |
|
|
87 |
#endif // ADVSECSETTINGSCERTIFICATELISTVIEW_H
|
|
88 |
|