Logo Search packages:      
Sourcecode: kamefu version File versions

rommetainformation.cpp

/*
    rommetainformation.cpp - Data class used to exchange ROM Meta Information.

    Copyright (c) 2005      by Michaƫl Larouche       <michael.larouche@kdemail.net>

    *************************************************************************
    *                                                                       *
    * 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 2 of the License, or     *
    * (at your option) any later version.                                   *
    *                                                                       *
    *************************************************************************
*/
#include "rommetainformation.h"
#include <kdebug.h>
namespace Kamefu 
{

class RomMetaInformation::Private : public KShared
{
public:
      QString url;
      QString romName;
      QString system;
      QString editor;
      QString md5Hash;
      QString country;
      QString year;
      QString genre;
      QString titlescreenPath;
      QString screenshotPath;
};

00035 RomMetaInformation::RomMetaInformation()
      : d(new Private())
{}

00039 RomMetaInformation::~RomMetaInformation()
{
}

00043 RomMetaInformation::RomMetaInformation(const RomMetaInformation &copy)
 : d(copy.d)
{
//    kdDebug() << k_funcinfo << "Implicit shared copy" << endl;
}

00049 RomMetaInformation &RomMetaInformation::operator=(const RomMetaInformation &other)
{
//    kdDebug() << k_funcinfo << "Implicit shared assignment" << endl;

      d = other.d;
      return *this;
}

00057 bool RomMetaInformation::isValid() const
{
      return !md5Hash().isEmpty() || !url().isEmpty() || !editor().isEmpty();
}

00062 QString RomMetaInformation::url() const
{
      return d->url;
}

00067 void RomMetaInformation::setUrl(const QString &url)
{
      d->url = url;
}

00072 QString RomMetaInformation::romName() const
{
      return d->romName;
}

00077 void RomMetaInformation::setRomName(const QString &romName)
{
      d->romName = romName;
}

00082 QString RomMetaInformation::system() const
{
      return d->system;
}

00087 void RomMetaInformation::setSystem(const QString &system)
{
      d->system = system;
}

00092 QString RomMetaInformation::editor() const
{
      return d->editor;
}

00097 void RomMetaInformation::setEditor(const QString &editor)
{
      d->editor = editor;
}

00102 QString RomMetaInformation::md5Hash() const
{
      return d->md5Hash;
}

00107 void RomMetaInformation::setMd5Hash(const QString &md5Hash)
{
      d->md5Hash = md5Hash;
}

00112 QString RomMetaInformation::year() const
{
      return d->year;
}

00117 void RomMetaInformation::setYear(const QString &year)
{
      d->year = year;
}

00122 QString RomMetaInformation::country() const
{
      return d->country;
}

00127 void RomMetaInformation::setCountry(const QString &country)
{
      d->country = country;
}

00132 QString RomMetaInformation::genre() const
{
      return d->genre;
}

void RomMetaInformation::setGenre(const QString &genre)
{
      d->genre = genre;
}

00142 QString RomMetaInformation::titlescreenPath() const
{
      return d->titlescreenPath;
}

00147 void RomMetaInformation::setTitlescreenPath(const QString &titlescreenPath)
{
      d->titlescreenPath = titlescreenPath;
}

00152 QString RomMetaInformation::screenshotPath() const
{
      return d->screenshotPath;
}

00157 void RomMetaInformation::setScreenshotPath(const QString &screenshotPath)
{
      d->screenshotPath = screenshotPath;
}

}

Generated by  Doxygen 1.6.0   Back to index