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."));
44 DatabaseSettings::tr(
"Test basic host connectivity using "
45 "the ping command. Turn off if your "
46 "host or network don't support ping "
47 "(ICMP ECHO) packets"));
53 DatabaseSettings::tr(
"The port number the database is running "
54 "on. Leave blank if using the default "
62 DatabaseSettings::tr(
"The name of the database. "
63 "This information is required."));
69 DatabaseSettings::tr(
"The user name to use while "
70 "connecting to the database. "
71 "This information is required."));
77 DatabaseSettings::tr(
"The password to use while "
78 "connecting to the database. "
79 "This information is required."));
84 DatabaseSettings::tr(
"Use custom identifier for frontend "
87 DatabaseSettings::tr(
"If this frontend's host name "
88 "changes often, check this box "
89 "and provide a network-unique "
90 "name to identify it. "
91 "If unchecked, the frontend "
92 "machine's local host name will "
93 "be used to save preferences in "
100 DatabaseSettings::tr(
"An identifier to use while "
101 "saving the settings for this "
107 DatabaseSettings::tr(
"Enable database server wakeup"));
109 DatabaseSettings::tr(
"If enabled, the frontend will use "
110 "database wakeup parameters to "
111 "reconnect to the database server."));
117 DatabaseSettings::tr(
"The time in seconds to wait for "
118 "the server to wake up."));
124 DatabaseSettings::tr(
"The number of retries to wake the "
125 "server before the frontend gives "
132 DatabaseSettings::tr(
"The command executed on this "
133 "frontend or server MAC to wake up the database "
134 "server (eg. sudo /etc/init.d/mysql "
135 "restart or 32:D2:86:00:17:A8)."));
149 DatabaseSettings::tr(
"Required fields are"
150 " 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
Can we test connectivity using ping?
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)
TransMythUICheckBoxSetting * m_dbHostPing
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