Go to the documentation of this file. 1 #ifndef CHANNELSETTINGS_H
2 #define CHANNELSETTINGS_H
24 QString table =
"channel") :
37 QString querystr = QString(
"SELECT %1 FROM %2 WHERE %3='%4'")
47 querystr = QString(
"INSERT INTO %1 (%2) VALUES ('%3')")
56 LOG(VB_GENERAL, LOG_ERR, QString(
"ChannelID, Error: ") +
57 QString(
"Failed to insert into: %1").arg(
m_table));
67 QString querystr = QString(
"SELECT %1 FROM %2")
80 if (tmpfloor <= query.
value(0).toInt())
81 tmpfloor = query.
value(0).toInt() + 1;
83 return floor<tmpfloor?tmpfloor:floor;
131 uint default_sourceid,
bool add_freqid);
134 static void onAirGuideChanged(
bool fValue);
135 void sourceChanged(
const QString &sourceid);
168 void Load(
void)
override;
169 void Save(
void)
override;
175 std::vector<TransTextEditSetting*>
m_pids;
176 std::vector<TransMythUIComboBoxSetting*>
m_sids;
177 std::vector<TransMythUICheckBoxSetting*>
m_pcrs;
179 static const uint kMaxPIDs = 10;
188 static QStringList GetFormats(
void);
191 #endif //CHANNELEDITOR_H
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.
virtual void setValue(const QString &newValue)
std::vector< TransTextEditSetting * > m_pids
const QString & getField(void) const
QVariant value(int i) const
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
QString GetWhereClause(MSqlBindings &bindings) const override
IPTVChannelDBStorage(StorageUser *_user, const ChannelID &_id, const QString &_name)
static MSqlQueryInfo InitCon(ConnectionReuse _reuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
static void DBError(const QString &where, const MSqlQuery &query)
virtual QString getValue(void) const
QString GetWhereClause(MSqlBindings &bindings) const override
QString GetSetClause(MSqlBindings &bindings) const override
std::vector< TransMythUIComboBoxSetting * > m_sids
void setVisible(bool visible)
int numRowsAffected() const
std::vector< TransMythUICheckBoxSetting * > m_pcrs
ChannelDBStorage(StorageUser *_user, const ChannelID &_id, const QString &_name)
ChannelID(QString field="chanid", QString table="channel")
int findHighest(int floor=1000)
virtual void Save(const QString &)
QString GetSetClause(MSqlBindings &bindings) const override
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.