MythTV  0.28pre
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() : AutoIncrementDBSetting("dtv_multiplex", "mplexid")
48  {
49  setVisible(false);
50  setName("MPLEXID");
51  }
52 
53  public:
54  QString GetColumnName(void) const { return DBStorage::GetColumnName(); }
55 };
56 
58 {
59  public:
61  uint mplexid, uint sourceid, CardUtil::CARD_TYPES _cardtype);
62 
63  private:
65 };
66 
67 static QString pp_modulation(QString mod)
68 {
69  if (mod.endsWith("vsb"))
70  return mod.left(mod.length() - 3) + "-VSB";
71 
72  if (mod.startsWith("qam_"))
73  return "QAM-" + mod.mid(4, mod.length());
74 
75  if (mod == "analog")
76  return QObject::tr("Analog");
77 
78  return mod.toUpper();
79 }
80 
82 {
83 #if 0
84  LOG(VB_GENERAL, LOG_DEBUG, QString("TransportList::fillSelections() %1")
85  .arg(sourceid));
86 #endif
87 
88  clearSelections();
89  addSelection("(" + tr("New Transport") + ")", "0");
90 
91  setHelpText(QObject::tr(
92  "This section lists each transport that MythTV "
93  "currently knows about. The display fields are "
94  "video source, modulation, frequency, and when "
95  "relevant symbol rate, network id, and transport id."));
96 
97  if (!sourceid)
98  return;
99 
100  MSqlQuery query(MSqlQuery::InitCon());
101  query.prepare(
102  "SELECT mplexid, modulation, frequency, "
103  " symbolrate, networkid, transportid, constellation "
104  "FROM dtv_multiplex, videosource "
105  "WHERE dtv_multiplex.sourceid = :SOURCEID AND "
106  " dtv_multiplex.sourceid = videosource.sourceid "
107  "ORDER by networkid, transportid, frequency, mplexid");
108  query.bindValue(":SOURCEID", sourceid);
109 
110  if (!query.exec() || !query.isActive())
111  {
112  MythDB::DBError("TransportList::fillSelections", query);
113  return;
114  }
115 
116  while (query.next())
117  {
118  QString rawmod = (CardUtil::OFDM == cardtype) ?
119  query.value(6).toString() : query.value(1).toString();
120 
121  QString mod = pp_modulation(rawmod);
122  while (mod.length() < 7)
123  mod += " ";
124 
125  QString rate = query.value(3).toString();
126  rate = (rate == "0") ? "" : QString("rate %1").arg(rate);
127 
128  QString netid = query.value(4).toUInt() ?
129  QString("netid %1").arg(query.value(4).toUInt(), 5) : "";
130 
131  QString tid = query.value(5).toUInt() ?
132  QString("tid %1").arg(query.value(5).toUInt(), 5) : "";
133 
134  QString hz = (CardUtil::QPSK == cardtype) ? "kHz" : "Hz";
135 
136  QString type = "";
137  if (CardUtil::OFDM == cardtype)
138  type = "(DVB-T)";
139  if (CardUtil::QPSK == cardtype)
140  type = "(DVB-S)";
141  if (CardUtil::QAM == cardtype)
142  type = "(DVB-C)";
143 
144  QString txt = QString("%1 %2 %3 %4 %5 %6 %7")
145  .arg(mod).arg(query.value(2).toString())
146  .arg(hz).arg(rate).arg(netid).arg(tid).arg(type);
147 
148  addSelection(txt, query.value(0).toString());
149  }
150 }
151 
153 {
154  vector<uint> cardids;
155 
156  // Work out what card we have.. (doesn't always work well)
157  MSqlQuery query(MSqlQuery::InitCon());
158  query.prepare(
159  "SELECT capturecard.cardid "
160  "FROM capturecard "
161  "WHERE capturecard.sourceid = :SOURCEID AND "
162  " capturecard.hostname = :HOSTNAME");
163  query.bindValue(":SOURCEID", sourceid);
164  query.bindValue(":HOSTNAME", gCoreContext->GetHostName());
165 
166  if (!query.exec() || !query.isActive())
167  {
168  MythDB::DBError("TransportWizard()", query);
169  return CardUtil::ERROR_PROBE;
170  }
171  else
172  {
173  while (query.next())
174  cardids.push_back(query.value(0).toUInt());
175  }
176 
177  if (cardids.empty())
178  {
181  QObject::tr("Transport Editor"),
182  QObject::tr(
183  "Sorry, the Transport Editor can only be used to "
184  "edit transports which are connected to a card input."));
185 
186  return CardUtil::ERROR_PROBE;
187  }
188 
189  vector<CardUtil::CARD_TYPES> cardtypes;
190 
191  vector<uint>::const_iterator it = cardids.begin();
192  for (; it != cardids.end(); ++it)
193  {
195  QString cardtype = CardUtil::GetRawCardType(*it);
196  if (cardtype == "DVB")
197  cardtype = CardUtil::ProbeSubTypeName(*it);
198  nType = CardUtil::toCardType(cardtype);
199 
200  if ((CardUtil::ERROR_OPEN == nType) ||
201  (CardUtil::ERROR_UNKNOWN == nType) ||
202  (CardUtil::ERROR_PROBE == nType))
203  {
206  QObject::tr("Transport Editor"),
207  QObject::tr(
208  "Failed to probe a capture card connected to this "
209  "transport's video source. Please make sure the "
210  "backend is not running."));
211 
212  return CardUtil::ERROR_PROBE;
213  }
214 
215  cardtypes.push_back(nType);
216  }
217 
218  // This should never happen... (unless DB has changed under us)
219  if (cardtypes.empty())
220  return CardUtil::ERROR_PROBE;
221 
222  for (uint i = 1; i < cardtypes.size(); i++)
223  {
224  CardUtil::CARD_TYPES typeA = cardtypes[i - 1];
225  typeA = (CardUtil::HDHOMERUN == typeA) ? CardUtil::ATSC : typeA;
226  typeA = (CardUtil::MPEG == typeA) ? CardUtil::V4L : typeA;
227 
228  CardUtil::CARD_TYPES typeB = cardtypes[i + 0];
229  typeB = (CardUtil::HDHOMERUN == typeB) ? CardUtil::ATSC : typeB;
230  typeB = (CardUtil::MPEG == typeB) ? CardUtil::V4L : typeB;
231 
232  if (typeA == typeB)
233  continue;
234 
237  QObject::tr("Transport Editor"),
238  QObject::tr(
239  "The Video Sources to which this Transport is connected "
240  "are incompatible, please create separate video sources "
241  "for these cards. "));
242 
243  return CardUtil::ERROR_PROBE;
244  }
245 
246  return cardtypes[0];
247 }
248 
250 {
251 #if 0
252  LOG(VB_GENERAL, LOG_DEBUG, QString("TransportList::SetSourceID(%1)")
253  .arg(_sourceid));
254 #endif
255 
256  if (!_sourceid)
257  {
258  sourceid = 0;
259  }
260  else
261  {
262  cardtype = get_cardtype(_sourceid);
263  sourceid = ((CardUtil::ERROR_OPEN == cardtype) ||
264  (CardUtil::ERROR_UNKNOWN == cardtype) ||
265  (CardUtil::ERROR_PROBE == cardtype)) ? 0 : _sourceid;
266  }
267 
268  fillSelections();
269 }
270 
272  m_videosource(new VideoSourceSelector(sourceid, QString::null, false)),
273  m_list(new TransportList())
274 {
275  setLabel(tr("Multiplex Editor"));
276 
278 
280  addChild(m_list);
281 
282  connect(m_videosource, SIGNAL(valueChanged(const QString&)),
283  m_list, SLOT( SetSourceID( const QString&)));
284 
285  connect(m_list, SIGNAL(accepted(int)), this, SLOT(Edit()));
286  connect(m_list, SIGNAL(menuButtonPressed(int)), this, SLOT(Menu()));
287  connect(m_list, SIGNAL(editButtonPressed(int)), this, SLOT(Edit()));
288  connect(m_list, SIGNAL(deleteButtonPressed(int)), this, SLOT(Delete()));
289 }
290 
292 {
294 
295  return kDialogCodeRejected;
296 }
297 
299 {
300  uint sourceid = m_videosource->getValue().toUInt();
301  CardUtil::CARD_TYPES cardtype = get_cardtype(sourceid);
302 
303  if ((CardUtil::ERROR_OPEN != cardtype) &&
304  (CardUtil::ERROR_UNKNOWN != cardtype) &&
305  (CardUtil::ERROR_PROBE != cardtype))
306  {
307  uint mplexid = m_list->getValue().toUInt();
308  TransportWizard wiz(mplexid, sourceid, cardtype);
309  wiz.exec();
311  }
312 }
313 
315 {
316  uint mplexid = m_list->getValue().toInt();
317 
319  GetMythMainWindow(), "",
320  tr("Are you sure you would like to delete this transport?"),
321  tr("Yes, delete the transport"),
322  tr("No, don't"), kDialogCodeButton1);
323 
324  if (kDialogCodeButton0 != val)
325  return;
326 
327  MSqlQuery query(MSqlQuery::InitCon());
328  query.prepare("DELETE FROM dtv_multiplex WHERE mplexid = :MPLEXID");
329  query.bindValue(":MPLEXID", mplexid);
330 
331  if (!query.exec() || !query.isActive())
332  MythDB::DBError("TransportEditor -- delete multiplex", query);
333 
334  query.prepare("DELETE FROM channel WHERE mplexid = :MPLEXID");
335  query.bindValue(":MPLEXID", mplexid);
336 
337  if (!query.exec() || !query.isActive())
338  MythDB::DBError("TransportEditor -- delete channels", query);
339 
341 }
342 
344 {
345  uint mplexid = m_list->getValue().toInt();
346 
347  if (!mplexid)
348  {
349  Edit();
350  return;
351  }
352 
355  "",
356  tr("Transport Menu"),
357  tr("Edit..."),
358  tr("Delete..."), kDialogCodeButton0);
359 
360  if (kDialogCodeButton0 == val)
361  emit Edit();
362  else if (kDialogCodeButton1 == val)
363  emit Delete();
364  else
365  m_list->setFocus();
366 }
367 
369 {
370  protected:
371  MuxDBStorage(Setting *_setting, const MultiplexID *_id, QString _name) :
372  SimpleDBStorage(_setting, "dtv_multiplex", _name), mplexid(_id)
373  {
374  }
375 
376  virtual QString GetSetClause(MSqlBindings &bindings) const;
377  virtual QString GetWhereClause(MSqlBindings &bindings) const;
378 
380 };
381 
383 {
384  QString muxTag = ":WHERE" + mplexid->GetColumnName().toUpper();
385 
386  bindings.insert(muxTag, mplexid->getValue());
387 
388  // return query
389  return mplexid->GetColumnName() + " = " + muxTag;
390 }
391 
392 QString MuxDBStorage::GetSetClause(MSqlBindings &bindings) const
393 {
394  QString muxTag = ":SET" + mplexid->GetColumnName().toUpper();
395  QString nameTag = ":SET" + GetColumnName().toUpper();
396 
397  bindings.insert(muxTag, mplexid->getValue());
398  bindings.insert(nameTag, user->GetDBValue());
399 
400  // return query
401  return (mplexid->GetColumnName() + " = " + muxTag + ", " +
402  GetColumnName() + " = " + nameTag);
403 }
404 
405 
407 {
408  public:
409  VideoSourceID(const MultiplexID *id, uint _sourceid) :
410  IntegerSetting(this),
411  MuxDBStorage(this, id, "sourceid")
412  {
413  setVisible(false);
414  setValue(_sourceid);
415  }
416 };
417 
419 {
420  public:
422  bool is_dvb_country,
423  bool is_atsc_country) :
424  ComboBoxSetting(this), MuxDBStorage(this, id, "sistandard")
425  {
426  setLabel(QObject::tr("Digital TV Standard"));
427  setHelpText(QObject::tr(
428  "Guiding standard to use for making sense of the "
429  "data streams after they have been demodulated, "
430  "error corrected and demultiplexed."));
431  if (is_dvb_country)
432  addSelection(QObject::tr("DVB"), "dvb");
433 
434  if (is_atsc_country)
435  {
436  addSelection(QObject::tr("ATSC"), "atsc");
437  addSelection(QObject::tr("OpenCable"), "opencable");
438  }
439 
440  addSelection(QObject::tr("MPEG"), "mpeg");
441  };
442 };
443 
444 class Frequency : public LineEditSetting, public MuxDBStorage
445 {
446  public:
447  Frequency(const MultiplexID *id, bool in_kHz = false) :
448  LineEditSetting(this), MuxDBStorage(this, id, "frequency")
449  {
450  QString hz = (in_kHz) ? "kHz" : "Hz";
451  setLabel(QObject::tr("Frequency") + " (" + hz + ")");
452  setHelpText(QObject::tr(
453  "Frequency (Option has no default).\n"
454  "The frequency for this channel in") + " " + hz + ".");
455  };
456 };
457 
459 {
460  public:
462  ComboBoxSetting(this, true), MuxDBStorage(this, id, "symbolrate")
463  {
464  setLabel(QObject::tr("Symbol Rate"));
465  setHelpText(
466  QObject::tr(
467  "Symbol Rate (symbols/sec).\n"
468  "Most DVB-S transponders transmit at 27.5 "
469  "million symbols per second."));
470  addSelection("3333000");
471  addSelection("22000000");
472  addSelection("23000000");
473  addSelection("27500000", "27500000", true);
474  addSelection("28000000");
475  addSelection("28500000");
476  addSelection("29500000");
477  addSelection("29900000");
478  };
479 };
480 
482 {
483  public:
485  ComboBoxSetting(this), MuxDBStorage(this, id, "polarity")
486  {
487  setLabel(QObject::tr("Polarity"));
488  setHelpText(QObject::tr("Polarity (Option has no default)"));
489  addSelection(QObject::tr("Horizontal"), "h");
490  addSelection(QObject::tr("Vertical"), "v");
491  addSelection(QObject::tr("Right Circular"), "r");
492  addSelection(QObject::tr("Left Circular"), "l");
493  };
494 };
495 
497 {
498  public:
499  Modulation(const MultiplexID *id, uint nType);
500 };
501 
503  ComboBoxSetting(this),
504  MuxDBStorage(this, id, (CardUtil::OFDM == nType) ?
505  "constellation" : "modulation")
506 {
507  setLabel(QObject::tr("Modulation"));
508  setHelpText(QObject::tr("Modulation, aka Constellation"));
509 
510  if (CardUtil::QPSK == nType)
511  {
512  // no modulation options
513  setVisible(false);
514  }
515  else if ((CardUtil::QAM == nType) || (CardUtil::OFDM == nType))
516  {
517  addSelection(QObject::tr("QAM Auto"), "auto");
518  addSelection("QAM-16", "qam_16");
519  addSelection("QAM-32", "qam_32");
520  addSelection("QAM-64", "qam_64");
521  addSelection("QAM-128", "qam_128");
522  addSelection("QAM-256", "qam_256");
523 
524  if (CardUtil::OFDM == nType)
525  {
526  addSelection("QPSK", "qpsk");
527  }
528  }
529  else if ((CardUtil::ATSC == nType) ||
530  (CardUtil::HDHOMERUN == nType))
531  {
532  addSelection("8-VSB", "8vsb");
533  addSelection("QAM-64", "qam_64");
534  addSelection("QAM-256", "qam_256");
535  }
536  else
537  {
538  addSelection(QObject::tr("Analog"), "analog");
539  setVisible(false);
540  }
541 };
542 
544 {
545  public:
547  ComboBoxSetting(this), MuxDBStorage(this, id, "inversion")
548  {
549  setLabel(QObject::tr("Inversion"));
550  setHelpText(QObject::tr("Inversion (Default: Auto):\n"
551  "Most cards can autodetect this now, so leave it at Auto"
552  " unless it won't work."));
553  addSelection(QObject::tr("Auto"), "a");
554  addSelection(QObject::tr("On"), "1");
555  addSelection(QObject::tr("Off"), "0");
556  };
557 };
558 
560 {
561  public:
563  ComboBoxSetting(this), MuxDBStorage(this, id, "bandwidth")
564  {
565  setLabel(QObject::tr("Bandwidth"));
566  setHelpText(QObject::tr("Bandwidth (Default: Auto)"));
567  addSelection(QObject::tr("Auto"), "a");
568  addSelection(QObject::tr("6 MHz"), "6");
569  addSelection(QObject::tr("7 MHz"), "7");
570  addSelection(QObject::tr("8 MHz"), "8");
571  };
572 };
573 
575 {
576  public:
578  ComboBoxSetting(_storage)
579  {
580  addSelection(QObject::tr("Auto"), "auto");
581  addSelection(QObject::tr("None"), "none");
582  addSelection("1/2");
583  addSelection("2/3");
584  addSelection("3/4");
585  addSelection("4/5");
586  addSelection("5/6");
587  addSelection("6/7");
588  addSelection("7/8");
589  addSelection("8/9");
590  };
591 };
592 
595 {
596  public:
599  MuxDBStorage(this, id, "fec")
600  {
601  setLabel(QObject::tr("FEC"));
602  setHelpText(QObject::tr("Forward Error Correction (Default: Auto)"));
603  };
604 };
605 
608 {
609  public:
612  MuxDBStorage(this, id, "lp_code_rate")
613  {
614  setLabel(QObject::tr("LP Coderate"));
615  setHelpText(QObject::tr("Low Priority Code Rate (Default: Auto)"));
616  };
617 };
618 
621 {
622  public:
625  MuxDBStorage(this, id, "hp_code_rate")
626  {
627  setLabel(QObject::tr("HP Coderate"));
628  setHelpText(QObject::tr("High Priority Code Rate (Default: Auto)"));
629  };
630 };
631 
633 {
634  public:
636  ComboBoxSetting(this), MuxDBStorage(this, id, "guard_interval")
637  {
638  setLabel(QObject::tr("Guard Interval"));
639  setHelpText(QObject::tr("Guard Interval (Default: Auto)"));
640  addSelection(QObject::tr("Auto"), "auto");
641  addSelection("1/4");
642  addSelection("1/8");
643  addSelection("1/16");
644  addSelection("1/32");
645  };
646 };
647 
649 {
650  public:
652  ComboBoxSetting(this), MuxDBStorage(this, id, "transmission_mode")
653  {
654  setLabel(QObject::tr("Trans. Mode"));
655  setHelpText(QObject::tr("Transmission Mode (Default: Auto)"));
656  addSelection(QObject::tr("Auto"), "a");
657  addSelection("2K", "2");
658  addSelection("8K", "8");
659  };
660 };
661 
663 {
664  public:
666  ComboBoxSetting(this), MuxDBStorage(this, id, "hierarchy")
667  {
668  setLabel(QObject::tr("Hierarchy"));
669  setHelpText(QObject::tr("Hierarchy (Default: Auto)"));
670  addSelection(QObject::tr("Auto"), "a");
671  addSelection(QObject::tr("None"), "n");
672  addSelection("1");
673  addSelection("2");
674  addSelection("4");
675  }
676 };
677 
678 
680 {
681  public:
682  TransportPage(const MultiplexID *id, uint nType);
683 
684  protected:
685  const MultiplexID *id;
686 };
687 
690 {
691  setLabel(QObject::tr("Transport Options"));
692  setUseLabel(false);
693 
694  VerticalConfigurationGroup *left = NULL, *right = NULL;
695 
696  left = new VerticalConfigurationGroup(false, true, false, false);
697 
698  if (CardUtil::OFDM == nType)
699  {
700  left->addChild(new DTVStandard(id, true, false));
701  left->addChild(new Frequency(id));
702  left->addChild(new DVBTBandwidth(id));
703  left->addChild(new DVBInversion(id));
704  left->addChild(new Modulation(id, nType));
705 
706  right = new VerticalConfigurationGroup(false, true, false, false);
707  right->addChild(new DVBTCoderateLP(id));
708  right->addChild(new DVBTCoderateHP(id));
709  right->addChild(new DVBTTransmissionMode(id));
710  right->addChild(new DVBTGuardInterval(id));
711  right->addChild(new DVBTHierarchy(id));
712  }
713  else if (CardUtil::QPSK == nType)
714  {
715  left->addChild(new DTVStandard(id, true, false));
716  left->addChild(new Frequency(id, true));
717  left->addChild(new DVBSymbolRate(id));
718 
719  right = new VerticalConfigurationGroup(false, true, false, false);
720  right->addChild(new DVBInversion(id));
721  right->addChild(new DVBForwardErrorCorrection(id));
722  right->addChild(new SignalPolarity(id));
723  }
724  else if (CardUtil::QAM == nType)
725  {
726  left->addChild(new DTVStandard(id, true, false));
727  left->addChild(new Frequency(id));
728  left->addChild(new DVBSymbolRate(id));
729 
730  right = new VerticalConfigurationGroup(false, true, false, false);
731  right->addChild(new Modulation(id, nType));
732  right->addChild(new DVBInversion(id));
733  right->addChild(new DVBForwardErrorCorrection(id));
734  }
735  else if (CardUtil::ATSC == nType ||
736  CardUtil::HDHOMERUN == nType)
737  {
738  left->addChild(new DTVStandard(id, false, true));
739  left->addChild(new Frequency(id));
740  left->addChild(new Modulation(id, nType));
741  }
742  else if ((CardUtil::FIREWIRE == nType) ||
743  (CardUtil::FREEBOX == nType))
744  {
745  left->addChild(new DTVStandard(id, true, true));
746  }
747  else if ((CardUtil::V4L == nType) ||
748  (CardUtil::MPEG == nType))
749  {
750  left->addChild(new Frequency(id));
751  left->addChild(new Modulation(id, nType));
752  }
753 
754  addChild(left);
755 
756  if (right)
757  addChild(right);
758 };
759 
761  uint _mplexid, uint _sourceid, CardUtil::CARD_TYPES _cardtype) :
762  mplexid(new MultiplexID())
763 {
764  setLabel(QObject::tr("DVB Transport"));
765 
766  // Must be first.
767  mplexid->setValue(_mplexid);
768  addChild(mplexid);
769  addChild(new VideoSourceID(mplexid, _sourceid));
770  addChild(new TransportPage(mplexid, _cardtype));
771 }
Collection of helper utilities for capture card DB use.
Definition: cardutil.h:46
bool next(void)
Wrap QSqlQuery::next() so we can display the query results.
Definition: mythdbcon.cpp:785
TransportList * m_list
virtual QString GetSetClause(MSqlBindings &bindings) const
StorageUser * user
Definition: mythstorage.h:46
void setVisible(bool b)
Definition: settings.h:65
void bindValue(const QString &placeholder, const QVariant &val)
Definition: mythdbcon.cpp:884
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
DVBForwardErrorCorrectionSelector(Storage *_storage)
static DialogCode Show2ButtonPopup(MythMainWindow *parent, const QString &title, const QString &message, const QString &button1msg, const QString &button2msg, DialogCode default_button)
QVariant value(int i) const
Definition: mythdbcon.h:182
virtual void setHelpText(const QString &str)
Definition: settings.cpp:369
virtual void setVisible(bool b)
Definition: settings.cpp:695
QSqlQuery wrapper that fetches a DB connection from the connection pool.
Definition: mythdbcon.h:125
TransportListEditor(uint initial_sourceid)
uint GetSourceID(void) const
Definition: videosource.h:80
static QString GetRawCardType(uint cardid)
Definition: cardutil.h:263
DVBTHierarchy(const MultiplexID *id)
DVBForwardErrorCorrection(const MultiplexID *id)
virtual DialogCode exec(void)
TransportWizard(uint mplexid, uint sourceid, CardUtil::CARD_TYPES _cardtype)
unsigned int uint
Definition: compat.h:136
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
GLint GLenum GLsizei GLint GLenum GLenum type
static CardUtil::CARD_TYPES get_cardtype(uint sourceid)
virtual QString GetDBValue(void) const =0
virtual void addChild(Configurable *child)
DVBTBandwidth(const MultiplexID *id)
const MultiplexID * id
SignalPolarity(const MultiplexID *id)
MuxDBStorage(Setting *_setting, const MultiplexID *_id, QString _name)
void setLabel(const QString &label)
VideoSourceID(const MultiplexID *id, uint _sourceid)
virtual QString GetWhereClause(MSqlBindings &bindings) const
DialogCode
Definition: mythdialogs.h:21
DVBTTransmissionMode(const MultiplexID *id)
DVBInversion(const MultiplexID *id)
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:542
QString GetColumnName(void) const
Definition: mythstorage.h:43
static QString ProbeSubTypeName(uint cardid)
Definition: cardutil.cpp:525
bool isActive(void) const
Definition: mythdbcon.h:188
void addSelection(const QString &label, QString value=QString::null, bool select=false)
Definition: settings.cpp:733
MultiplexID * mplexid
A ConfigurationDialog that uses a ConfigurationGroup with one child per page.
DVBTCoderateHP(const MultiplexID *id)
DVBTGuardInterval(const MultiplexID *id)
MythMainWindow * GetMythMainWindow(void)
VideoSourceSelector * m_videosource
QString GetColumnName(void) const
DTVStandard(const MultiplexID *id, bool is_dvb_country, bool is_atsc_country)
static bool showOkPopup(MythMainWindow *parent, const QString &title, const QString &message, QString button_msg=QString())
VERBOSE_PREAMBLE Most Errors or other very important messages true
Definition: verbosedefs.h:91
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:810
CARD_TYPES
all the different capture cards
Definition: cardutil.h:50
void SetSourceID(uint _sourceid)
virtual void setHelpText(const QString &str)
Definition: settings.cpp:793
virtual void setLabel(QString str)
Definition: settings.h:57
virtual DialogCode exec(bool saveOnExec=true, bool doLoad=true)
virtual void fillSelections(void)
void setUseLabel(bool useit)
Modulation(const MultiplexID *id, uint nType)
Frequency(const MultiplexID *id, bool in_kHz=false)
virtual QString getValue(void) const
Definition: settings.cpp:91
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:610
static void DBError(const QString &where, const MSqlQuery &query)
Definition: mythdb.cpp:181
TransportPage(const MultiplexID *id, uint nType)
const MultiplexID * mplexid
QString GetHostName(void)
virtual void setValue(int newValue)
Definition: settings.h:182
void setFocus(void)
Definition: settings.h:381
static enum CARD_TYPES toCardType(const QString &name)
Definition: cardutil.h:74
static QString pp_modulation(QString mod)
void addChild(Configurable *child)
DVBSymbolRate(const MultiplexID *id)
DVBTCoderateLP(const MultiplexID *id)