00001 #include <qstring.h>
00002
00003 #include <mythtv/mythcontext.h>
00004
00005 #include "romedit.h"
00006
00007 class Gamename : public LineEditSetting, public ROMDBStorage
00008 {
00009 public:
00010 Gamename(const QString &romname) :
00011 LineEditSetting(this), ROMDBStorage(this, "gamename", romname)
00012 {
00013 setLabel(QObject::tr("Game Name"));
00014 setHelpText(QObject::tr("Friendly name of this Game."));
00015 }
00016 };
00017
00018 class Genre : public LineEditSetting, public ROMDBStorage
00019 {
00020 public:
00021 Genre(const QString &romname) :
00022 LineEditSetting(this), ROMDBStorage(this, "genre", romname)
00023 {
00024 setLabel(QObject::tr("Genre"));
00025 setHelpText(QObject::tr("Genre/Category this game falls under."));
00026 }
00027 };
00028
00029 class Year : public LineEditSetting, public ROMDBStorage
00030 {
00031 public:
00032 Year(const QString &romname) :
00033 LineEditSetting(this), ROMDBStorage(this, "year", romname)
00034 {
00035 setLabel(QObject::tr("Year"));
00036 setHelpText(QObject::tr("The Year the game was released."));
00037 }
00038 };
00039
00040 class Country : public LineEditSetting, public ROMDBStorage
00041 {
00042 public:
00043 Country(const QString &romname) :
00044 LineEditSetting(this), ROMDBStorage(this, "country", romname)
00045 {
00046 setLabel(QObject::tr("Country"));
00047 setHelpText(QObject::tr("The Country this game was "
00048 "originally distributed in."));
00049 }
00050 };
00051
00052 class Publisher : public LineEditSetting, public ROMDBStorage
00053 {
00054 public:
00055 Publisher(const QString &romname) :
00056 LineEditSetting(this), ROMDBStorage(this, "publisher", romname)
00057 {
00058 setLabel(QObject::tr("Publisher"));
00059 setHelpText(QObject::tr("The Company that made and "
00060 "published this game."));
00061 }
00062 };
00063
00064
00065 class Favourite : public CheckBoxSetting, public ROMDBStorage
00066 {
00067 public:
00068 Favourite(const QString &romname) :
00069 CheckBoxSetting(this), ROMDBStorage(this, "favorite", romname)
00070 {
00071 setLabel(QObject::tr("Favorite"));
00072 setHelpText(QObject::tr("ROM status as a Favorite"));
00073 }
00074 };
00075
00076 GameEditDialog::GameEditDialog(const QString &romname)
00077 {
00078 QString title = QObject::tr("Editing Metadata - ") + romname;
00079
00080 VerticalConfigurationGroup *group =
00081 new VerticalConfigurationGroup(false);
00082
00083 group->setLabel(title);
00084 group->addChild(new Gamename(romname));
00085 group->addChild(new Genre(romname));
00086 group->addChild(new Year(romname));
00087 group->addChild(new Country(romname));
00088 group->addChild(new Publisher(romname));
00089 group->addChild(new Favourite(romname));
00090 addChild(group);
00091 }
00092
00093