summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2009-05-01 22:26:33 -0400
committerBen Boeckel <MathStuf@gmail.com>2009-05-01 22:26:33 -0400
commit87a5d67b907add0dca4cb8482374f99414fe4dba (patch)
tree95f47465e70c1048f0f1c561e9fd3e87e1e54ca5
parentd43500d8f348a77a7db32e6f16594dacf3b52ad9 (diff)
Add root item to allow extra access
-rw-r--r--sigmodr/tree/CMakeLists.txt1
-rw-r--r--sigmodr/tree/RootTreeItem.cpp35
-rw-r--r--sigmodr/tree/RootTreeItem.h38
3 files changed, 74 insertions, 0 deletions
diff --git a/sigmodr/tree/CMakeLists.txt b/sigmodr/tree/CMakeLists.txt
index 63f1ba57..6a39dccb 100644
--- a/sigmodr/tree/CMakeLists.txt
+++ b/sigmodr/tree/CMakeLists.txt
@@ -5,6 +5,7 @@ set(sigmodrtree_HEADERS
SigmodrTree.h
)
set(sigmodrtree_SRCS
+ RootTreeItem.cpp
TreeItem.cpp
AbilityGroupModel.cpp
AbilityModel.cpp
diff --git a/sigmodr/tree/RootTreeItem.cpp b/sigmodr/tree/RootTreeItem.cpp
new file mode 100644
index 00000000..9e55e0e6
--- /dev/null
+++ b/sigmodr/tree/RootTreeItem.cpp
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2009 Ben Boeckel <MathStuf@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+// Header include
+#include "RootTreeItem.h"
+
+// Sigmod includes
+#include <sigmod/Game.h>
+
+using namespace Sigmod;
+using namespace Sigmodr::Tree;
+
+RootTreeItem::RootTreeItem() :
+ TreeItem(GroupGame, NULL, NULL)
+{
+}
+
+void RootTreeItem::addGame(Game* game)
+{
+// m_children.append(new TreeItem(EntryGame, game, this));
+}
diff --git a/sigmodr/tree/RootTreeItem.h b/sigmodr/tree/RootTreeItem.h
new file mode 100644
index 00000000..45959e5a
--- /dev/null
+++ b/sigmodr/tree/RootTreeItem.h
@@ -0,0 +1,38 @@
+/*
+ * Copyright 2009 Ben Boeckel <MathStuf@gmail.com>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef SIGMODRTREE_ROOTTREEITEM
+#define SIGMODRTREE_ROOTTREEITEM
+
+// Sigmodr tree includes
+#include "TreeItem.h"
+
+namespace Sigmodr
+{
+namespace Tree
+{
+class SIGMODRTREE_NO_EXPORT RootTreeItem : public TreeItem
+{
+ public:
+ RootTreeItem();
+
+ void addGame(Sigmod::Game* game);
+};
+}
+}
+
+#endif