From 1fe11fc794783370d8a03a93979b27508278b113 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Wed, 27 Aug 2008 04:26:53 +0000 Subject: [FIX] Fixed method in SoundWrapper to be more accurate [FIX] QImage is now used internally instead of QPixmap [FIX] Template specialization moved to header file for Object (makes MinGW happy) git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@246 6ecfd1a5-f3ed-3746-8530-beee90d26b22 --- pokemod/Object.cpp | 114 ----------------------------------------------------- 1 file changed, 114 deletions(-) (limited to 'pokemod/Object.cpp') diff --git a/pokemod/Object.cpp b/pokemod/Object.cpp index b0fb3b64..ce2425d8 100644 --- a/pokemod/Object.cpp +++ b/pokemod/Object.cpp @@ -19,15 +19,7 @@ #include "Object.h" // Pokemod includes -#include "Fraction.h" #include "Macros.h" -#include "Script.h" - -// Qt includes -#include -#include -#include -#include Pokemod::Object::Object(const Object& object) : QObject(NULL), @@ -100,109 +92,3 @@ QString Pokemod::Object::subclass(const QString& subclass, const QString& name) void Pokemod::Object::clear() { } - -namespace Pokemod -{ -template<> void Object::loadValue(const QDomElement& xml, bool* value) -{ - *value = (xml.firstChild().toText().data() == "true"); -} - -template<> void Object::loadValue(const QDomElement& xml, int* value) -{ - *value = xml.firstChild().toText().data().toInt(); -} - -template<> void Object::loadValue(const QDomElement& xml, Fraction* value) -{ - value->set(xml.attribute("numerator", "1").toInt(), xml.attribute("denominator", "1").toInt()); -} - -template<> void Object::loadValue(const QDomElement& xml, QPoint* value) -{ - value->setX(xml.attribute("x", "0").toInt()); - value->setY(xml.attribute("y", "0").toInt()); -} - -template<> void Object::loadValue(const QDomElement& xml, QPixmap* value) -{ - // FIXME: QPixmap::fromData static member would be nice - *value = QPixmap::fromImage(QImage::fromData(QByteArray::fromBase64(xml.firstChild().toText().data().toUtf8()))); -} - -template<> void Object::loadValue(const QDomElement& xml, QByteArray* value) -{ - *value = QByteArray::fromBase64(xml.firstChild().toText().data().toUtf8()); -} - -template<> void Object::loadValue