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 (*)."));
200 GetMythDB()->SaveDatabaseParams(params,
false);
Structure containing the basic Database parameters.
QString m_dbName
database name
QString m_dbPassword
DB password.
std::chrono::seconds m_wolReconnect
seconds to wait for reconnect
QString m_localHostName
name used for loading/saving settings
bool m_localEnabled
true if localHostName is not default
bool m_dbHostPing
No longer used.
QString m_dbUserName
DB user name.
QString m_dbType
database type (MySQL, Postgres, etc.)
QString m_wolCommand
command to use for wake-on-lan
bool m_wolEnabled
true if wake-on-lan params are used
int m_dbPort
database port
int m_wolRetry
times to retry to reconnect
QString m_dbHostName
database server
TransMythUISpinBoxSetting * m_wolRetry
TransTextEditSetting * m_localHostName
TransTextEditSetting * m_dbName
DatabaseSettings(QString DBhostOverride=QString())
TransTextEditSetting * m_dbPassword
TransTextEditSetting * m_dbHostName
TransTextEditSetting * m_dbUserName
TransMythUISpinBoxSetting * m_wolReconnect
TransMythUICheckBoxSetting * m_localEnabled
~DatabaseSettings() override
TransMythUICheckBoxSetting * m_wolEnabled
TransTextEditSetting * m_dbPort
TransTextEditSetting * m_wolCommand
QSqlQuery wrapper that fetches a DB connection from the connection pool.
bool isConnected(void) const
Only updated once during object creation.
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
void setValue(const QString &newValue) override
virtual void addChild(StandardSetting *child)
QString getHelpText(void) const
void addTargetedChild(const QString &value, StandardSetting *setting)
virtual void setHelpText(const QString &str)
QString getLabel(void) const
virtual void setValue(const QString &newValue)
virtual QString getValue(void) const
virtual void setLabel(QString str)