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



src/inspectorj/model/treeitem.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   inspectorJ - java profiler                                            *
00003  *   Copyright (C) 2007 by James May
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 TREE_ITEM_H
00028 #define TREE_ITEM_H
00029 
00030 #include <QList>
00031 #include <QVariant>
00032 
00033 namespace inspectorj {
00034 namespace model {
00035 
00036 class TreeItem
00037 {
00038 public:
00039     TreeItem(const QList<QVariant> &data, TreeItem *parent = 0);
00040     ~TreeItem();
00041 
00042     void appendChild(TreeItem *child);
00043 
00044     TreeItem *child(int row);
00045     int childCount() const;
00046     int columnCount() const;
00047     QVariant data(int column) const;
00048     int row() const;
00049     TreeItem *parent();
00050 
00051 private:
00052     QList<TreeItem*> childItems;
00053     QList<QVariant> itemData;
00054     TreeItem *parentItem;
00055 };
00056 
00057 } // end namespace model
00058 } // end namespace inspectorj
00059 
00060 #endif

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