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)), isLoading(false)
187 {
188  setLabel(tr("Multiplex Editor"));
189 
191  ButtonStandardSetting *newTransport =
192  new ButtonStandardSetting("(" + tr("New Transport") + ")");
193  connect(newTransport, SIGNAL(clicked()), SLOT(NewTransport(void)));
194 
195  addChild(newTransport);
196 
197  connect(m_videosource, SIGNAL(valueChanged(const QString&)),
198  this, SLOT(SetSourceID(const QString&)));
199 
200  SetSourceID(sourceid);
201 }
202 
203 void TransportListEditor::SetSourceID(const QString& sourceid)
204 {
205  if (isLoading)
206  return;
207  SetSourceID(sourceid.toUInt());
208  Load();
209 }
210 
212 {
213  if (isLoading)
214  return;
215  isLoading = true;
216  if (m_sourceid)
217  {
218  MSqlQuery query(MSqlQuery::InitCon());
219  query.prepare(
220  "SELECT mplexid, modulation, frequency, "
221  " symbolrate, networkid, transportid, "
222  " constellation, mod_sys "
223  "FROM dtv_multiplex, videosource "
224  "WHERE dtv_multiplex.sourceid = :SOURCEID AND "
225  " dtv_multiplex.sourceid = videosource.sourceid "
226  "ORDER by networkid, transportid, frequency, mplexid");
227  query.bindValue(":SOURCEID", m_sourceid);
228 
229  if (!query.exec() || !query.isActive())
230  {
231  MythDB::DBError("TransportList::fillSelections", query);
232  isLoading = false;
233  return;
234  }
235 
236  while (query.next())
237  {
238  QString rawmod = ((CardUtil::OFDM == m_cardtype) ||
240  query.value(6).toString() : query.value(1).toString();
241 
242  QString mod = pp_modulation(rawmod);
243  while (mod.length() < 7)
244  mod += " ";
245 
246  QString rate = query.value(3).toString();
247  rate = (rate == "0") ? "" : QString("rate %1").arg(rate);
248 
249  QString netid = query.value(4).toUInt() ?
250  QString("netid %1").arg(query.value(4).toUInt(), 5) : "";
251 
252  QString tid = query.value(5).toUInt() ?
253  QString("tid %1").arg(query.value(5).toUInt(), 5) : "";
254 
255  QString hz = (CardUtil::QPSK == m_cardtype) ? "kHz" : "Hz";
256 
257  QString type = "";
258  if (CardUtil::OFDM == m_cardtype)
259  type = "(DVB-T)";
261  type = QString("(%1)").arg(query.value(7).toString());
262  if (CardUtil::QPSK == m_cardtype)
263  type = "(DVB-S)";
264  if (CardUtil::QAM == m_cardtype)
265  type = "(DVB-C)";
266 
267  QString txt = QString("%1 %2 %3 %4 %5 %6 %7")
268  .arg(mod).arg(query.value(2).toString())
269  .arg(hz).arg(rate).arg(netid).arg(tid).arg(type);
270 
271  TransportSetting *transport =
272  new TransportSetting(txt, query.value(0).toUInt(), m_sourceid,
273  m_cardtype);
274  connect(transport, &TransportSetting::deletePressed,
275  this, [transport, this] () { Delete(transport); });
276  connect(transport, &TransportSetting::openMenu,
277  this, [transport, this] () { Menu(transport); });
278  addChild(transport);
279  m_list.push_back(transport);
280  }
281  }
282 
284  isLoading = false;
285 }
286 
288 {
289  TransportSetting *transport =
290  new TransportSetting(QString("New Transport"), 0,
292  addChild(transport);
293  m_list.push_back(transport);
294  emit settingsChanged(this);
295 }
296 
297 
299 {
300  if (isLoading)
301  return;
302 
303  ShowOkPopup(
304  tr("Are you sure you would like to delete this transport?"),
305  this,
306  [transport, this](bool result)
307  {
308  if (!result)
309  return;
310 
311  uint mplexid = transport->getMplexId();
312 
313  MSqlQuery query(MSqlQuery::InitCon());
314  query.prepare("DELETE FROM dtv_multiplex WHERE mplexid = :MPLEXID");
315  query.bindValue(":MPLEXID", mplexid);
316 
317  if (!query.exec() || !query.isActive())
318  MythDB::DBError("TransportEditor -- delete multiplex", query);
319 
320  query.prepare("DELETE FROM channel WHERE mplexid = :MPLEXID");
321  query.bindValue(":MPLEXID", mplexid);
322 
323  if (!query.exec() || !query.isActive())
324  MythDB::DBError("TransportEditor -- delete channels", query);
325 
326  removeChild(transport);
327  // m_list.removeAll(transport);
328  // Following for QT 5.3 which does not have the removeAll
329  // method in QVector
330  int ix;
331  do
332  {
333  ix = m_list.indexOf(transport);
334  if (ix != -1)
335  m_list.remove(ix);
336  } while (ix != -1);
337  },
338  true);
339 }
340 
342 {
343  if (isLoading)
344  return;
345 
346  MythMenu *menu = new MythMenu(tr("Transport Menu"), this, "transportmenu");
347  menu->AddItem(tr("Delete..."), [transport, this] () { Delete(transport); });
348 
349  MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack");
350 
351  MythDialogBox *menuPopup = new MythDialogBox(menu, popupStack,
352  "menudialog");
353  menuPopup->SetReturnEvent(this, "transportmenu");
354 
355  if (menuPopup->Create())
356  popupStack->AddScreen(menuPopup);
357  else
358  delete menuPopup;
359 }
360 
362 {
363  protected:
364  MuxDBStorage(StorageUser *_setting, const MultiplexID *_id, QString _name) :
365  SimpleDBStorage(_setting, "dtv_multiplex", _name), mplexid(_id)
366  {
367  }
368 
369  virtual QString GetSetClause(MSqlBindings &bindings) const;
370  virtual QString GetWhereClause(MSqlBindings &bindings) const;
371 
373 };
374 
376 {
377  QString muxTag = ":WHERE" + mplexid->GetColumnName().toUpper();
378 
379  bindings.insert(muxTag, mplexid->getValue());
380 
381  // return query
382  return mplexid->GetColumnName() + " = " + muxTag;
383 }
384 
385 QString MuxDBStorage::GetSetClause(MSqlBindings &bindings) const
386 {
387  QString muxTag = ":SET" + mplexid->GetColumnName().toUpper();
388  QString nameTag = ":SET" + GetColumnName().toUpper();
389 
390  bindings.insert(muxTag, mplexid->getValue());
391  bindings.insert(nameTag, user->GetDBValue());
392 
393  // return query
394  return (mplexid->GetColumnName() + " = " + muxTag + ", " +
395  GetColumnName() + " = " + nameTag);
396 }
397 
399 {
400  public:
401  VideoSourceID(const MultiplexID *id, uint _sourceid) :
402  StandardSetting(this),
403  MuxDBStorage(this, id, "sourceid")
404  {
405  setVisible(false);
406  setValue(_sourceid);
407  }
408  virtual void edit(MythScreenType * /*screen*/) { }
409  virtual void resultEdit(DialogCompletionEvent * /*dce*/) { }
410 };
411 
413 {
414  public:
416  bool is_dvb_country,
417  bool is_atsc_country) :
418  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "sistandard")
419  {
420  setLabel(QObject::tr("Digital TV Standard"));
421  setHelpText(QObject::tr(
422  "Guiding standard to use for making sense of the "
423  "data streams after they have been demodulated, "
424  "error corrected and demultiplexed."));
425  if (is_dvb_country)
426  addSelection(QObject::tr("DVB"), "dvb");
427 
428  if (is_atsc_country)
429  {
430  addSelection(QObject::tr("ATSC"), "atsc");
431  addSelection(QObject::tr("OpenCable"), "opencable");
432  }
433 
434  addSelection(QObject::tr("MPEG"), "mpeg");
435  };
436 };
437 
439 {
440  public:
441  Frequency(const MultiplexID *id, bool in_kHz = false) :
442  MythUITextEditSetting(this), MuxDBStorage(this, id, "frequency")
443  {
444  QString hz = (in_kHz) ? "kHz" : "Hz";
445  setLabel(QObject::tr("Frequency") + " (" + hz + ")");
446  setHelpText(QObject::tr(
447  "Frequency (Option has no default).\n"
448  "The frequency for this channel in") + " " + hz + ".");
449  };
450 };
451 
453 {
454  public:
455  explicit DVBSymbolRate(const MultiplexID *id) :
456  MythUIComboBoxSetting(this, true), MuxDBStorage(this, id, "symbolrate")
457  {
458  setLabel(QObject::tr("Symbol Rate"));
459  setHelpText(
460  QObject::tr(
461  "Symbol Rate (symbols/sec).\n"
462  "Most DVB-S transponders transmit at 27.5 "
463  "million symbols per second."));
464  addSelection("3333000");
465  addSelection("22000000");
466  addSelection("23000000");
467  addSelection("27500000", "27500000", true);
468  addSelection("28000000");
469  addSelection("28500000");
470  addSelection("29500000");
471  addSelection("29900000");
472  };
473 };
474 
476 {
477  public:
478  explicit SignalPolarity(const MultiplexID *id) :
479  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "polarity")
480  {
481  setLabel(QObject::tr("Polarity"));
482  setHelpText(QObject::tr("Polarity (Option has no default)"));
483  addSelection(QObject::tr("Horizontal"), "h");
484  addSelection(QObject::tr("Vertical"), "v");
485  addSelection(QObject::tr("Right Circular"), "r");
486  addSelection(QObject::tr("Left Circular"), "l");
487  };
488 };
489 
491 {
492  public:
493  Modulation(const MultiplexID *id, uint nType);
494 };
495 
497  MythUIComboBoxSetting(this),
498  MuxDBStorage(this, id, ((CardUtil::OFDM == nType) ||
499  (CardUtil::DVBT2 == nType)) ?
500  "constellation" : "modulation")
501 {
502  setLabel(QObject::tr("Modulation"));
503  setHelpText(QObject::tr("Modulation, aka Constellation"));
504 
505  if (CardUtil::QPSK == nType)
506  {
507  // no modulation options
508  setVisible(false);
509  }
510  else if ((CardUtil::QAM == nType) || (CardUtil::OFDM == nType) ||
511  (CardUtil::DVBT2 == nType))
512  {
513  addSelection(QObject::tr("QAM Auto"), "auto");
514  addSelection("QAM-16", "qam_16");
515  addSelection("QAM-32", "qam_32");
516  addSelection("QAM-64", "qam_64");
517  addSelection("QAM-128", "qam_128");
518  addSelection("QAM-256", "qam_256");
519 
520  if ((CardUtil::OFDM == nType) || (CardUtil::DVBT2 == nType))
521  {
522  addSelection("QPSK", "qpsk");
523  }
524  }
525  else if ((CardUtil::ATSC == nType) ||
526  (CardUtil::HDHOMERUN == nType))
527  {
528  addSelection("8-VSB", "8vsb");
529  addSelection("QAM-64", "qam_64");
530  addSelection("QAM-256", "qam_256");
531  }
532  else
533  {
534  addSelection(QObject::tr("Analog"), "analog");
535  setVisible(false);
536  }
537 };
538 
540 {
541  public:
542  explicit DVBInversion(const MultiplexID *id) :
543  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "inversion")
544  {
545  setLabel(QObject::tr("Inversion"));
546  setHelpText(QObject::tr("Inversion (Default: Auto):\n"
547  "Most cards can autodetect this now, so leave it at Auto"
548  " unless it won't work."));
549  addSelection(QObject::tr("Auto"), "a");
550  addSelection(QObject::tr("On"), "1");
551  addSelection(QObject::tr("Off"), "0");
552  };
553 };
554 
556 {
557  public:
558  explicit DVBTBandwidth(const MultiplexID *id) :
559  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "bandwidth")
560  {
561  setLabel(QObject::tr("Bandwidth"));
562  setHelpText(QObject::tr("Bandwidth (Default: Auto)"));
563  addSelection(QObject::tr("Auto"), "a");
564  addSelection(QObject::tr("6 MHz"), "6");
565  addSelection(QObject::tr("7 MHz"), "7");
566  addSelection(QObject::tr("8 MHz"), "8");
567  };
568 };
569 
571 {
572  public:
574  MythUIComboBoxSetting(_storage)
575  {
576  addSelection(QObject::tr("Auto"), "auto");
577  addSelection(QObject::tr("None"), "none");
578  addSelection("1/2");
579  addSelection("2/3");
580  addSelection("3/4");
581  addSelection("4/5");
582  addSelection("5/6");
583  addSelection("6/7");
584  addSelection("7/8");
585  addSelection("8/9");
586  };
587 };
588 
591 {
592  public:
595  MuxDBStorage(this, id, "fec")
596  {
597  setLabel(QObject::tr("FEC"));
598  setHelpText(QObject::tr("Forward Error Correction (Default: Auto)"));
599  };
600 };
601 
604 {
605  public:
606  explicit DVBTCoderateLP(const MultiplexID *id) :
608  MuxDBStorage(this, id, "lp_code_rate")
609  {
610  setLabel(QObject::tr("LP Coderate"));
611  setHelpText(QObject::tr("Low Priority Code Rate (Default: Auto)"));
612  };
613 };
614 
617 {
618  public:
619  explicit DVBTCoderateHP(const MultiplexID *id) :
621  MuxDBStorage(this, id, "hp_code_rate")
622  {
623  setLabel(QObject::tr("HP Coderate"));
624  setHelpText(QObject::tr("High Priority Code Rate (Default: Auto)"));
625  };
626 };
627 
629 {
630  public:
631  explicit DVBTGuardInterval(const MultiplexID *id) :
632  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "guard_interval")
633  {
634  setLabel(QObject::tr("Guard Interval"));
635  setHelpText(QObject::tr("Guard Interval (Default: Auto)"));
636  addSelection(QObject::tr("Auto"), "auto");
637  addSelection("1/4");
638  addSelection("1/8");
639  addSelection("1/16");
640  addSelection("1/32");
641  };
642 };
643 
645 {
646  public:
647  explicit DVBTTransmissionMode(const MultiplexID *id) :
648  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "transmission_mode")
649  {
650  setLabel(QObject::tr("Trans. Mode"));
651  setHelpText(QObject::tr("Transmission Mode (Default: Auto)"));
652  addSelection(QObject::tr("Auto"), "a");
653  addSelection("2K", "2");
654  addSelection("8K", "8");
655  };
656 };
657 
659 {
660  public:
661  explicit DVBTHierarchy(const MultiplexID *id) :
662  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "hierarchy")
663  {
664  setLabel(QObject::tr("Hierarchy"));
665  setHelpText(QObject::tr("Hierarchy (Default: Auto)"));
666  addSelection(QObject::tr("Auto"), "a");
667  addSelection(QObject::tr("None"), "n");
668  addSelection("1");
669  addSelection("2");
670  addSelection("4");
671  }
672 };
673 
675 {
676  public:
677  explicit DVBTModulationSystem(const MultiplexID *id) :
678  MythUIComboBoxSetting(this), MuxDBStorage(this, id, "mod_sys")
679  {
680  setLabel(QObject::tr("Modulation System"));
681  setHelpText(QObject::tr("Modulation System (Default: DVB-T)"));
682  addSelection(QObject::tr("DVB-T"), "DVB-T");
683  addSelection(QObject::tr("DVB-T2"), "DVB-T2");
684  };
685 };
686 
688  uint sourceid, uint cardtype)
689  : m_mplexid(new MultiplexID())
690 {
691  setLabel(label);
692 
693  // Must be first.
694  m_mplexid->setValue(mplexid);
696  addChild(new VideoSourceID(m_mplexid, sourceid));
697 
698  if (CardUtil::OFDM == cardtype)
699  {
700  addChild(new DTVStandard(m_mplexid, true, false));
704  addChild(new Modulation(m_mplexid, cardtype));
705 
711  }
712  else if (CardUtil::DVBT2 == cardtype)
713  {
714  addChild(new DTVStandard(m_mplexid, true, false));
718  addChild(new Modulation(m_mplexid, cardtype));
720 
726  }
727  else if (CardUtil::QPSK == cardtype)
728  {
729  addChild(new DTVStandard(m_mplexid, true, false));
730  addChild(new Frequency(m_mplexid, true));
732 
736  }
737  else if (CardUtil::QAM == cardtype)
738  {
739  addChild(new DTVStandard(m_mplexid, true, false));
742 
743  addChild(new Modulation(m_mplexid, cardtype));
746  }
747  else if (CardUtil::ATSC == cardtype ||
748  CardUtil::HDHOMERUN == cardtype)
749  {
750  addChild(new DTVStandard(m_mplexid, false, true));
752  addChild(new Modulation(m_mplexid, cardtype));
753  }
754  else if ((CardUtil::FIREWIRE == cardtype) ||
755  (CardUtil::FREEBOX == cardtype))
756  {
757  addChild(new DTVStandard(m_mplexid, true, true));
758  }
759  else if ((CardUtil::V4L == cardtype) ||
760  (CardUtil::MPEG == cardtype))
761  {
763  addChild(new Modulation(m_mplexid, cardtype));
764  }
765 }
766 
767 bool TransportSetting::keyPressEvent(QKeyEvent *event)
768 {
769  QStringList actions;
770  bool handled =
771  GetMythMainWindow()->TranslateKeyPress("Global", event, actions);
772 
773  for (int i = 0; i < actions.size() && !handled; i++)
774  {
775  QString action = actions[i];
776 
777  if (action == "DELETE")
778  {
779  handled = true;
780  emit deletePressed();
781  }
782  else if (action == "MENU")
783  {
784  handled = true;
785  emit openMenu();
786  }
787  }
788 
789  return handled;
790 }
791 
793 {
794  return m_mplexid->getValue().toUInt();
795 }
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:798
uint getMplexId() const
void bindValue(const QString &placeholder, const QVariant &val)
Definition: mythdbcon.cpp:897
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:555
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:823
virtual void Load(void)
bool keyPressEvent(QKeyEvent *event)
QVector< StandardSetting * > m_list
void settingsChanged(StandardSetting *selectedSetting=NULL)
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:623
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 &)