memspyui/ui/hb/inc/memspykernelobjectview.h
branchRCL_3
changeset 19 b3cee849fa46
equal deleted inserted replaced
18:48060abbbeaf 19:b3cee849fa46
       
     1 /*
       
     2  * Copyright (c) 2009 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 MEMSPYKERNELOBJECTVIEW_H_
       
    19 #define MEMSPYKERNELOBJECTVIEW_H_
       
    20 
       
    21 #include "memspylistview.h"
       
    22 #include "enginewrapper.h"
       
    23 
       
    24 class MemSpyKernelObjectModel : public QAbstractListModel
       
    25 {
       
    26 public:
       
    27 	MemSpyKernelObjectModel(EngineWrapper &engine, int objectType, QObject *parent = 0);
       
    28 	
       
    29 	~MemSpyKernelObjectModel();
       
    30 	
       
    31 	int rowCount(const QModelIndex &parent = QModelIndex()) const;
       
    32 	
       
    33 	QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
       
    34 	
       
    35 private:
       
    36 	QList<MemSpyKernelObject*> mObjects;
       
    37 };
       
    38 
       
    39 
       
    40 class MemSpyKernelObjectView : public MemSpyListView
       
    41 {
       
    42 	Q_OBJECT
       
    43 
       
    44 public:
       
    45 	MemSpyKernelObjectView(EngineWrapper &engine, ViewManager &viewManager) 
       
    46 		: MemSpyListView(engine, viewManager) {}
       
    47 
       
    48 protected:
       
    49 	virtual void initialize(const QVariantMap& params);
       
    50 	
       
    51 	virtual bool isBreadCrumbVisible() const;
       
    52 	            
       
    53 	virtual QString getBreadCrumbText() const;
       
    54 
       
    55 private slots:
       
    56 	void itemClicked(const QModelIndex& index);
       
    57 	
       
    58 private:
       
    59 	QStringList getDetails(MemSpyKernelObject *object);
       
    60 };
       
    61 
       
    62 #endif /* MEMSPYKERNELOBJECTVIEW_H_ */