MythTV  master
transporteditor.cpp
Go to the documentation of this file.
1 /*
2  * $Id$
3  * vim: set expandtab tabstop=4 shiftwidth=4:
4  *
5  * Original Project
6  * MythTV http://www.mythtv.org
7  *
8  * Author(s):
9  * John Pullan <john@pullan.org>
10  * Taylor Jacob <rtjacob@earthlink.net>
11  * Daniel Kristjansson <danielk@cuymedia.net>
12  *
13  * Description:
14  * Collection of classes to provide dvb a transport editor
15  *
16  * This program is free software; you can redistribute it and/or
17  * modify it under the terms of the GNU General Public License
18  * as published by the Free Software Foundation; either version 2
19  * of the License, or (at your option) any later version.
20  *
21  * This program is distributed in the hope that it will be useful,
22  * but WITHOUT ANY WARRANTY; without even the implied warranty of
23  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24  * GNU General Public License for more details.
25  *
26  * You should have received a copy of the GNU General Public License
27  * along with this program; if not, write to the Free Software
28  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
29  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
30  *
31  */
32 
33 #include <vector>
34 using namespace std;
35 
36 #include "transporteditor.h"
37 #include "videosource.h"
38 #include "cardutil.h"
39 #include "mythcorecontext.h"
40 #include "mythdb.h"
41 
42 #define LOC QString("DTVMux: ")
43 
45 {
46  public:
47  MultiplexID() : AutoIncrementSetting("dtv_multiplex", "mplexid")
48  {
49  setVisible(false);
50  setName("MPLEXID");
51  }
52 
53  public:
54  QString GetColumnName(void) const { return m_column; }
55 };
56 
57 static QString pp_modulation(QString mod)
58 {
59  if (mod.endsWith("vsb"))
60  return mod.left(mod.length() - 3) + "-VSB";
61 
62  if (mod.startsWith("qam_"))
63  return "QAM-" + mod.mid(4, mod.length());
64 
65  if (mod == "analog")
66  return QObject::tr("Analog");
67 
68  return mod.toUpper();
69 }
70 
72 {
73  vector<uint> cardids;
74 
75  // Work out what card we have.. (doesn't always work well)
77  query.prepare(
78  "SELECT capturecard.cardid "
79  "FROM capturecard "
80  "WHERE capturecard.sourceid = :SOURCEID AND "
81  " capturecard.hostname = :HOSTNAME");
82  query.bindValue(":SOURCEID", sourceid);
83  query.bindValue(":HOSTNAME", gCoreContext->GetHostName());
84 
85  if (!query.exec() || !query.isActive())
86  {
87  MythDB::DBError("TransportWizard()", query);
88  return CardUtil::ERROR_PROBE;
89  }
90  else
91  {
92  while (query.next())
93  cardids.push_back(query.value(0).toUInt());
94  }
95 
96  if (cardids.empty())
97  {
98  ShowOkPopup(QObject::tr(
99  "Sorry, the Transport Editor can only be used to "
100  "edit transports which are connected to a card input."));
101 
102  return CardUtil::ERROR_PROBE;
103  }
104 
105  vector<CardUtil::INPUT_TYPES> cardtypes;
106 
107  vector<uint>::const_iterator it = cardids.begin();
108  for (; it != cardids.end(); ++it)
109  {
111  QString cardtype = CardUtil::GetRawInputType(*it);
112  if (cardtype == "DVB")
113  cardtype = CardUtil::ProbeSubTypeName(*it);
114  nType = CardUtil::toInputType(cardtype);
115 
116  if ((CardUtil::ERROR_OPEN == nType) ||
117  (CardUtil::ERROR_UNKNOWN == nType) ||
118  (CardUtil::ERROR_PROBE == nType))
119  {
120  ShowOkPopup(
121  QObject::tr(
122  "Failed to probe a capture card connected to this "
123  "transport's video source. Please make sure the "
124  "backend is not running."));
125 
126  return CardUtil::ERROR_PROBE;
127  }
128 
129  cardtypes.push_back(nType);
130  }
131 
132  // This should never happen... (unless DB has changed under us)
133  if (cardtypes.empty())
134  return CardUtil::ERROR_PROBE;
135 
136  for (uint i = 1; i < cardtypes.size(); i++)
137  {
138  CardUtil::INPUT_TYPES typeA = cardtypes[i - 1];
139  typeA = (CardUtil::HDHOMERUN == typeA) ? CardUtil::ATSC : typeA;
140  typeA = (CardUtil::MPEG == typeA) ? CardUtil::V4L : typeA;
141 
142  CardUtil::INPUT_TYPES typeB = cardtypes[i + 0];
143  typeB = (CardUtil::HDHOMERUN == typeB) ? CardUtil::ATSC : typeB;
144  typeB = (CardUtil::MPEG == typeB) ? CardUtil::V4L : typeB;
145 
146  if (typeA == typeB)
147  continue;
148 
149  ShowOkPopup(
150  QObject::tr(
151  "The Video Sources to which this Transport is connected "
152  "are incompatible, please create separate video sources "
153  "for these cards. "));
154 
155  return CardUtil::ERROR_PROBE;
156  }
157 
158  return cardtypes[0];
159 }
160 
162 {
163  for (auto setting : m_list)
164  removeChild(setting);
165  m_list.clear();
166 
167 #if 0
168  LOG(VB_GENERAL, LOG_DEBUG, QString("TransportList::SetSourceID(%1)")
169  .arg(_sourceid));
170 #endif
171 
172  if (!_sourceid)
173  {
174  m_sourceid = 0;
175  }
176  else
177  {
178  m_cardtype = get_cardtype(_sourceid);
179  m_sourceid = ((CardUtil::ERROR_OPEN == m_cardtype) ||
180  (CardUtil::ERROR_UNKNOWN == m_cardtype) ||
181  (CardUtil::ERROR_PROBE == m_cardtype)) ? 0 : _sourceid;
182  }
183 }
184 
186  m_videosource(new VideoSourceSelector(sourceid, QString::null, false))
187 {
188  setLabel(tr("Multiplex Editor"));
189 
191  ButtonStandardSetting *newTransport =
192  new ButtonStandardSetting("(" + tr("New Transport") + ")");
193  addChild(newTransport);
194 
195  connect(m_videosource, SIGNAL(valueChanged(const QString&)),
196  this, SLOT(SetSourceID(const QString&)));
197 
198  SetSourceID(sourceid);
199 }
200 
201 void TransportListEditor::SetSourceID(const QString& sourceid)
202 {
203  SetSourceID(sourceid.toUInt());
204  Load();
205 }
206 
208 {
209  if (m_sourceid)
210  {
211  MSqlQuery query(MSqlQuery::InitCon());
212  query.prepare(
213  "SELECT mplexid, modulation, frequency, "
214  " symbolrate, networkid, transportid, "
215  " constellation, mod_sys "
216  "FROM dtv_multiplex, videosource "
217  "WHERE dtv_multiplex.sourceid = :SOURCEID AND "
218  " dtv_multiplex.sourceid = videosource.sourceid "
219  "ORDER by networkid, transportid, frequency, mplexid");
220  query.bindValue(":SOURCEID", m_sourceid);
221 
222  if (!query.exec() || !query.isActive())
223  {
224  MythDB::DBError("TransportList::fillSelections", query);
225  return;
226  }
227 
228  while (query.next())
229  {
230  QString rawmod = ((CardUtil::OFDM == m_cardtype) ||
232  query.value(6).toString() : query.value(1).toString();
233 
234  QString mod = pp_modulation(rawmod);
235  while (mod.length() < 7)
236  mod += " ";
237 
238  QString rate = query.value(3).toString();
239  rate = (rate == "0") ? "" : QString("rate %1").arg(rate);
240 
241  QString netid = query.value(4).toUInt() ?
242  QString("netid %1").arg(query.value(4).toUInt(), 5) : "";
243 
244  QString tid = query.value(5).toUInt() ?
245  QString("tid %1").arg(query.value(5).toUInt(), 5) : "";
246 
247  QString hz = (CardUtil::QPSK == m_cardtype) ? "kHz" : "Hz";
248 
249  QString type = "";
250  if (CardUtil::OFDM == m_cardtype)
251  type = "(DVB-T)";
253  type = QString("(%1)").arg(query.value(7).toString());
254  if (CardUtil::QPSK == m_cardtype)
255  type = "(DVB-S)";
256  if (CardUtil::QAM == m_cardtype)
257  type = "(DVB-C)";
258 
259  QString txt = QString("%1 %2 %3 %4 %5 %6 %7")
260  .arg(mod).arg(query.value(2).toString())
261  .arg(hz).arg(rate).arg(netid).arg(tid).arg(type);
262 
263  TransportSetting *transport =
264  new TransportSetting(txt, query.value(0).toUInt(), m_sourceid,
265  m_cardtype);
266  connect(transport, &TransportSetting::deletePressed,
267  this, [transport, this] () { Delete(transport); });
268  connect(transport, &TransportSetting::openMenu,
269  this, [transport, this] () { Menu(transport); });
270  addChild(transport);
271  m_list.push_back(transport);
272  }
273  }
274 
276 }
277 
279 {
280  ShowOkPopup(
281  tr("Are you sure you would like to delete this transport?"),
282  this,
283  [transport, this](bool result)
284  {
285  if (!result)
286  return;
287 
288  uint mplexid = transport->getMplexId();
289 
290  MSqlQuery query(MSqlQuery::InitCon());
291  query.prepare("DELETE FROM dtv_multiplex WHERE mplexid = :MPLEXID");
292  query.bindValue(":MPLEXID", mplexid);
293 
294  if (!query.exec() || !query.isActive())
295  MythDB::DBError("TransportEditor -- delete multiplex", query);
296 
297  query.prepare("DELETE FROM channel WHERE mplexid = :MPLEXID");
298  query.bindValue(":MPLEXID", mplexid);
299 
300  if (!query.exec() || !query.isActive())
301  MythDB::DBError("TransportEditor -- delete channels", query);
302 
303  removeChild(transport);
304  // m_list.removeAll(transport);
305  // Following for QT 5.3 which does not have the removeAll
306  // method in QVector
307  int ix;
308  do
309  {
310  ix = m_list.indexOf(transport);
311  if (ix != -1)
312  m_list.remove(ix);
313  } while (ix != -1);
314  },
315  true);
316 }
317 
319 {
320  MythMenu *menu = new MythMenu(tr("Transport Menu"), this, "transportmenu");
321  menu->AddItem(tr("Delete..."), [transport, this] () { Delete(transport); });
322 
323  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
324 
325  MythDialogBox *menuPopup = new MythDialogBox(menu, popupStack,
326  "menudialog");
327  menuPopup->SetReturnEvent(this, "transportmenu");
328 
329  if (menuPopup->Create())
330  popupStack->AddScreen(menuPopup);
331  else
332  delete menuPopup;
333 }
334 
336 {
337  protected:
338  MuxDBStorage(StorageUser *_setting, const MultiplexID *_id, QString _name) :
339  SimpleDBStorage(_setting, "dtv_multiplex", _name), mplexid(_id)
340  {
341  }
342 
343  virtual QString GetSetClause(MSqlBindings &bindings) const;
344  virtual QString GetWhereClause(MSqlBindings &bindings) const;
345 
347 };
348 
350 {
351  QString muxTag = ":WHERE" + mplexid->GetColumnName().toUpper();
352 
353  bindings.insert(muxTag, mplexid->getValue());
354 
355  // return query
356  return mplexid->GetColumnName() + " = " + muxTag;
357 }
358 
359 QString MuxDBStorage::GetSetClause(MSqlBindings &bindings) const
360 {
361  QString muxTag = ":SET" + mplexid->GetColumnName().toUpper();
362  QString nameTag = ":SET" + GetColumnName().toUpper();
363 
364  bindings.insert(muxTag, mplexid->getValue());
365  bindings.insert(nameTag, user->GetDBValue());
366 
367  // return query
368  return (mplexid->GetColumnName() + " = " + muxTag + ", " +
369  GetColumnName() + " = " + nameTag);
370 }
371 
373 {
374  public:
375  VideoSourceID(const MultiplexID *id, uint _sourceid) :
376  StandardSetting(this),
377  MuxDBStorage(this, id, "sourceid")
378  {
379  setVisible(false);
380  setValue(_sourceid);
381  }
382  virtual void edit(MythScreenType * /*screen*/) { }
383  virtual void resultEdit(DialogCompletionEvent * /*dce*/) { }
384 };
385 
387 {
388  public:
390  bool is_dvb_country,
391  bool is_atsc_country) :
392  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "sistandard")
393  {
394  setLabel(QObject::tr("Digital TV Standard"));
395  setHelpText(QObject::tr(
396  "Guiding standard to use for making sense of the "
397  "data streams after they have been demodulated, "
398  "error corrected and demultiplexed."));
399  if (is_dvb_country)
400  addSelection(QObject::tr("DVB"), "dvb");
401 
402  if (is_atsc_country)
403  {
404  addSelection(QObject::tr("ATSC"), "atsc");
405  addSelection(QObject::tr("OpenCable"), "opencable");
406  }
407 
408  addSelection(QObject::tr("MPEG"), "mpeg");
409  };
410 };
411 
413 {
414  public:
415  Frequency(const MultiplexID *id, bool in_kHz = false) :
416  MythUITextEditSetting(this), MuxDBStorage(this, id, "frequency")
417  {
418  QString hz = (in_kHz) ? "kHz" : "Hz";
419  setLabel(QObject::tr("Frequency") + " (" + hz + ")");
420  setHelpText(QObject::tr(
421  "Frequency (Option has no default).\n"
422  "The frequency for this channel in") + " " + hz + ".");
423  };
424 };
425 
427 {
428  public:
429  explicit DVBSymbolRate(const MultiplexID *id) :
430  MythUIComboBoxSetting(this, true), MuxDBStorage(this, id, "symbolrate")
431  {
432  setLabel(QObject::tr("Symbol Rate"));
433  setHelpText(
434  QObject::tr(
435  "Symbol Rate (symbols/sec).\n"
436  "Most DVB-S transponders transmit at 27.5 "
437  "million symbols per second."));
438  addSelection("3333000");
439  addSelection("22000000");
440  addSelection("23000000");
441  addSelection("27500000", "27500000", true);
442  addSelection("28000000");
443  addSelection("28500000");
444  addSelection("29500000");
445  addSelection("29900000");
446  };
447 };
448 
450 {
451  public:
452  explicit SignalPolarity(const MultiplexID *id) :
453  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "polarity")
454  {
455  setLabel(QObject::tr("Polarity"));
456  setHelpText(QObject::tr("Polarity (Option has no default)"));
457  addSelection(QObject::tr("Horizontal"), "h");
458  addSelection(QObject::tr("Vertical"), "v");
459  addSelection(QObject::tr("Right Circular"), "r");
460  addSelection(QObject::tr("Left Circular"), "l");
461  };
462 };
463 
465 {
466  public:
467  Modulation(const MultiplexID *id, uint nType);
468 };
469 
471  MythUIComboBoxSetting(this),
472  MuxDBStorage(this, id, ((CardUtil::OFDM == nType) ||
473  (CardUtil::DVBT2 == nType)) ?
474  "constellation" : "modulation")
475 {
476  setLabel(QObject::tr("Modulation"));
477  setHelpText(QObject::tr("Modulation, aka Constellation"));
478 
479  if (CardUtil::QPSK == nType)
480  {
481  // no modulation options
482  setVisible(false);
483  }
484  else if ((CardUtil::QAM == nType) || (CardUtil::OFDM == nType) ||
485  (CardUtil::DVBT2 == nType))
486  {
487  addSelection(QObject::tr("QAM Auto"), "auto");
488  addSelection("QAM-16", "qam_16");
489  addSelection("QAM-32", "qam_32");
490  addSelection("QAM-64", "qam_64");
491  addSelection("QAM-128", "qam_128");
492  addSelection("QAM-256", "qam_256");
493 
494  if ((CardUtil::OFDM == nType) || (CardUtil::DVBT2 == nType))
495  {
496  addSelection("QPSK", "qpsk");
497  }
498  }
499  else if ((CardUtil::ATSC == nType) ||
500  (CardUtil::HDHOMERUN == nType))
501  {
502  addSelection("8-VSB", "8vsb");
503  addSelection("QAM-64", "qam_64");
504  addSelection("QAM-256", "qam_256");
505  }
506  else
507  {
508  addSelection(QObject::tr("Analog"), "analog");
509  setVisible(false);
510  }
511 };
512 
514 {
515  public:
516  explicit DVBInversion(const MultiplexID *id) :
517  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "inversion")
518  {
519  setLabel(QObject::tr("Inversion"));
520  setHelpText(QObject::tr("Inversion (Default: Auto):\n"
521  "Most cards can autodetect this now, so leave it at Auto"
522  " unless it won't work."));
523  addSelection(QObject::tr("Auto"), "a");
524  addSelection(QObject::tr("On"), "1");
525  addSelection(QObject::tr("Off"), "0");
526  };
527 };
528 
530 {
531  public:
532  explicit DVBTBandwidth(const MultiplexID *id) :
533  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "bandwidth")
534  {
535  setLabel(QObject::tr("Bandwidth"));
536  setHelpText(QObject::tr("Bandwidth (Default: Auto)"));
537  addSelection(QObject::tr("Auto"), "a");
538  addSelection(QObject::tr("6 MHz"), "6");
539  addSelection(QObject::tr("7 MHz"), "7");
540  addSelection(QObject::tr("8 MHz"), "8");
541  };
542 };
543 
545 {
546  public:
548  MythUIComboBoxSetting(_storage)
549  {
550  addSelection(QObject::tr("Auto"), "auto");
551  addSelection(QObject::tr("None"), "none");
552  addSelection("1/2");
553  addSelection("2/3");
554  addSelection("3/4");
555  addSelection("4/5");
556  addSelection("5/6");
557  addSelection("6/7");
558  addSelection("7/8");
559  addSelection("8/9");
560  };
561 };
562 
565 {
566  public:
569  MuxDBStorage(this, id, "fec")
570  {
571  setLabel(QObject::tr("FEC"));
572  setHelpText(QObject::tr("Forward Error Correction (Default: Auto)"));
573  };
574 };
575 
578 {
579  public:
580  explicit DVBTCoderateLP(const MultiplexID *id) :
582  MuxDBStorage(this, id, "lp_code_rate")
583  {
584  setLabel(QObject::tr("LP Coderate"));
585  setHelpText(QObject::tr("Low Priority Code Rate (Default: Auto)"));
586  };
587 };
588 
591 {
592  public:
593  explicit DVBTCoderateHP(const MultiplexID *id) :
595  MuxDBStorage(this, id, "hp_code_rate")
596  {
597  setLabel(QObject::tr("HP Coderate"));
598  setHelpText(QObject::tr("High Priority Code Rate (Default: Auto)"));
599  };
600 };
601 
603 {
604  public:
605  explicit DVBTGuardInterval(const MultiplexID *id) :
606  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "guard_interval")
607  {
608  setLabel(QObject::tr("Guard Interval"));
609  setHelpText(QObject::tr("Guard Interval (Default: Auto)"));
610  addSelection(QObject::tr("Auto"), "auto");
611  addSelection("1/4");
612  addSelection("1/8");
613  addSelection("1/16");
614  addSelection("1/32");
615  };
616 };
617 
619 {
620  public:
621  explicit DVBTTransmissionMode(const MultiplexID *id) :
622  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "transmission_mode")
623  {
624  setLabel(QObject::tr("Trans. Mode"));
625  setHelpText(QObject::tr("Transmission Mode (Default: Auto)"));
626  addSelection(QObject::tr("Auto"), "a");
627  addSelection("2K", "2");
628  addSelection("8K", "8");
629  };
630 };
631 
633 {
634  public:
635  explicit DVBTHierarchy(const MultiplexID *id) :
636  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "hierarchy")
637  {
638  setLabel(QObject::tr("Hierarchy"));
639  setHelpText(QObject::tr("Hierarchy (Default: Auto)"));
640  addSelection(QObject::tr("Auto"), "a");
641  addSelection(QObject::tr("None"), "n");
642  addSelection("1");
643  addSelection("2");
644  addSelection("4");
645  }
646 };
647 
649 {
650  public:
651  explicit DVBTModulationSystem(const MultiplexID *id) :
652  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "mod_sys")
653  {
654  setLabel(QObject::tr("Modulation System"));
655  setHelpText(QObject::tr("Modulation System (Default: DVB-T)"));
656  addSelection(QObject::tr("DVB-T"), "DVB-T");
657  addSelection(QObject::tr("DVB-T2"), "DVB-T2");
658  };
659 };
660 
662  uint sourceid, uint cardtype)
663  : m_mplexid(new MultiplexID())
664 {
665  setLabel(label);
666 
667  // Must be first.
668  m_mplexid->setValue(mplexid);
670  addChild(new VideoSourceID(m_mplexid, sourceid));
671 
672  if (CardUtil::OFDM == cardtype)
673  {
674  addChild(new DTVStandard(m_mplexid, true, false));
678  addChild(new Modulation(m_mplexid, cardtype));
679 
685  }
686  else if (CardUtil::DVBT2 == cardtype)
687  {
688  addChild(new DTVStandard(m_mplexid, true, false));
692  addChild(new Modulation(m_mplexid, cardtype));
694 
700  }
701  else if (CardUtil::QPSK == cardtype)
702  {
703  addChild(new DTVStandard(m_mplexid, true, false));
704  addChild(new Frequency(m_mplexid, true));
706 
710  }
711  else if (CardUtil::QAM == cardtype)
712  {
713  addChild(new DTVStandard(m_mplexid, true, false));
716 
717  addChild(new Modulation(m_mplexid, cardtype));
720  }
721  else if (CardUtil::ATSC == cardtype ||
722  CardUtil::HDHOMERUN == cardtype)
723  {
724  addChild(new DTVStandard(m_mplexid, false, true));
726  addChild(new Modulation(m_mplexid, cardtype));
727  }
728  else if ((CardUtil::FIREWIRE == cardtype) ||
729  (CardUtil::FREEBOX == cardtype))
730  {
731  addChild(new DTVStandard(m_mplexid, true, true));
732  }
733  else if ((CardUtil::V4L == cardtype) ||
734  (CardUtil::MPEG == cardtype))
735  {
737  addChild(new Modulation(m_mplexid, cardtype));
738  }
739 }
740 
741 bool TransportSetting::keyPressEvent(QKeyEvent *event)
742 {
743  QStringList actions;
744  bool handled =
745  GetMythMainWindow()->TranslateKeyPress("Global", event, actions);
746 
747  for (int i = 0; i < actions.size() && !handled; i++)
748  {
749  QString action = actions[i];
750 
751  if (action == "DELETE")
752  {
753  handled = true;
754  emit deletePressed();
755  }
756  else if (action == "MENU")
757  {
758  handled = true;
759  emit openMenu();
760  }
761  }
762 
763  return handled;
764 }
765 
767 {
768  return m_mplexid->getValue().toUInt();
769 }
Collection of helper utilities for input DB use.
Definition: cardutil.h:42
void Delete(TransportSetting *transport)
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:794
uint getMplexId() const
void bindValue(const QString &placeholder, const QVariant &val)
Definition: mythdbcon.cpp:893
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
void addSelection(const QString &label, QString value=QString::null, bool select=false)
DVBForwardErrorCorrectionSelector(Storage *_storage)
MythConfirmationDialog * ShowOkPopup(const QString &message, QObject *parent, const char *slot, bool showCancel)
Non-blocking version of MythPopupBox::showOkPopup()
static QString ProbeSubTypeName(uint inputid)
Definition: cardutil.cpp:602
static enum INPUT_TYPES toInputType(const QString &name)
Definition: cardutil.h:74
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
TransportListEditor(uint initial_sourceid)
virtual void Load(void)
Basic menu dialog, message and a list of options.
virtual void setHelpText(const QString &str)
DVBTHierarchy(const MultiplexID *id)
virtual bool Create(void)
DVBForwardErrorCorrection(const MultiplexID *id)
MythScreenStack * GetStack(const QString &stackname)
unsigned int uint
Definition: compat.h:136
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
void AddItem(const QString &title, QVariant data=0, MythMenu *subMenu=NULL, bool selected=false, bool checked=false)
MuxDBStorage(StorageUser *_setting, const MultiplexID *_id, QString _name)
__u32 type
Definition: videodev2.h:1038
virtual QString GetSetClause(MSqlBindings &bindings) const
QString GetColumnName(void) const
virtual QString getValue(void) const
void Menu(TransportSetting *transport)
void SetSourceID(uint _sourceid)
QVariant value(int i) const
Definition: mythdbcon.h:182
DVBTBandwidth(const MultiplexID *id)
virtual void AddScreen(MythScreenType *screen, bool allowFade=true)
SignalPolarity(const MultiplexID *id)
VideoSourceID(const MultiplexID *id, uint _sourceid)
virtual void setLabel(QString str)
DVBTTransmissionMode(const MultiplexID *id)
DVBInversion(const MultiplexID *id)
virtual QString GetWhereClause(MSqlBindings &bindings) const
bool isActive(void) const
Definition: mythdbcon.h:188
virtual void resultEdit(DialogCompletionEvent *)
DVBTModulationSystem(const MultiplexID *id)
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:551
virtual void addChild(StandardSetting *child)
DVBTCoderateHP(const MultiplexID *id)
DVBTGuardInterval(const MultiplexID *id)
MythMainWindow * GetMythMainWindow(void)
VideoSourceSelector * m_videosource
DTVStandard(const MultiplexID *id, bool is_dvb_country, bool is_atsc_country)
VERBOSE_PREAMBLE Most Errors or other very important messages true
Definition: verbosedefs.h:91
static MythThemedMenu * menu
void setVisible(bool visible)
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:819
virtual void Load(void)
bool keyPressEvent(QKeyEvent *event)
QVector< StandardSetting * > m_list
void SetReturnEvent(QObject *retobject, const QString &resultid)
bool TranslateKeyPress(const QString &context, QKeyEvent *e, QStringList &actions, bool allowJumps=true) MUNUSED_RESULT
Get a list of actions for a keypress in the given context.
Modulation(const MultiplexID *id, uint nType)
virtual void edit(MythScreenType *)
Frequency(const MultiplexID *id, bool in_kHz=false)
TransportSetting(const QString &label, uint mplexid, uint sourceid, uint cardtype)
static QString GetRawInputType(uint inputid)
Definition: cardutil.h:272
QMap< QString, QVariant > MSqlBindings
typedef for a map of string -> string bindings for generic queries.
Definition: mythdbcon.h:98
bool exec(void)
Wrap QSqlQuery::exec() so we can display SQL.
Definition: mythdbcon.cpp:619
MultiplexID * m_mplexid
static CardUtil::INPUT_TYPES get_cardtype(uint sourceid)
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:181
Screen in which all other widgets are contained and rendered.
const MultiplexID * mplexid
QString GetHostName(void)
Event dispatched from MythUI modal dialogs to a listening class containing a result of some form...
Definition: mythdialogbox.h:37
INPUT_TYPES
all the different inputs
Definition: cardutil.h:48
virtual void setValue(const QString &newValue)
virtual void removeChild(StandardSetting *child)
static QString pp_modulation(QString mod)
DVBSymbolRate(const MultiplexID *id)
DVBTCoderateLP(const MultiplexID *id)
void valueChanged(const QString &)