diff options
author | Ben Boeckel <MathStuf@gmail.com> | 2009-05-02 02:42:13 -0400 |
---|---|---|
committer | Ben Boeckel <MathStuf@gmail.com> | 2009-05-02 02:42:13 -0400 |
commit | e2729afb2fc7234a8b307f030907725f97ac8786 (patch) | |
tree | 578cfe8e04c86bb2b00311d6316df9a68eba5ec7 /sigmodr/tree/TreeModel.cpp | |
parent | 58ecbc0307714e0d9fc0b5b920ea427cc613634e (diff) | |
download | sigen-e2729afb2fc7234a8b307f030907725f97ac8786.tar.gz sigen-e2729afb2fc7234a8b307f030907725f97ac8786.tar.xz sigen-e2729afb2fc7234a8b307f030907725f97ac8786.zip |
Use multiple columns
Diffstat (limited to 'sigmodr/tree/TreeModel.cpp')
-rw-r--r-- | sigmodr/tree/TreeModel.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sigmodr/tree/TreeModel.cpp b/sigmodr/tree/TreeModel.cpp index 801fbdb7..1cfbd6ae 100644 --- a/sigmodr/tree/TreeModel.cpp +++ b/sigmodr/tree/TreeModel.cpp @@ -42,9 +42,9 @@ QModelIndex TreeModel::index(const int row, const int column, const QModelIndex& if (!parent.isValid()) return QModelIndex(); TreeItem* item = static_cast<TreeItem*>(parent.internalPointer()); - if (column || (row < 0) || (item->childCount() <= row)) + if ((column < 0) || (4 <= column) || (row < 0) || (item->childCount() <= row)) return QModelIndex(); - return createIndex(row, 0, item->childAt(row)); + return createIndex(row, column, item->childAt(row)); } QModelIndex TreeModel::parent(const QModelIndex& child) const @@ -72,7 +72,7 @@ int TreeModel::rowCount(const QModelIndex& parent) const int TreeModel::columnCount(const QModelIndex& parent) const { - return 1; + return 4; } Qt::ItemFlags TreeModel::flags(const QModelIndex& index) const |