summaryrefslogtreecommitdiffstats
path: root/pokemodr/models/AbilityEffectModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'pokemodr/models/AbilityEffectModel.cpp')
-rw-r--r--pokemodr/models/AbilityEffectModel.cpp89
1 files changed, 89 insertions, 0 deletions
diff --git a/pokemodr/models/AbilityEffectModel.cpp b/pokemodr/models/AbilityEffectModel.cpp
new file mode 100644
index 00000000..f284754e
--- /dev/null
+++ b/pokemodr/models/AbilityEffectModel.cpp
@@ -0,0 +1,89 @@
+/*
+ * Copyright 2008 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/>.
+ */
+
+// Pokemod includes
+#include <Pokemod.h>
+
+// Header include
+#include "AbilityEffectModel.h"
+
+AbilityEffectModel::AbilityEffectModel(BaseModel* parent, Object* object) :
+ ObjectModel(parent, object)
+{
+}
+
+AbilityEffectModel::~AbilityEffectModel()
+{
+ // TODO: destruct
+}
+
+QVariant AbilityEffectModel::data(int role) const
+{
+ if (role == Qt::DisplayRole)
+ return AbilityEffect::EffectStr[static_cast<AbilityEffect*>(m_object)->effect()];
+ else if (role == Qt::UserRole)
+ {
+// QWidget* widget = new AbilityEffectUI(static_cast<AbilityEffect*>(m_object), NULL);
+// return QVariant::fromValue(widget);
+ }
+ return QVariant();
+}
+
+int AbilityEffectModel::rowCount() const
+{
+ return 0;
+}
+
+bool AbilityEffectModel::setData(const QVariant& value, int role)
+{
+ // TODO: set data
+}
+
+BaseModel* AbilityEffectModel::childItem(const int /*row*/)
+{
+ return NULL;
+}
+
+int AbilityEffectModel::indexNumber() const
+{
+ // TODO: get effect index
+}
+
+bool AbilityEffectModel::canInsertRows() const
+{
+ return false;
+}
+
+bool AbilityEffectModel::insertRows(const int /*rows*/)
+{
+ return false;
+}
+
+bool AbilityEffectModel::canRemoveRows() const
+{
+ return false;
+}
+
+bool AbilityEffectModel::removeRows(const int /*position*/, const int /*rows*/)
+{
+ return false;
+}
+
+// bool AbilityEffectModel::dropMimeData(const QMimeData* data, Qt::DropAction action, int row, int column)
+// {
+// // TODO: drag/drop
+// }