cpsecplugins/cpadvancedsecplugin/inc/cpcertview.h
changeset 19 098e361762d2
child 22 6b63ca65093a
equal deleted inserted replaced
17:8957df7b0072 19:098e361762d2
       
     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 CPCERTVIEW_H
       
    19 #define CPCERTVIEW_H
       
    20 
       
    21 #include <cpbasesettingview.h>
       
    22 
       
    23 class HbAbstractViewItem;
       
    24 class CpCertDataContainer;
       
    25 class CCTCertInfo;
       
    26 class HbListView;
       
    27 
       
    28 class CpCertView : public CpBaseSettingView
       
    29 	{
       
    30 	Q_OBJECT
       
    31 	
       
    32 	public:
       
    33 		explicit CpCertView(const QModelIndex& index, QGraphicsItem *parent = 0);
       
    34 		virtual ~CpCertView();
       
    35 	
       
    36 	public:
       
    37 		enum TCertificateViews
       
    38 			{
       
    39 			EAuthorityView=0,
       
    40 			ETrustedView,
       
    41 			EPersonalView,
       
    42 			EDeviceView			
       
    43 			};
       
    44 		
       
    45 	public slots:
       
    46 		void displayPreviousView();
       
    47 		
       
    48 	private slots:
       
    49 		void openCertificate();
       
    50 		void openCertFromList(const QModelIndex& modelIndex);
       
    51 		void showTrustSettings();
       
    52 		void saveTrustSettings();
       
    53 		void indicateLongPress(HbAbstractViewItem*, QPointF);
       
    54 			
       
    55 		void deleteCertificate();
       
    56 		TInt refreshListL();
       
    57 		void refreshView( TInt aCount );
       
    58 		
       
    59 		void moveSelectedCert();
       
    60 		void deleteList();  
       
    61 		void selectAll();
       
    62 		void moveCert();
       
    63 		void viewDone();
       
    64 		
       
    65 	private:
       
    66 		const CCTCertInfo* certAt(TInt index) const;
       
    67 		QString certLabel(TInt index) const;
       
    68 		void deleteCerts( RArray<TInt>& indexList );
       
    69 		void setDetails(CpCertView::TCertificateViews currentView);
       
    70 		void moveCertList( RArray<TInt>& indexList );
       
    71 
       
    72 	private:
       
    73 		CpCertView::TCertificateViews mCertView;
       
    74 		TInt mPos;
       
    75 		CpCertDataContainer* mCertDataContainer;
       
    76 		TBool mSelectAll;
       
    77 		
       
    78 		HbView* mPrevView;
       
    79 		HbView* mCurrentView;
       
    80 		CpBaseSettingView* mRefreshedView;
       
    81 		HbListView* mListView;		
       
    82 		HbView* mOriginalView;
       
    83 	};
       
    84 
       
    85 #endif /* CPCERTVIEW_H */