1.1 --- a/findresultmodel.h Mon Mar 08 12:22:15 2010 +0000
1.2 +++ b/findresultmodel.h Mon Mar 08 12:24:26 2010 +0000
1.3 @@ -6,6 +6,7 @@
1.4 #include <QVariant>
1.5
1.6 class FindResultItem;
1.7 +class TreeItem;
1.8
1.9 class FindResultModel : public QAbstractItemModel
1.10 {
1.11 @@ -14,11 +15,13 @@
1.12 public:
1.13 FindResultModel( QObject *parent = 0);
1.14 ~FindResultModel();
1.15 + void clear();
1.16
1.17 QVariant data(const QModelIndex &index, int role) const;
1.18 QVariant headerData(int section, Qt::Orientation orientation,
1.19 int role = Qt::DisplayRole) const;
1.20
1.21 + QModelIndex index (FindResultItem *fri);
1.22 QModelIndex index(int row, int column,
1.23 const QModelIndex &parent = QModelIndex()) const;
1.24 QModelIndex parent(const QModelIndex &index) const;
1.25 @@ -41,9 +44,12 @@
1.26 bool removeRows(int position, int rows,
1.27 const QModelIndex &parent = QModelIndex());
1.28
1.29 + FindResultItem *getItem(const QModelIndex &index) const;
1.30 +
1.31 + void addItem (TreeItem *ti);
1.32 + void addItem (const QString &s);
1.33 +
1.34 private:
1.35 - void setupModelData(const QStringList &lines, FindResultItem *parent);
1.36 - FindResultItem *getItem(const QModelIndex &index) const;
1.37
1.38 FindResultItem *rootItem;
1.39 };