ij-16.png   inspectorJ -- JavaTM Profiler
sf project site browse source checkout source
SourceForge.net Logo



src/inspectorj/model/classtreemodel.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   inspectorJ - java profiler                                            *
00003  *   Copyright (C) 2007 by 
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00027 #ifndef MODEL_CLASS_TREE_MODEL_H
00028 #define MODEL_CLASS_TREE_MODEL_H
00029 
00030 #include <QAbstractItemModel>
00031 #include <QModelIndex>
00032 #include <QVariant> 
00033 #include "inspectorj/client/sessionprofile.h"
00034 #include "inspectorj/model/javaclass.h"
00035 
00036 namespace inspectorj {
00037 namespace model {
00038 
00045 class TreeItem;
00046 class ClassTreeModel : public QAbstractItemModel
00047 {
00048     Q_OBJECT
00049 
00050     public:
00051         ClassTreeModel(QObject *parent = 0);
00052         ~ClassTreeModel();
00053     
00054         QVariant data(const QModelIndex &index, int role) const;
00055         Qt::ItemFlags flags(const QModelIndex &index) const;
00056         QVariant headerData(int section, Qt::Orientation orientation,
00057                             int role = Qt::DisplayRole) const;
00058         QModelIndex index(int row, int column,
00059                         const QModelIndex &parent = QModelIndex()) const;
00060         QModelIndex parent(const QModelIndex &index) const;
00061         int rowCount(const QModelIndex &parent = QModelIndex()) const;
00062         int columnCount(const QModelIndex &parent = QModelIndex()) const;
00063         void setJavaClass(JavaClass*);
00064 
00065     public slots:
00066         void initModel(); 
00067         
00068     private:
00069         void setupModelData(TreeItem *parent);
00070         JavaClass *javaClass;
00071         TreeItem *rootItem;
00072 };
00073 
00074 }  // end namespace model
00075 } // end namespace inspectorj
00076 
00077 #endif  // MODEL_CLASS_TREE_MODEL_H

Generated on Sun Aug 19 17:07:53 2007 for inspectorJ by  doxygen 1.5.1