summaryrefslogtreecommitdiffstats
path: root/smtreemodel.h
diff options
context:
space:
mode:
authorArno <am@disconnect.de>2014-06-29 09:41:30 +0200
committerArno <am@disconnect.de>2014-06-29 09:41:30 +0200
commitf295cfb8672d97bb5c804499bdb311a9a0d8039b (patch)
tree77b54514e17d6bb453bd9431707f9f37954c9fc2 /smtreemodel.h
parentb5bd9cf0b981ee0c87ead9e20c36247932de7818 (diff)
downloadSheMov-f295cfb8672d97bb5c804499bdb311a9a0d8039b.tar.gz
SheMov-f295cfb8672d97bb5c804499bdb311a9a0d8039b.tar.bz2
SheMov-f295cfb8672d97bb5c804499bdb311a9a0d8039b.zip
Major rework of MappingTreeResultView + Model
Well, I hope this fixes the crashes for good. String comparison for looking up the parents really wasn't a prudent thing to do... Use the ParentIds instead.
Diffstat (limited to 'smtreemodel.h')
-rw-r--r--smtreemodel.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/smtreemodel.h b/smtreemodel.h
index d72d53c..5f7ad7e 100644
--- a/smtreemodel.h
+++ b/smtreemodel.h
@@ -36,9 +36,9 @@ class SmTreeModel : public QAbstractItemModel {
virtual bool setHeaderData(int section, Qt::Orientation orientation, const QVariant &value, int role);
virtual QVariant data(const QModelIndex &index, int role) const;
virtual bool setData(const QModelIndex &index, const QVariant &value, int role);
- virtual QModelIndex find(const QVariant &value, int column = 0, const QModelIndex &parent = QModelIndex()) const;
+ virtual QModelIndex find(const QVariant &value, int column = 0, const QModelIndex &pIdx = QModelIndex()) const;
virtual QModelIndex findRecursive(const QVariant &value, int column, const QModelIndex &start) const;
- virtual bool matchRecursive(const QModelIndex &parent, const QRegExp &regex, int column = 0) const;
+ virtual bool matchRecursive(const QModelIndex &pIdx, const QRegExp &regex, int column = 0) const;
virtual bool checkParents(const SmTreeItem *item, const QRegExp &regex, int column) const;
// root + parent item
@@ -49,10 +49,10 @@ class SmTreeModel : public QAbstractItemModel {
void reparent(const QModelIndex &idx, const QModelIndex &newParent, bool sorted = false);
// row manipulation
- virtual bool insertRows(int row, int count, const QModelIndex &parent);
- virtual bool removeRows(int row, int count, const QModelIndex &parent);
- bool addRow(const QList<QVariant> &data, const QModelIndex &parent, bool sorted = false);
- bool appendRow(const QList<QVariant> &data, const QModelIndex &parent);
+ virtual bool insertRows(int row, int count, const QModelIndex &pIdx);
+ virtual bool removeRows(int row, int count, const QModelIndex &pIdx);
+ bool addRow(const QList<QVariant> &data, const QModelIndex &pIdx, bool sorted = false);
+ bool appendRow(const QList<QVariant> &data, const QModelIndex &pIdx);
//misc
void setDecorationIcon(const QIcon &icon) { mDecorationIcon = icon; }