From 7d6cd1f3629b8c521e87abe6904410caca16a34b Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Sun, 3 May 2009 01:31:06 -0400 Subject: Implement adding a game to the tree --- sigmodr/tree/TreeModel.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'sigmodr/tree/TreeModel.cpp') 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(); +} -- cgit