MythTV  master
channelsettings.cpp
Go to the documentation of this file.
1 // C/C++ headers
2 #include <utility>
3 
4 // Qt headers
5 #include <QCoreApplication>
6 #include <QFile>
7 #include <QWidget>
8 
9 // MythTV headers
10 #include "channelsettings.h"
11 #include "channelutil.h"
12 #include "programinfo.h" // for COMM_DETECT*, GetPreferredSkipTypeCombinations()
13 #include "mpegtables.h"
14 #include "mythdirs.h"
15 #include "cardutil.h"
16 
17 
19 {
20  QString fieldTag = (":WHERE" + m_id.getField().toUpper());
21  QString query(m_id.getField() + " = " + fieldTag);
22 
23  bindings.insert(fieldTag, m_id.getValue());
24 
25  return query;
26 }
27 
29 {
30  QString fieldTag = (":SET" + m_id.getField().toUpper());
31  QString nameTag = (":SET" + GetColumnName().toUpper());
32 
33  QString query(m_id.getField() + " = " + fieldTag + ", " +
34  GetColumnName() + " = " + nameTag);
35 
36  bindings.insert(fieldTag, m_id.getValue());
37  bindings.insert(nameTag, m_user->GetDBValue());
38 
39  return query;
40 }
41 
42 /*****************************************************************************
43  Channel Options - Common
44  *****************************************************************************/
45 
47 {
48  public:
49  explicit Name(const ChannelID &id) :
50  MythUITextEditSetting(new ChannelDBStorage(this, id, "name"))
51  {
52  setLabel(QCoreApplication::translate("(Common)", "Channel Name"));
53  }
54 };
55 
57 {
58  public:
59  explicit Channum(const ChannelID &id) :
60  MythUITextEditSetting(new ChannelDBStorage(this, id, "channum"))
61  {
62  setLabel(QCoreApplication::translate("(Common)", "Channel Number"));
63  setHelpText(QCoreApplication::translate("(Common)",
64  "This is the number by which the channel is known to MythTV."));
65  }
66 };
67 
69 {
70  public:
71  Source(const ChannelID &id, uint _default_sourceid) :
72  MythUIComboBoxSetting(new ChannelDBStorage(this, id, "sourceid")),
73  m_defaultSourceId(_default_sourceid)
74  {
75  setLabel(QCoreApplication::translate("(Common)", "Video Source"));
76  setHelpText(QCoreApplication::translate("(Common)",
77  "It is NOT a good idea to change this value as it only changes "
78  "the sourceid in table channel but not in dtv_multiplex. "
79  "The sourceid in dtv_multiplex cannot and should not be changed."));
80  }
81 
82  void Load(void) override // StandardSetting
83  {
86 
87  if (m_defaultSourceId && (getValue().toUInt() == 0U))
88  {
90  if (which)
91  setValue(which);
92  }
93  }
94 
95  void fillSelections(void)
96  {
97  addSelection(QCoreApplication::translate("(ChannelSettings)",
98  "[Not Selected]"), "0");
99 
100  MSqlQuery query(MSqlQuery::InitCon());
101  query.prepare("SELECT name, sourceid "
102  "FROM videosource "
103  "ORDER BY sourceid");
104 
105  if (!query.exec() || !query.isActive())
106  {
107  MythDB::DBError("Source::fillSelections", query);
108  }
109  else
110  {
111  for (uint i = 1; query.next(); i++)
112  {
113  m_sourceIdToIndex[query.value(1).toUInt()] = i;
114  addSelection(query.value(0).toString(),
115  query.value(1).toString());
116  }
117  }
118 
119  m_sourceIdToIndex[0] = 0; // Not selected entry.
120  }
121 
122  private:
124  QMap<uint,uint> m_sourceIdToIndex;
125 };
126 
128 {
129  public:
130  explicit Callsign(const ChannelID &id) :
131  MythUITextEditSetting(new ChannelDBStorage(this, id, "callsign"))
132  {
133  setLabel(QCoreApplication::translate("(Common)", "Callsign"));
134  }
135 };
136 
138  MythUIComboBoxSetting(new ChannelDBStorage(this, id, "tvformat"))
139 {
140  setLabel(QCoreApplication::translate("(ChannelSettings)", "TV Format"));
141  setHelpText(QCoreApplication::translate("(ChannelSettings)",
142  "If this channel uses a format other than TV Format in the General "
143  "Backend Setup screen, set it here."));
144 
145  addSelection(QCoreApplication::translate("(Common)", "Default"), "Default");
146 
147  QStringList list = GetFormats();
148  for (int i = 0; i < list.size(); i++)
149  addSelection(list[i]);
150 }
151 
153 {
154  QStringList list;
155 
156  list.push_back("NTSC");
157  list.push_back("NTSC-JP");
158  list.push_back("PAL");
159  list.push_back("PAL-60");
160  list.push_back("PAL-BG");
161  list.push_back("PAL-DK");
162  list.push_back("PAL-D");
163  list.push_back("PAL-I");
164  list.push_back("PAL-M");
165  list.push_back("PAL-N");
166  list.push_back("PAL-NC");
167  list.push_back("SECAM");
168  list.push_back("SECAM-D");
169  list.push_back("SECAM-DK");
170 
171  return list;
172 }
173 
175 {
176  public:
177  explicit TimeOffset(const ChannelID &id) :
178  MythUISpinBoxSetting(new ChannelDBStorage(this, id, "tmoffset"),
179  -1440, 1440, 1)
180  {
181  setLabel(QCoreApplication::translate("(ChannelSettings)",
182  "DataDirect Time Offset"));
183 
184  setHelpText(QCoreApplication::translate("(ChannelSettings)",
185  "Offset (in minutes) to apply to the program guide data during "
186  "import. This can be used when the listings for a particular "
187  "channel are in a different time zone."));
188  }
189 };
190 
192 {
193  public:
194  explicit Priority(const ChannelID &id) :
195  MythUISpinBoxSetting(new ChannelDBStorage(this, id, "recpriority"),
196  -99, 99, 1)
197  {
198  setLabel(QCoreApplication::translate("(ChannelSettings)", "Priority"));
199 
200  setHelpText(QCoreApplication::translate("(ChannelSettings)",
201  "Number of priority points to be added to any recording on this "
202  "channel during scheduling. Use a positive number as the priority "
203  "if you want this to be a preferred channel, a negative one to "
204  "depreciate this channel."));
205  }
206 };
207 
209 {
210  public:
211  explicit Icon(const ChannelID &id) :
212  MythUITextEditSetting(new ChannelDBStorage(this, id, "icon"))
213  {
214  setLabel(QCoreApplication::translate("(ChannelSettings)", "Icon"));
215 
216  setHelpText(QCoreApplication::translate("(ChannelSettings)",
217  "Image file to use as the icon for this channel on various MythTV "
218  "displays."));
219  }
220 };
221 
223 {
224  public:
225  explicit VideoFilters(const ChannelID &id) :
226  MythUITextEditSetting(new ChannelDBStorage(this, id, "videofilters"))
227  {
228  setLabel(QCoreApplication::translate("(ChannelSettings)",
229  "Video filters"));
230 
231  setHelpText(QCoreApplication::translate("(ChannelSettings)",
232  "Filters to be used when recording from this channel. Not used "
233  "with hardware encoding cards."));
234 
235  }
236 };
237 
238 
240 {
241  public:
242  explicit OutputFilters(const ChannelID &id) :
243  MythUITextEditSetting(new ChannelDBStorage(this, id, "outputfilters"))
244  {
245  setLabel(QCoreApplication::translate("(ChannelSettings)",
246  "Playback filters"));
247 
248  setHelpText(QCoreApplication::translate("(ChannelSettings)",
249  "Filters to be used when recordings from this channel are viewed. "
250  "Start with a plus to append to the global playback filters."));
251  }
252 };
253 
255 {
256  public:
257  XmltvID(const ChannelID &id, QString _sourceName) :
258  MythUIComboBoxSetting(new ChannelDBStorage(this, id, "xmltvid"), true),
259  m_sourceName(std::move(_sourceName))
260  {
261  setLabel(QCoreApplication::translate("(Common)", "XMLTV ID"));
262 
263  setHelpText(QCoreApplication::translate("(ChannelSettings)",
264  "ID used by listing services to get an exact correspondence "
265  "between a channel in your line-up and a channel in their "
266  "database. Normally this is set automatically when "
267  "'mythfilldatabase' is run."));
268  }
269 
270  void Load(void) override // StandardSetting
271  {
272  fillSelections();
274  }
275 
276  void fillSelections(void)
277  {
278  clearSelections();
279 
280  QString xmltvFile = GetConfDir() + '/' + m_sourceName + ".xmltv";
281 
282  if (QFile::exists(xmltvFile))
283  {
284  QFile file(xmltvFile);
285  if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
286  return;
287 
288  QStringList idList;
289 
290  while (!file.atEnd())
291  {
292  QByteArray line = file.readLine();
293 
294  if (line.startsWith("channel="))
295  {
296  QString id = line.mid(8, -1).trimmed();
297  idList.append(id);
298  }
299  }
300 
301  idList.sort();
302 
303  for (int x = 0; x < idList.size(); x++)
304  addSelection(idList.at(x), idList.at(x));
305  }
306  }
307 
308  private:
309  QString m_sourceName;
310 };
311 
313 {
314  public:
315  explicit ServiceID(const ChannelID &id)
316  : MythUISpinBoxSetting(new ChannelDBStorage(this, id, "serviceid"),
317  -1, UINT16_MAX, 1, 1, "NULL")
318  {
319  setLabel(QCoreApplication::translate("(ChannelSettings)", "Service ID"));
320 
321  setHelpText(QCoreApplication::translate("(ChannelSettings)",
322  "Service ID (Program Number) of desired channel within the transport stream. "
323  "If there is only one channel, then setting this to anything will still find it."));
324  }
325 
326  void Load(void) override // StandardSetting
327  {
329 
330  if (getValue().isNull())
331  setValue("-1");
332  }
333 
334  QString getValue(void) const override // StandardSetting
335  {
336  if (StandardSetting::getValue().toInt() == -1)
337  return QString();
338  return StandardSetting::getValue();
339  }
340 };
341 
342 // Transport ID in Channel Options
344 {
345  public:
347  {
348  setLabel(QObject::tr("Transport ID"));
349  setHelpText(
350  QObject::tr("The transport stream ID (tid) can be used to identify "
351  "the transport of this channel in the Transport Editor."));
352  }
353 };
354 
355 // Frequency in Channel Options
357 {
358  public:
360  {
361  setLabel(QObject::tr("Frequency"));
362  setHelpText(
363  QObject::tr("Frequency of the transport of this channel in Hz "
364  "(for DVB-T/T2 and DVB-C) or in kHz (for DVB-S/S2)."));
365  }
366 };
367 
369 {
370  public:
371  explicit CommMethod(const ChannelID &id) :
372  MythUIComboBoxSetting(new ChannelDBStorage(this, id, "commmethod"))
373  {
374  setLabel(QCoreApplication::translate("(ChannelSettings)",
375  "Commercial Detection Method"));
376 
377  setHelpText(QCoreApplication::translate("(ChannelSettings)",
378  "Changes the method of commercial detection used for recordings on "
379  "this channel or skips detection by marking the channel as "
380  "Commercial Free."));
381 
382  deque<int> tmp = GetPreferredSkipTypeCombinations();
383  tmp.push_front(COMM_DETECT_UNINIT);
384  tmp.push_back(COMM_DETECT_COMMFREE);
385 
386  for (size_t i = 0; i < tmp.size(); i++)
387  addSelection(SkipTypeToString(tmp[i]), QString::number(tmp[i]));
388  }
389 };
390 
392 {
393  public:
394  explicit Visible(const ChannelID &id) :
395  MythUICheckBoxSetting(new ChannelDBStorage(this, id, "visible"))
396  {
397  setValue(true);
398 
399  setLabel(QCoreApplication::translate("(ChannelSettings)", "Visible"));
400 
401  setHelpText(QCoreApplication::translate("(ChannelSettings)",
402  "If enabled, the channel will be visible in the EPG."));
403  }
404 };
405 
407 {
408  public:
409  explicit OnAirGuide(const ChannelID &id) :
410  MythUICheckBoxSetting(new ChannelDBStorage(this, id, "useonairguide"))
411  {
412  setLabel(QCoreApplication::translate("(ChannelSettings)",
413  "Use on air guide"));
414 
415  setHelpText(QCoreApplication::translate("(ChannelSettings)",
416  "If enabled, guide information for this channel will be updated "
417  "using 'Over-the-Air' program listings."));
418  }
419 };
420 
421 /*****************************************************************************
422  Channel Options - Video 4 Linux
423  *****************************************************************************/
424 
426 {
427  public:
428  explicit Freqid(const ChannelID &id) :
429  MythUITextEditSetting(new ChannelDBStorage(this, id, "freqid"))
430  {
431  setLabel(QCoreApplication::translate("(ChannelSettings)",
432  "Freq/Channel"));
433  setHelpText(QCoreApplication::translate("(ChannelSettings)",
434  "N.B. This setting is only used for analog channels. "
435  "Depending on the tuner type, specify either the exact "
436  "frequency (in kHz) or a valid channel "
437  "number that will be understood by your tuners."));
438  }
439 };
440 
442 {
443  public:
444  explicit Finetune(const ChannelID& id)
445  : MythUISpinBoxSetting(new ChannelDBStorage(this, id, "finetune"),
446  -300, 300, 1)
447  {
448  setLabel(QCoreApplication::translate("(ChannelSettings)",
449  "Finetune (kHz)"));
450 
451  setHelpText(QCoreApplication::translate("(ChannelSettings)",
452  "Value to be added to your desired frequency (in kHz) for "
453  "'fine tuning'."));
454 
455  setValue("0");
456  }
457 };
458 
460 {
461  public:
462  explicit Contrast(const ChannelID &id) :
463  MythUISpinBoxSetting(new ChannelDBStorage(this, id, "contrast"),
464  0, 65535, 655)
465  {
466  setLabel(QCoreApplication::translate("(Common)", "Contrast"));
467  }
468 };
469 
471 {
472  public:
473  explicit Brightness(const ChannelID &id) :
474  MythUISpinBoxSetting(new ChannelDBStorage(this, id, "brightness"),
475  0, 65535, 655)
476  {
477  setLabel(QCoreApplication::translate("(Common)", "Brightness"));
478  }
479 };
480 
482 {
483  public:
484  explicit Colour(const ChannelID &id) :
485  MythUISpinBoxSetting(new ChannelDBStorage(this, id, "colour"),
486  0, 65535, 655)
487  {
488  setLabel(QCoreApplication::translate("(Common)", "Color"));
489  }
490 };
491 
492 class Hue : public MythUISpinBoxSetting
493 {
494  public:
495  explicit Hue(const ChannelID &id) :
496  MythUISpinBoxSetting(new ChannelDBStorage(this, id, "hue"),
497  0, 65535, 655)
498  {
499  setLabel(QCoreApplication::translate("(Common)", "Hue"));
500  }
501 };
502 
504  uint default_sourceid, bool add_freqid)
505 {
506  setLabel(QCoreApplication::translate("(ChannelSettings)",
507  "Channel Options - Common"));
508  addChild(new Name(id));
509 
510  auto *source = new Source(id, default_sourceid);
511 
512  auto *channum = new Channum(id);
513  addChild(channum);
514  if (add_freqid)
515  {
516  m_freqid = new Freqid(id);
518  }
519  else
520  m_freqid = nullptr;
521  addChild(new Callsign(id));
522 
523 
524 
525  addChild(new Visible(id));
526  addChild(new ServiceID(id));
527 
530 
531  addChild(source);
532  addChild(new ChannelTVFormat(id));
533  addChild(new Priority(id));
534 
535  addChild(m_onairguide = new OnAirGuide(id));
536  addChild(m_xmltvID = new XmltvID(id, source->getValueLabel()));
537  addChild(new TimeOffset(id));
538 
539  addChild(new CommMethod(id));
540  addChild(new Icon(id));
541 
542  connect(m_onairguide, SIGNAL(valueChanged( bool)),
543  this, SLOT( onAirGuideChanged(bool)));
544  connect(source, SIGNAL(valueChanged( const QString&)),
545  this, SLOT( sourceChanged(const QString&)));
546 
547  // Transport stream ID and frequency from dtv_multiplex
548  MSqlQuery query(MSqlQuery::InitCon());
549  query.prepare(
550  "SELECT transportid, frequency FROM dtv_multiplex "
551  "JOIN channel ON channel.mplexid = dtv_multiplex.mplexid "
552  "WHERE channel.chanid = :CHANID");
553 
554  query.bindValue(":CHANID", id.getValue().toUInt());
555 
556  if (!query.exec())
557  MythDB::DBError("ChannelOptionsCommon::ChannelOptionsCommon", query);
558  else if (query.next())
559  {
560  m_transportid->setValue(query.value(0).toString());
561  m_frequency->setValue(query.value(1).toString());
562  }
563 };
564 
566 {
567  (void)fValue;
568 }
569 
570 void ChannelOptionsCommon::sourceChanged(const QString& sourceid)
571 {
572  bool supports_eit = true;
573  bool uses_eit_only = false;
574 
575  MSqlQuery query(MSqlQuery::InitCon());
576  query.prepare("SELECT cardtype "
577  "FROM capturecard, videosource "
578  "WHERE capturecard.sourceid = videosource.sourceid AND "
579  " videosource.sourceid = :SOURCEID");
580  query.bindValue(":SOURCEID", sourceid);
581 
582  if (!query.exec() || !query.isActive())
583  MythDB::DBError("sourceChanged -- supports eit", query);
584  else
585  {
586  supports_eit = (query.size() == 0);
587  while (query.next())
588  {
589  supports_eit |= CardUtil::IsEITCapable(
590  query.value(0).toString().toUpper());
591  }
592 
593  query.prepare("SELECT xmltvgrabber "
594  "FROM videosource "
595  "WHERE sourceid = :SOURCEID");
596  query.bindValue(":SOURCEID", sourceid);
597 
598  if (!query.exec() || !query.isActive())
599  MythDB::DBError("sourceChanged -- eit only", query);
600  else
601  {
602  uses_eit_only = (query.size() != 0);
603  while (query.next())
604  {
605  uses_eit_only &= (query.value(0).toString() == "eitonly");
606  }
607  }
608  }
609 
610  m_onairguide->setEnabled(supports_eit);
611  m_xmltvID->setEnabled(!uses_eit_only);
612  m_xmltvID->Load();
613 }
614 
616 {
617  setLabel(QCoreApplication::translate("(ChannelSettings)",
618  "Channel Options - Filters"));
619 
620  addChild(new VideoFilters(id));
621  addChild(new OutputFilters(id));
622 }
623 
625 {
626  setLabel(QCoreApplication::translate("(ChannelSettings)",
627  "Channel Options - Video4Linux"));
628 
629  addChild(new Freqid(id));
630  addChild(new Finetune(id));
631  addChild(new Contrast(id));
632  addChild(new Brightness(id));
633  addChild(new Colour(id));
634  addChild(new Hue(id));
635 };
636 
637 /*****************************************************************************
638  Channel Options - Video 4 Linux
639  *****************************************************************************/
640 
642  m_cid(id)
643 {
644  setLabel(QCoreApplication::translate("(ChannelSettings)",
645  "Channel Options - Raw Transport Stream"));
646 
647  const uint mx = kMaxPIDs;
648  m_pids.resize(mx);
649  m_sids.resize(mx);
650  m_pcrs.resize(mx);
651 
652  for (uint i = 0; i < mx; i++)
653  {
654  addChild((m_pids[i] = new TransTextEditSetting()));
655  m_pids[i]->setLabel("PID");
657  m_sids[i]->setLabel(" StreamID");
658  for (uint j = 0x101; j <= 0x1ff; j++)
659  {
660  QString desc = StreamID::GetDescription(j&0xff);
661  if (!desc.isEmpty())
662  m_sids[i]->addSelection(
663  QString("%1 (0x%2)")
664  .arg(desc).arg(j&0xff,2,16,QLatin1Char('0')),
665  QString::number(j), false);
666  }
667  for (uint j = 0x101; j <= 0x1ff; j++)
668  {
669  QString desc = StreamID::GetDescription(j&0xff);
670  if (desc.isEmpty())
671  m_sids[i]->addSelection(
672  QString("0x%1").arg(j&0xff,2,16,QLatin1Char('0')),
673  QString::number(j), false);
674  }
675 /* we don't allow tables right now, PAT & PMT generated on the fly
676  for (uint j = 0; j <= 0xff; j++)
677  {
678  QString desc = TableID::GetDescription(j);
679  if (!desc.isEmpty())
680  {
681  m_sids[i]->addSelection(
682  QString("%1 (0x%2)").arg(j,0,16,QLatin1Char('0')),
683  QString::number(j),
684  false);
685  }
686  }
687 */
689  m_pcrs[i]->setLabel(" Is PCR");
690  }
691 };
692 
694 {
695  uint chanid = m_cid.getValue().toUInt();
696 
697  pid_cache_t pid_cache;
698  if (!ChannelUtil::GetCachedPids(chanid, pid_cache))
699  return;
700 
701  pid_cache_t::const_iterator it = pid_cache.begin();
702  for (uint i = 0; i < kMaxPIDs && it != pid_cache.end(); )
703  {
704  if (!(it->IsPermanent()))
705  {
706  ++it;
707  continue;
708  }
709 
710  m_pids[i]->setValue(QString("0x%1")
711  .arg(it->GetPID(),2,16,QLatin1Char('0')));
712  m_sids[i]->setValue(QString::number(it->GetComposite()&0x1ff));
713  m_pcrs[i]->setValue(it->IsPCRPID());
714 
715  ++it;
716  ++i;
717  }
718 }
719 
721 {
722  uint chanid = m_cid.getValue().toUInt();
723 
724  pid_cache_t pid_cache;
725  for (uint i = 0; i < kMaxPIDs; i++)
726  {
727  bool ok;
728  uint pid = m_pids[i]->getValue().toUInt(&ok, 0);
729  if (!ok || (m_sids[i]->getValue().toUInt() == 0U))
730  continue;
731 
732  pid_cache.push_back(
734  pid, m_sids[i]->getValue().toUInt() | 0x10000 |
735  (m_pcrs[i]->getValue().toUInt() ? 0x200 : 0x0)));
736  }
737 
738  ChannelUtil::SaveCachedPids(chanid, pid_cache, true /* delete_all */);
739 }
740 
741 /* vim: set expandtab tabstop=4 shiftwidth=4: */
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:781
void bindValue(const QString &placeholder, const QVariant &val)
Add a single binding.
Definition: mythdbcon.cpp:862
vector< pid_cache_item_t > pid_cache_t
Definition: channelutil.h:43
TransportID_CO * m_transportid
void Save(void) override
VERBOSE_PREAMBLE Most true
Definition: verbosedefs.h:91
#define Brightness
Definition: synaesthesia.h:12
QString GetColumnName(void) const
Definition: mythstorage.h:43
XmltvID(const ChannelID &id, QString _sourceName)
Frequency_CO * m_frequency
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
static bool GetCachedPids(uint chanid, pid_cache_t &pid_cache)
Returns cached MPEG PIDs when given a Channel ID.
virtual void Load(void)
void addSelection(const QString &label, QString value=QString(), bool select=false)
const QString & getField(void) const
void fillSelections(void)
virtual void setHelpText(const QString &str)
ChannelOptionsRawTS(const ChannelID &id)
int size(void) const
Definition: mythdbcon.h:203
static QStringList GetFormats(void)
OutputFilters(const ChannelID &id)
void Load(void) override
QString SkipTypeToString(int flags)
CommMethod(const ChannelID &id)
OnAirGuide * m_onairguide
virtual QString GetDBValue(void) const =0
static const uint kMaxPIDs
Contrast(const ChannelID &id)
Channum(const ChannelID &id)
static guint32 * tmp
Definition: goom_core.c:35
ChannelTVFormat(const ChannelID &id)
const ChannelID & m_cid
QMap< uint, uint > m_sourceIdToIndex
std::vector< TransTextEditSetting * > m_pids
Finetune(const ChannelID &id)
static QString GetDescription(uint stream_id)
int id
Definition: filldata.h:28
ChannelOptionsFilters(const ChannelID &id)
virtual QString getValue(void) const
Name(const ChannelID &id)
QString GetConfDir(void)
Definition: mythdirs.cpp:224
QVariant value(int i) const
Definition: mythdbcon.h:198
std::vector< TransMythUIComboBoxSetting * > m_sids
ServiceID(const ChannelID &id)
Source(const ChannelID &id, uint _default_sourceid)
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
Definition: mythdbcon.h:98
void setValue(int value) override
virtual void setLabel(QString str)
Colour(const ChannelID &id)
static bool IsEITCapable(const QString &rawtype)
Definition: cardutil.h:156
QString GetSetClause(MSqlBindings &bindings) const override
StorageUser * m_user
Definition: mythstorage.h:46
TimeOffset(const ChannelID &id)
bool isActive(void) const
Definition: mythdbcon.h:204
OnAirGuide(const ChannelID &id)
virtual void setEnabled(bool enabled)
unsigned int uint
Definition: compat.h:140
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:534
VideoFilters(const ChannelID &id)
virtual void addChild(StandardSetting *child)
void Load(void) override
QString GetWhereClause(MSqlBindings &bindings) const override
QString getValue(void) const override
deque< int > GetPreferredSkipTypeCombinations(void)
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:806
Priority(const ChannelID &id)
static int x0
Definition: mythsocket.cpp:59
static QString Source(const QNetworkRequest &request)
Definition: netstream.cpp:136
Visible(const ChannelID &id)
static bool SaveCachedPids(uint chanid, const pid_cache_t &_pid_cache, bool delete_all=false)
Saves PIDs for PSIP tables to database.
Freqid(const ChannelID &id)
static void onAirGuideChanged(bool)
const ChannelID & m_id
Callsign(const ChannelID &id)
std::vector< TransMythUICheckBoxSetting * > m_pcrs
void setValue(const QString &) override
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:602
void sourceChanged(const QString &)
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:179
ChannelOptionsV4L(const ChannelID &id)
void Load(void) override
Brightness(const ChannelID &id)
uint m_defaultSourceId
virtual void setValue(const QString &newValue)
Hue(const ChannelID &id)
void Load(void) override
Icon(const ChannelID &id)
void fillSelections(void)
ChannelOptionsCommon(const ChannelID &id, uint default_sourceid, bool add_freqid)
QString m_sourceName
void valueChanged(const QString &)