summaryrefslogtreecommitdiffstats
path: root/sigmodr/tree
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-05-03 01:31:06 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-05-03 01:31:06 -0400
commit7d6cd1f3629b8c521e87abe6904410caca16a34b (patch)
tree164ed626cebdb79fd3226d50efedc7c237040b28 /sigmodr/tree
parent6ce966fbb12f4f3934aa14c78489671d6fd186fb (diff)
downloadsigen-7d6cd1f3629b8c521e87abe6904410caca16a34b.tar.gz
sigen-7d6cd1f3629b8c521e87abe6904410caca16a34b.tar.xz
sigen-7d6cd1f3629b8c521e87abe6904410caca16a34b.zip
Implement adding a game to the tree
Diffstat (limited to 'sigmodr/tree')
-rw-r--r--sigmodr/tree/TreeModel.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/sigmodr/tree/TreeModel.cpp b/sigmodr/tree/TreeModel.cpp
index 82dd7ec8..5db31e06 100644
--- a/sigmodr/tree/TreeModel.cpp
+++ b/sigmodr/tree/TreeModel.cpp
@@ -126,3 +126,10 @@ Qt::DropActions TreeModel::supportedDropActions() const
{
return Qt::CopyAction | Qt::MoveAction;
}
+
+void TreeModel::addGame(Sigmod::Game* game)
+{
+ beginInsertRows(index(-1, -1, QModelIndex()), m_root->childCount(), m_root->childCount());
+ m_root->addGame(game);
+ endInsertRows();
+}