memspyui/ui/hb/inc/memspyprocessview.h
changeset 17 4f2773374eff
child 31 e7a04a6385be
equal deleted inserted replaced
15:e11368ed4880 17:4f2773374eff
       
     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 MEMSPYPROCESSVIEW_H_
       
    19 #define MEMSPYPROCESSVIEW_H_
       
    20 
       
    21 #include <QAbstractListModel>
       
    22 
       
    23 #include "memspyview.h"
       
    24 #include "enginewrapper.h"
       
    25 
       
    26 
       
    27 class MemSpyProcessModel : public QAbstractListModel
       
    28 {
       
    29 public:
       
    30 	MemSpyProcessModel(EngineWrapper &engine, QObject *parent = 0);
       
    31 	
       
    32 	~MemSpyProcessModel();
       
    33 	
       
    34 	int rowCount(const QModelIndex &parent = QModelIndex()) const;
       
    35 	
       
    36 	QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
       
    37 	
       
    38 private:
       
    39 	QList<MemSpyProcess*> mProcesses;
       
    40 };
       
    41 
       
    42 class MemSpyProcessView : public MemSpyView
       
    43 {
       
    44     Q_OBJECT
       
    45     
       
    46 public:
       
    47 	MemSpyProcessView(EngineWrapper &engine, ViewManager &viewManager) 
       
    48 			: MemSpyView(engine, viewManager) {}
       
    49 	
       
    50 protected:
       
    51 	void initialize(const QVariantMap& params);
       
    52 	
       
    53 protected:
       
    54 	virtual bool isRefreshable() const { return true; }
       
    55 	
       
    56 private slots:
       
    57 	void itemClicked(const QModelIndex& index);
       
    58 };
       
    59 
       
    60 #endif /* MEMSPYPROCESSVIEW_H_ */