perfapps/memspyui/ui/hb/inc/memspykernelobjecttypeview.h
changeset 51 b048e15729d6
parent 31 e7a04a6385be
equal deleted inserted replaced
44:5db69f4c3d06 51:b048e15729d6
       
     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 MEMSPYKERNELOBJECTTYPESVIEW_H_
       
    19 #define MEMSPYKERNELOBJECTTYPESVIEW_H_
       
    20 
       
    21 #include "memspylistview.h"
       
    22 #include "enginewrapper.h"
       
    23 
       
    24 class MemSpyKernelObjectTypeModel : public QAbstractListModel
       
    25 {
       
    26 public:
       
    27 	MemSpyKernelObjectTypeModel(EngineWrapper &engine, QObject *parent = 0);
       
    28 	
       
    29 	virtual ~MemSpyKernelObjectTypeModel();
       
    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 	QString formatSize(qint64 size) const;
       
    37 	
       
    38 private:
       
    39 	QList<MemSpyKernelObjectType*> mObjectTypes;
       
    40 	
       
    41 	QStringList mKernelObjectNames;
       
    42 };
       
    43 
       
    44 class MemSpyKernelObjectTypeView : public MemSpyListView
       
    45 {
       
    46 	Q_OBJECT
       
    47 	
       
    48 public:
       
    49 	MemSpyKernelObjectTypeView(EngineWrapper &engine, ViewManager &viewManager) 
       
    50 		: MemSpyListView(engine, viewManager) {}
       
    51 
       
    52 protected:
       
    53 	virtual void initialize(const QVariantMap& params);
       
    54 
       
    55 private slots:
       
    56 	void itemClicked(const QModelIndex& index);
       
    57 };
       
    58 
       
    59 #endif /* MEMSPYKERNELOBJECTTYPESVIEW_H_ */