Go to the documentation of this file.
14 m_dbHostOverride(std::move(DBhostOverride))
16 setLabel(DatabaseSettings::tr(
"Database Configuration"));
22 DatabaseSettings::tr(
"All database settings take effect when "
23 "you restart this program."));
28 DatabaseSettings::tr(
"MythTV could not connect to the database. "
29 "Please verify your database settings "
36 DatabaseSettings::tr(
"The host name or IP address of "
37 "the machine hosting the database. "
38 "This information is required."));
46 DatabaseSettings::tr(
"The port number the database is running "
47 "on. Leave blank if using the default "
55 DatabaseSettings::tr(
"The name of the database. "
56 "This information is required."));
62 DatabaseSettings::tr(
"The user name to use while "
63 "connecting to the database. "
64 "This information is required."));
70 DatabaseSettings::tr(
"The password to use while "
71 "connecting to the database. "
72 "This information is required."));
77 DatabaseSettings::tr(
"Use custom identifier for frontend "
80 DatabaseSettings::tr(
"If this frontend's host name "
81 "changes often, check this box "
82 "and provide a network-unique "
83 "name to identify it. "
84 "If unchecked, the frontend "
85 "machine's local host name will "
86 "be used to save preferences in "
93 DatabaseSettings::tr(
"An identifier to use while "
94 "saving the settings for this "
100 DatabaseSettings::tr(
"Enable database server wakeup"));
102 DatabaseSettings::tr(
"If enabled, the frontend will use "
103 "database wakeup parameters to "
104 "reconnect to the database server."));
110 DatabaseSettings::tr(
"The time in seconds to wait for "
111 "the server to wake up."));
117 DatabaseSettings::tr(
"The number of retries to wake the "
118 "server before the frontend gives "
125 DatabaseSettings::tr(
"The command executed on this "
126 "frontend or server MAC to wake up the database "
127 "server (eg. sudo /etc/init.d/mysql "
128 "restart or 32:D2:86:00:17:A8)."));
142 DatabaseSettings::tr(
"Required fields are"
143 " marked with an asterisk (*)."));
DatabaseSettings(QString DBhostOverride=QString())
QSqlQuery wrapper that fetches a DB connection from the connection pool.
TransTextEditSetting * m_dbHostName
QString m_dbHostName
database server
QString getLabel(void) const
virtual void setValue(const QString &newValue)
Structure containing the basic Database parameters.
bool SaveDatabaseParams(const DatabaseParams ¶ms, bool force=false)
void addTargetedChild(const QString &value, StandardSetting *setting)
QString m_dbType
database type (MySQL, Postgres, etc.)
TransTextEditSetting * m_dbName
TransMythUISpinBoxSetting * m_wolReconnect
TransTextEditSetting * m_localHostName
std::chrono::seconds m_wolReconnect
seconds to wait for reconnect
virtual void addChild(StandardSetting *child)
int m_dbPort
database port
TransTextEditSetting * m_dbPort
bool m_dbHostPing
No longer used.
TransMythUISpinBoxSetting * m_wolRetry
TransTextEditSetting * m_dbPassword
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
virtual void setHelpText(const QString &str)
virtual QString getValue(void) const
QString m_dbPassword
DB password.
int m_wolRetry
times to retry to reconnect
QString m_dbName
database name
bool isConnected(void) const
Only updated once during object creation.
TransTextEditSetting * m_wolCommand
virtual void setLabel(QString str)
QString m_wolCommand
command to use for wake-on-lan
QString m_dbUserName
DB user name.
QString getHelpText(void) const
TransMythUICheckBoxSetting * m_wolEnabled
TransMythUICheckBoxSetting * m_localEnabled
bool m_localEnabled
true if localHostName is not default
~DatabaseSettings() override
bool m_wolEnabled
true if wake-on-lan params are used
void setValue(const QString &newValue) override
QString m_localHostName
name used for loading/saving settings
MythContext * gContext
This global variable contains the MythContext instance for the application.
TransTextEditSetting * m_dbUserName