MythTV master
expertsettingseditor.h
Go to the documentation of this file.
1#ifndef EXPERTSETTINGSEDITOR_H
2#define EXPERTSETTINGSEDITOR_H
3
7
9{
10 Q_OBJECT
11
12 public:
13 ExpertSettingsEditor(MythScreenStack *parent, const char *name = nullptr)
14 : RawSettingsEditor(parent, name)
15 {
17
18 query.prepare("SELECT value, data "
19 "FROM settings "
20 "WHERE hostname = :HOSTNAME");
21 query.bindValue(":HOSTNAME", gCoreContext->GetHostName());
22
23 if (query.exec())
24 {
25 while (query.next())
26 {
27 m_settings[query.value(0).toString()] =
28 query.value(0).toString();
29 }
30 }
31
32 m_title = tr("Expert Settings Editor");
33 m_settings["EventCmdRecPending"] = tr("Recording Pending");
34 }
35};
36
37#endif
38
ExpertSettingsEditor(MythScreenStack *parent, const char *name=nullptr)
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:128
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:837
QVariant value(int i) const
Definition: mythdbcon.h:204
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:618
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:888
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:812
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:550
QString GetHostName(void)
An editor screen that allows manipulation of raw settings values.
QMap< QString, QString > m_settings
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.