cpsecplugins/cpadvancedsecplugin/inc/cpcertview.h
branchRCL_3
changeset 22 03674e5abf46
parent 21 09b1ac925e3f
child 23 94da73d93b58
equal deleted inserted replaced
21:09b1ac925e3f 22:03674e5abf46
     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 class HbAction;
       
    28 class HbDialog;
       
    29 class HbMessageBox;
       
    30 class CpCertView : public CpBaseSettingView
       
    31 	{
       
    32 	Q_OBJECT
       
    33 	
       
    34 	public:
       
    35 		explicit CpCertView(const QModelIndex& index, QGraphicsItem *parent = 0);
       
    36 		virtual ~CpCertView();
       
    37 	
       
    38 	public:
       
    39 		enum TCertificateViews
       
    40 			{
       
    41 			EAuthorityView=0,
       
    42 			ETrustedView,
       
    43 			EPersonalView,
       
    44 			EDeviceView			
       
    45 			};
       
    46 		
       
    47 	public slots:
       
    48 		void displayPreviousView();
       
    49 		
       
    50 	private slots:
       
    51 		void openCertificate();
       
    52 		void openCertFromList(const QModelIndex& modelIndex);
       
    53 		void showTrustSettings();
       
    54 		void saveTrustSettings();
       
    55 		void indicateLongPress(HbAbstractViewItem*, QPointF);
       
    56 			
       
    57 		void deleteCertificate();
       
    58 		TInt refreshListL();
       
    59 		void refreshView( TInt aCount );
       
    60 		
       
    61 		void moveSelectedCert();
       
    62 		void deleteList();  
       
    63 		void selectAll();
       
    64 		void moveCert();
       
    65 		void viewDone();
       
    66 		void handleMultipleDelete(HbAction* action);
       
    67 		void handleMoveDialog(HbAction* action);
       
    68 		void handleDeleteDialog(HbAction* action);
       
    69 		void handleMoveCertDialog(HbAction* action);
       
    70 	private:
       
    71 		const CCTCertInfo* certAt(TInt index) const;
       
    72 		QString certLabel(TInt index) const;
       
    73 		void deleteCertsL( RArray<TInt>& indexList );
       
    74 		void setDetails(CpCertView::TCertificateViews currentView);
       
    75 		void moveCertList( RArray<TInt>& indexList );
       
    76 
       
    77 	private:
       
    78 		CpCertView::TCertificateViews mCertView;
       
    79 		TInt mPos;
       
    80 		CpCertDataContainer* mCertDataContainer;
       
    81 		TBool mSelectAll;
       
    82 		RArray<TInt> mSelectionIndex;
       
    83 		RArray<TInt> mIndexList;
       
    84 		
       
    85 		HbDialog* mPopup;
       
    86 		HbView* mPrevView;
       
    87 		HbView* mCurrentView;
       
    88 		CpBaseSettingView* mRefreshedView;
       
    89 		HbListView* mListView;	
       
    90 		HbListView* mSelectAllView;	
       
    91 		HbView* mOriginalView;
       
    92 		HbMessageBox* mNote;
       
    93 		HbMenu* mContextMenu;
       
    94 	};
       
    95 
       
    96 #endif /* CPCERTVIEW_H */