Go to the documentation of this file. 1 #include <QCoreApplication>
16 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"OTHER"),
"OTHER",
"" },
17 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"AMIGA"),
"AMIGA",
"adf,ipf" },
18 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"ATARI"),
"ATARI",
"bin,a26" },
19 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"GAMEGEAR"),
"GAMEGEAR",
"gg" },
20 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"GENESIS/MEGADRIVE"),
"GENESIS",
"smd,bin,md" },
21 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"MAME"),
"MAME",
"" },
22 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"N64"),
"N64",
"v64,n64" },
23 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"NES"),
"NES",
"zip,nes" },
24 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"PC GAME"),
"PC",
"" },
25 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"PCE/TG16"),
"PCE",
"pce" },
26 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"SEGA/MASTER SYSTEM"),
"SEGA",
"sms" },
27 { QT_TRANSLATE_NOOP(
"(GameTypes)",
"SNES"),
"SNES",
"zip,smc,sfc,fig,swc" }
32 auto sametype = [
GameType](
const auto & console)
33 {
return console.m_idStr ==
GameType; };
36 ? QCoreApplication::translate(
"(GameTypes)", con->m_nameStr.toUtf8())
42 auto sametype = [
GameType](
const auto & console)
43 {
return console.m_idStr ==
GameType; };
45 return (con !=
GameTypeList.cend()) ? con->m_extensions :
"";
52 #define TR GameGeneralSettings::tr
57 gc->setLabel(
TR(
"Game display order"));
58 gc->setValue(
"system gamename");
59 gc->setHelpText(
TR(
"Order in which to sort the "
60 "games - this is for all "
61 "systems. Available choices: "
62 "system, year, genre and "
70 gc->setLabel(
TR(
"Favorite display order"));
71 gc->setValue(
"gamename");
72 gc->setHelpText(
TR(
"Order in which to sort the "
73 "games marked as favorites "
74 "- this is for all systems. "
75 "Available choices: system, "
76 "year, genre and gamename"));
83 gc->setLabel(
TR(
"Indepth Game Scan"));
85 TR(
"Enabling this causes a game scan to "
86 "gather CRC values and attempt to find out "
87 "more detailed information about the game: "
88 "NOTE this can greatly increase the time a "
89 "game scan takes based on the amount of "
97 gc->setLabel(
TR(
"Prompt for removal of deleted ROM(s)"));
98 gc->setHelpText(
TR(
"This enables a prompt for "
99 "removing deleted ROMs from "
100 "the database during a game "
109 gc->setLabel(
TR(
"Display Files Names in Game "
111 gc->setHelpText(
TR(
"Enabling this causes the "
112 "filenames to be displayed in "
113 "the game tree rather than the "
114 "trimmed/looked up game name"));
121 gc->setLabel(
TR(
"Hash filenames in display"));
123 gc->setHelpText(
TR(
"Enable hashing of names in "
124 "the display tree. This can "
125 "make navigating long lists "
133 gc->setLabel(
TR(
"Directory where Game Screenshots "
135 gc->setValue(
GetConfDir() +
"/MythGame/Screenshots");
136 gc->setHelpText(
TR(
"This directory will be the "
137 "default browse location when "
138 "assigning screenshots."));
145 gc->setLabel(
TR(
"Directory where Game Fanart is "
147 gc->setValue(
GetConfDir() +
"/MythGame/Fanart");
148 gc->setHelpText(
TR(
"This directory will be the "
149 "default browse location when "
150 "assigning fanart."));
157 gc->setLabel(
TR(
"Directory where Game Boxart is "
159 gc->setValue(
GetConfDir() +
"/MythGame/Boxart");
160 gc->setHelpText(
TR(
"This directory will be the "
161 "default browse location when "
162 "assigning boxart."));
168 setLabel(tr(
"MythGame Settings -- General"));
184 #define TR GamePlayerSetting::tr
196 bindings.insert(
":PLAYERID",
m_id.
Value());
197 return "gameplayerid = :PLAYERID";
202 bindings.insert(
":SETPLAYERID",
m_id.
Value());
204 return QString(
"gameplayerid = :SETPLAYERID, "
233 setHelpText(
TR(
"Binary and optional parameters. Multiple commands "
234 "separated with \';\' . Use \%s for the ROM name. "
235 "\%d1, \%d2, \%d3 and \%d4 represent disks in a "
236 "multidisk/game. %s auto appended if not specified"));
250 console.m_nameStr.toUtf8()),
254 setHelpText(
TR(
"Type of Game/Emulator. Mostly for informational "
255 "purposes and has little effect on the "
256 "function of your system."));
266 setHelpText(
TR(
"Location of the ROM files for this emulator"));
276 setHelpText(
TR(
"Directory to change to before launching emulator. "
277 "Blank is usually fine"));
287 setHelpText(
TR(
"A comma separated list of all file extensions for this "
288 "emulator. Blank means any file under ROM PATH is "
289 "considered to be used with this emulator"));
298 setLabel(
TR(
"Allow games to span multiple ROMs/disks"));
299 setHelpText(
TR(
"This setting means that we will look for items like "
300 "game.1.rom, game.2.rom and consider them a single game."));
312 nameChild->setValue(name);
334 "WHERE gameplayerid = :PLAYERID");
359 QString playerDisp = tr(
"%1 (%2)",
"Game player/emulator display");
362 query.
prepare(
"SELECT gameplayerid, playername, gametype "
364 "WHERE playername <> '' "
365 "ORDER BY playername;");
393 if (nameDialog->Create())
411 if (child->getName() == name)
413 LOG(VB_GENERAL, LOG_ERR,
414 QString(
"Player name %1 is already used").
arg(name));
Extensions(const PlayerId &parent)
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
bool isActive(void) const
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
QSqlQuery wrapper that fetches a DB connection from the connection pool.
QString GetGameTypeName(const QString &GameType)
virtual void setName(const QString &name)
QString GetSetClause(MSqlBindings &bindings) const override
Game player database table reader/writer.
RomPath(const PlayerId &parent)
void NewPlayerDialog() const
AllowMultipleRoms(const PlayerId &parent)
QVariant value(int i) const
arg(title).arg(filename).arg(doDelete))
QString GetColumnName(void) const
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
GameType(const PlayerId &parent)
virtual void clearSettings()
virtual QString GetDBValue(void) const =0
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
static HostTextEditSetting * GameFavTreeLevels()
void CreateNewPlayer(const QString &name)
static HostCheckBoxSetting * GameShowFileNames()
static HostTextEditSetting * GetBoxartDir()
virtual void addChild(StandardSetting *child)
virtual QList< StandardSetting * > * getSubSettings()
QString GetWhereClause(MSqlBindings &bindings) const override
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
static void DBError(const QString &where, const MSqlQuery &query)
virtual void setHelpText(const QString &str)
void deleteEntry() override
static HostCheckBoxSetting * GameRemovalPrompt()
virtual void setLabel(QString str)
static HostTextEditSetting * GetFanartDir()
void addSelection(const QString &label, QString value=QString(), bool select=false)
static HostCheckBoxSetting * GameDeepScan()
Base for Game textual settings.
Command(const PlayerId &parent)
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
static HostTextEditSetting * GameAllTreeLevels()
MythMainWindow * GetMythMainWindow(void)
MythScreenStack * GetStack(const QString &Stackname)
void setVisible(bool visible)
const std::array< GameTypes, 12 > GameTypeList
TextEdit(const PlayerId &parent, const QString &column)
static HostCheckBoxSetting * GameTreeView()
Dialog prompting the user to enter a text string.
GamePlayerSetting(const QString &name, uint id=0)
Settings for a game player.
GameDBStorage(StorageUser *user, const PlayerId &id, const QString &name)
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
Name(const PlayerId &parent)
MSqlQuery query(MSqlQuery::InitCon())
static HostTextEditSetting * GetScreenshotDir()
WorkingDirPath(const PlayerId &parent)
void setValue(int value) override
QString GetGameTypeExtensions(const QString &GameType)
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.