00001 #ifndef ROMINFO_H_
00002 #define ROMINFO_H_
00003
00004 #include <qstring.h>
00005
00006 int romInDB(QString rom, QString gametype);
00007
00008 class RomInfo
00009 {
00010 public:
00011 RomInfo(QString lromname = "", QString lsystem = "", QString lgamename ="",
00012 QString lgenre = "", QString lyear = "", bool lfavorite = FALSE,
00013 QString lrompath = "", QString lcountry ="", QString lcrc_value = "",
00014 int ldiskcount = 0, QString lgametype = "", int lromcount = 0,
00015 QString lallsystems = "", QString lpublisher = "", QString lversion = "")
00016 {
00017 romname = lromname;
00018 system = lsystem;
00019 gamename = lgamename;
00020 genre = lgenre;
00021 year = lyear;
00022 favorite = lfavorite;
00023 rompath = lrompath;
00024 country = lcountry;
00025 crc_value = lcrc_value;
00026 diskcount = ldiskcount;
00027 gametype = lgametype;
00028 romcount = lromcount;
00029 allsystems = lallsystems;
00030 publisher = lpublisher;
00031 version = lversion;
00032 }
00033
00034 RomInfo(const RomInfo &lhs)
00035 {
00036 romname = lhs.romname;
00037 system = lhs.system;
00038 gamename = lhs.gamename;
00039 genre = lhs.genre;
00040 year = lhs.year;
00041 favorite = lhs.favorite;
00042 rompath = lhs.rompath;
00043 country = lhs.country;
00044 crc_value = lhs.crc_value;
00045 diskcount = lhs.diskcount;
00046 gametype = lhs.gametype;
00047 romcount = lhs.romcount;
00048 allsystems = lhs.allsystems;
00049 publisher = lhs.publisher;
00050 version = lhs.version;
00051 }
00052
00053 virtual ~RomInfo() {}
00054
00055 bool FindImage(QString BaseFileName, QString *result);
00056
00057 QString Rompath() const { return rompath; }
00058 void setRompath(const QString &lrompath) { rompath = lrompath; }
00059
00060 QString Romname() const { return romname; }
00061 void setRomname(const QString &lromname) { romname = lromname; }
00062
00063 QString System() { return system; }
00064 void setSystem(const QString &lsystem) { system = lsystem; }
00065
00066 QString Gamename() { return gamename; }
00067 void setGamename(const QString &lgamename) { gamename = lgamename; }
00068
00069 QString Genre() { return genre; }
00070 void setGenre(const QString &lgenre) { genre = lgenre; }
00071
00072 QString Country() { return country; }
00073 void setCountry(const QString &lcountry) { country = lcountry; }
00074
00075 QString GameType() { return gametype; }
00076 void setGameType(const QString &lgametype) { gametype = lgametype; }
00077
00078 int RomCount() { return romcount; }
00079 void setRomCount(const int &lromcount) { romcount = lromcount; }
00080
00081 QString AllSystems() { return allsystems; }
00082 void setAllSystems(const QString &lallsystems) { allsystems = lallsystems; }
00083
00084 int DiskCount() { return diskcount; }
00085 void setDiskCount(const int &ldiskcount) { diskcount = ldiskcount; }
00086
00087 QString CRC_VALUE() { return crc_value; }
00088 void setCRC_VALUE(const QString &lcrc_value) { crc_value = lcrc_value; }
00089
00090 QString ImagePath() { return imagepath; }
00091 void setImagePath(const QString &limagepath) { imagepath = limagepath; }
00092
00093 QString Publisher() { return publisher; }
00094 void setPublisher(const QString &lpublisher) { publisher = lpublisher; }
00095
00096 QString Version() { return version; }
00097 void setVersion(const QString &lversion) { version = lversion; }
00098
00099
00100 QString Year() { return year; }
00101 void setYear(const QString &lyear) { year = lyear; }
00102
00103 int Favorite() { return favorite; }
00104 virtual void setFavorite();
00105
00106 QString getExtension();
00107
00108 virtual void setField(QString field, QString data);
00109 virtual void fillData();
00110 virtual void edit_rominfo();
00111
00112 protected:
00113 QString romname;
00114 QString system;
00115 QString gamename;
00116 QString genre;
00117 QString imagepath;
00118 QString country;
00119 QString crc_value;
00120 QString gametype;
00121 QString allsystems;
00122 QString publisher;
00123 QString version;
00124 int romcount;
00125 int diskcount;
00126 QString year;
00127 bool favorite;
00128 QString rompath;
00129 };
00130
00131 bool operator==(const RomInfo& a, const RomInfo& b);
00132
00133 #endif