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