perfapps/memspyui/ui/hb/inc/memspywindowgroupsview.h
changeset 54 9347c563e054
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/perfapps/memspyui/ui/hb/inc/memspywindowgroupsview.h	Mon Oct 04 00:18:03 2010 +0300
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description:
+ *  
+ */
+
+#ifndef MEMSPYWINDOWGROUPSVIEW_H_
+#define MEMSPYWINDOWGROUPSVIEW_H_
+
+#include <QAbstractListModel>
+
+#include "memspylistview.h"
+#include "enginewrapper.h"
+
+
+class MemSpyWindowGroupsModel : public QAbstractListModel
+{
+public:
+    MemSpyWindowGroupsModel(EngineWrapper &engine, QObject *parent = 0);
+    
+    ~MemSpyWindowGroupsModel();
+    
+    int rowCount(const QModelIndex &parent = QModelIndex()) const;
+    
+    QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const;
+    
+    void refresh();
+    
+private:
+    int mInterfaceId;
+    
+    EngineWrapper& mEngine;
+    
+    QList<MemSpyWindowGroup*> mData;
+};
+
+class MemSpyWindowGroupsView : public MemSpyListView
+{
+    
+    Q_OBJECT
+    
+public:
+    MemSpyWindowGroupsView(EngineWrapper &engine, ViewManager &viewManager) : 
+            MemSpyListView(engine, viewManager),
+            mModel(0)
+        {}
+    
+public slots:
+    virtual void refresh();
+    
+protected:
+    void initialize(const QVariantMap& params);
+    
+protected:
+    virtual bool isRefreshable() const { return true; }
+    
+private slots:
+    void itemClicked(const QModelIndex& index);
+    
+private:
+    MemSpyWindowGroupsModel* mModel;
+};
+
+#endif /* MEMSPYWINDOWGROUPSVIEW_H_ */