MythTV  0.28pre
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Groups Pages
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 cardinput, capturecard "
161  "WHERE capturecard.cardid = cardinput.cardid AND "
162  " cardinput.sourceid = :SOURCEID AND "
163  " capturecard.hostname = :HOSTNAME");
164  query.bindValue(":SOURCEID", sourceid);
165  query.bindValue(":HOSTNAME", gCoreContext->GetHostName());
166 
167  if (!query.exec() || !query.isActive())
168  {
169  MythDB::DBError("TransportWizard()", query);
170  return CardUtil::ERROR_PROBE;
171  }
172  else
173  {
174  while (query.next())
175  cardids.push_back(query.value(0).toUInt());
176  }
177 
178  if (cardids.empty())
179  {
182  QObject::tr("Transport Editor"),
183  QObject::tr(
184  "Sorry, the Transport Editor can only be used to "
185  "edit transports which are connected to a card input."));
186 
187  return CardUtil::ERROR_PROBE;
188  }
189 
190  vector<CardUtil::CARD_TYPES> cardtypes;
191 
192  vector<uint>::const_iterator it = cardids.begin();
193  for (; it != cardids.end(); ++it)
194  {
196  QString cardtype = CardUtil::GetRawCardType(*it);
197  if (cardtype == "DVB")
198  cardtype = CardUtil::ProbeSubTypeName(*it);
199  nType = CardUtil::toCardType(cardtype);
200 
201  if ((CardUtil::ERROR_OPEN == nType) ||
202  (CardUtil::ERROR_UNKNOWN == nType) ||
203  (CardUtil::ERROR_PROBE == nType))
204  {
207  QObject::tr("Transport Editor"),
208  QObject::tr(
209  "Failed to probe a capture card connected to this "
210  "transport's video source. Please make sure the "
211  "backend is not running."));
212 
213  return CardUtil::ERROR_PROBE;
214  }
215 
216  cardtypes.push_back(nType);
217  }
218 
219  // This should never happen... (unless DB has changed under us)
220  if (cardtypes.empty())
221  return CardUtil::ERROR_PROBE;
222 
223  for (uint i = 1; i < cardtypes.size(); i++)
224  {
225  CardUtil::CARD_TYPES typeA = cardtypes[i - 1];
226  typeA = (CardUtil::HDHOMERUN == typeA) ? CardUtil::ATSC : typeA;
227  typeA = (CardUtil::MPEG == typeA) ? CardUtil::V4L : typeA;
228 
229  CardUtil::CARD_TYPES typeB = cardtypes[i + 0];
230  typeB = (CardUtil::HDHOMERUN == typeB) ? CardUtil::ATSC : typeB;
231  typeB = (CardUtil::MPEG == typeB) ? CardUtil::V4L : typeB;
232 
233  if (typeA == typeB)
234  continue;
235 
238  QObject::tr("Transport Editor"),
239  QObject::tr(
240  "The Video Sources to which this Transport is connected "
241  "are incompatible, please create seperate video sources "
242  "for these cards. "));
243 
244  return CardUtil::ERROR_PROBE;
245  }
246 
247  return cardtypes[0];
248 }
249 
251 {
252 #if 0
253  LOG(VB_GENERAL, LOG_DEBUG, QString("TransportList::SetSourceID(%1)")
254  .arg(_sourceid));
255 #endif
256 
257  if (!_sourceid)
258  {
259  sourceid = 0;
260  }
261  else
262  {
263  cardtype = get_cardtype(_sourceid);
264  sourceid = ((CardUtil::ERROR_OPEN == cardtype) ||
265  (CardUtil::ERROR_UNKNOWN == cardtype) ||
266  (CardUtil::ERROR_PROBE == cardtype)) ? 0 : _sourceid;
267  }
268 
269  fillSelections();
270 }
271 
273  m_videosource(new VideoSourceSelector(sourceid, QString::null, false)),
274  m_list(new TransportList())
275 {
276  setLabel(tr("Multiplex Editor"));
277 
279 
281  addChild(m_list);
282 
283  connect(m_videosource, SIGNAL(valueChanged(const QString&)),
284  m_list, SLOT( SetSourceID( const QString&)));
285 
286  connect(m_list, SIGNAL(accepted(int)), this, SLOT(Edit()));
287  connect(m_list, SIGNAL(menuButtonPressed(int)), this, SLOT(Menu()));
288  connect(m_list, SIGNAL(editButtonPressed(int)), this, SLOT(Edit()));
289  connect(m_list, SIGNAL(deleteButtonPressed(int)), this, SLOT(Delete()));
290 }
291 
293 {
295 
296  return kDialogCodeRejected;
297 }
298 
300 {
301  uint sourceid = m_videosource->getValue().toUInt();
302  CardUtil::CARD_TYPES cardtype = get_cardtype(sourceid);
303 
304  if ((CardUtil::ERROR_OPEN != cardtype) &&
305  (CardUtil::ERROR_UNKNOWN != cardtype) &&
306  (CardUtil::ERROR_PROBE != cardtype))
307  {
308  uint mplexid = m_list->getValue().toUInt();
309  TransportWizard wiz(mplexid, sourceid, cardtype);
310  wiz.exec();
312  }
313 }
314 
316 {
317  uint mplexid = m_list->getValue().toInt();
318 
320  GetMythMainWindow(), "",
321  tr("Are you sure you would like to delete this transport?"),
322  tr("Yes, delete the transport"),
323  tr("No, don't"), kDialogCodeButton1);
324 
325  if (kDialogCodeButton0 != val)
326  return;
327 
328  MSqlQuery query(MSqlQuery::InitCon());
329  query.prepare("DELETE FROM dtv_multiplex WHERE mplexid = :MPLEXID");
330  query.bindValue(":MPLEXID", mplexid);
331 
332  if (!query.exec() || !query.isActive())
333  MythDB::DBError("TransportEditor -- delete multiplex", query);
334 
335  query.prepare("DELETE FROM channel WHERE mplexid = :MPLEXID");
336  query.bindValue(":MPLEXID", mplexid);
337 
338  if (!query.exec() || !query.isActive())
339  MythDB::DBError("TransportEditor -- delete channels", query);
340 
342 }
343 
345 {
346  uint mplexid = m_list->getValue().toInt();
347 
348  if (!mplexid)
349  {
350  Edit();
351  return;
352  }
353 
356  "",
357  tr("Transport Menu"),
358  tr("Edit..."),
359  tr("Delete..."), kDialogCodeButton0);
360 
361  if (kDialogCodeButton0 == val)
362  emit Edit();
363  else if (kDialogCodeButton1 == val)
364  emit Delete();
365  else
366  m_list->setFocus();
367 }
368 
370 {
371  protected:
372  MuxDBStorage(Setting *_setting, const MultiplexID *_id, QString _name) :
373  SimpleDBStorage(_setting, "dtv_multiplex", _name), mplexid(_id)
374  {
375  }
376 
377  virtual QString GetSetClause(MSqlBindings &bindings) const;
378  virtual QString GetWhereClause(MSqlBindings &bindings) const;
379 
381 };
382 
384 {
385  QString muxTag = ":WHERE" + mplexid->GetColumnName().toUpper();
386 
387  bindings.insert(muxTag, mplexid->getValue());
388 
389  // return query
390  return mplexid->GetColumnName() + " = " + muxTag;
391 }
392 
393 QString MuxDBStorage::GetSetClause(MSqlBindings &bindings) const
394 {
395  QString muxTag = ":SET" + mplexid->GetColumnName().toUpper();
396  QString nameTag = ":SET" + GetColumnName().toUpper();
397 
398  bindings.insert(muxTag, mplexid->getValue());
399  bindings.insert(nameTag, user->GetDBValue());
400 
401  // return query
402  return (mplexid->GetColumnName() + " = " + muxTag + ", " +
403  GetColumnName() + " = " + nameTag);
404 }
405 
406 
408 {
409  public:
410  VideoSourceID(const MultiplexID *id, uint _sourceid) :
411  IntegerSetting(this),
412  MuxDBStorage(this, id, "sourceid")
413  {
414  setVisible(false);
415  setValue(_sourceid);
416  }
417 };
418 
420 {
421  public:
423  bool is_dvb_country,
424  bool is_atsc_country) :
425  ComboBoxSetting(this), MuxDBStorage(this, id, "sistandard")
426  {
427  setLabel(QObject::tr("Digital TV Standard"));
428  setHelpText(QObject::tr(
429  "Guiding standard to use for making sense of the "
430  "data streams after they have been demodulated, "
431  "error corrected and demultiplexed."));
432  if (is_dvb_country)
433  addSelection(QObject::tr("DVB"), "dvb");
434 
435  if (is_atsc_country)
436  {
437  addSelection(QObject::tr("ATSC"), "atsc");
438  addSelection(QObject::tr("OpenCable"), "opencable");
439  }
440 
441  addSelection(QObject::tr("MPEG"), "mpeg");
442  };
443 };
444 
445 class Frequency : public LineEditSetting, public MuxDBStorage
446 {
447  public:
448  Frequency(const MultiplexID *id, bool in_kHz = false) :
449  LineEditSetting(this), MuxDBStorage(this, id, "frequency")
450  {
451  QString hz = (in_kHz) ? "kHz" : "Hz";
452  setLabel(QObject::tr("Frequency") + " (" + hz + ")");
453  setHelpText(QObject::tr(
454  "Frequency (Option has no default).\n"
455  "The frequency for this channel in") + " " + hz + ".");
456  };
457 };
458 
460 {
461  public:
463  ComboBoxSetting(this, true), MuxDBStorage(this, id, "symbolrate")
464  {
465  setLabel(QObject::tr("Symbol Rate"));
466  setHelpText(
467  QObject::tr(
468  "Symbol Rate (symbols/sec).\n"
469  "Most DVB-S transponders transmit at 27.5 "
470  "million symbols per second."));
471  addSelection("3333000");
472  addSelection("22000000");
473  addSelection("27500000", "27500000", true);
474  addSelection("28000000");
475  addSelection("28500000");
476  addSelection("29900000");
477  };
478 };
479 
481 {
482  public:
484  ComboBoxSetting(this), MuxDBStorage(this, id, "polarity")
485  {
486  setLabel(QObject::tr("Polarity"));
487  setHelpText(QObject::tr("Polarity (Option has no default)"));
488  addSelection(QObject::tr("Horizontal"), "h");
489  addSelection(QObject::tr("Vertical"), "v");
490  addSelection(QObject::tr("Right Circular"), "r");
491  addSelection(QObject::tr("Left Circular"), "l");
492  };
493 };
494 
496 {
497  public:
498  Modulation(const MultiplexID *id, uint nType);
499 };
500 
502  ComboBoxSetting(this),
503  MuxDBStorage(this, id, (CardUtil::OFDM == nType) ?
504  "constellation" : "modulation")
505 {
506  setLabel(QObject::tr("Modulation"));
507  setHelpText(QObject::tr("Modulation, aka Constellation"));
508 
509  if (CardUtil::QPSK == nType)
510  {
511  // no modulation options
512  setVisible(false);
513  }
514  else if ((CardUtil::QAM == nType) || (CardUtil::OFDM == nType))
515  {
516  addSelection(QObject::tr("QAM Auto"), "auto");
517  addSelection("QAM-16", "qam_16");
518  addSelection("QAM-32", "qam_32");
519  addSelection("QAM-64", "qam_64");
520  addSelection("QAM-128", "qam_128");
521  addSelection("QAM-256", "qam_256");
522 
523  if (CardUtil::OFDM == nType)
524  {
525  addSelection("QPSK", "qpsk");
526  }
527  }
528  else if ((CardUtil::ATSC == nType) ||
529  (CardUtil::HDHOMERUN == nType))
530  {
531  addSelection("8-VSB", "8vsb");
532  addSelection("QAM-64", "qam_64");
533  addSelection("QAM-256", "qam_256");
534  }
535  else
536  {
537  addSelection(QObject::tr("Analog"), "analog");
538  setVisible(false);
539  }
540 };
541 
543 {
544  public:
546  ComboBoxSetting(this), MuxDBStorage(this, id, "inversion")
547  {
548  setLabel(QObject::tr("Inversion"));
549  setHelpText(QObject::tr("Inversion (Default: Auto):\n"
550  "Most cards can autodetect this now, so leave it at Auto"
551  " unless it won't work."));
552  addSelection(QObject::tr("Auto"), "a");
553  addSelection(QObject::tr("On"), "1");
554  addSelection(QObject::tr("Off"), "0");
555  };
556 };
557 
559 {
560  public:
562  ComboBoxSetting(this), MuxDBStorage(this, id, "bandwidth")
563  {
564  setLabel(QObject::tr("Bandwidth"));
565  setHelpText(QObject::tr("Bandwidth (Default: Auto)"));
566  addSelection(QObject::tr("Auto"), "a");
567  addSelection(QObject::tr("6 MHz"), "6");
568  addSelection(QObject::tr("7 MHz"), "7");
569  addSelection(QObject::tr("8 MHz"), "8");
570  };
571 };
572 
574 {
575  public:
577  ComboBoxSetting(_storage)
578  {
579  addSelection(QObject::tr("Auto"), "auto");
580  addSelection(QObject::tr("None"), "none");
581  addSelection("1/2");
582  addSelection("2/3");
583  addSelection("3/4");
584  addSelection("4/5");
585  addSelection("5/6");
586  addSelection("6/7");
587  addSelection("7/8");
588  addSelection("8/9");
589  };
590 };
591 
594 {
595  public:
598  MuxDBStorage(this, id, "fec")
599  {
600  setLabel(QObject::tr("FEC"));
601  setHelpText(QObject::tr("Forward Error Correction (Default: Auto)"));
602  };
603 };
604 
607 {
608  public:
611  MuxDBStorage(this, id, "lp_code_rate")
612  {
613  setLabel(QObject::tr("LP Coderate"));
614  setHelpText(QObject::tr("Low Priority Code Rate (Default: Auto)"));
615  };
616 };
617 
620 {
621  public:
624  MuxDBStorage(this, id, "hp_code_rate")
625  {
626  setLabel(QObject::tr("HP Coderate"));
627  setHelpText(QObject::tr("High Priority Code Rate (Default: Auto)"));
628  };
629 };
630 
632 {
633  public:
635  ComboBoxSetting(this), MuxDBStorage(this, id, "guard_interval")
636  {
637  setLabel(QObject::tr("Guard Interval"));
638  setHelpText(QObject::tr("Guard Interval (Default: Auto)"));
639  addSelection(QObject::tr("Auto"), "auto");
640  addSelection("1/4");
641  addSelection("1/8");
642  addSelection("1/16");
643  addSelection("1/32");
644  };
645 };
646 
648 {
649  public:
651  ComboBoxSetting(this), MuxDBStorage(this, id, "transmission_mode")
652  {
653  setLabel(QObject::tr("Trans. Mode"));
654  setHelpText(QObject::tr("Transmission Mode (Default: Auto)"));
655  addSelection(QObject::tr("Auto"), "a");
656  addSelection("2K", "2");
657  addSelection("8K", "8");
658  };
659 };
660 
662 {
663  public:
665  ComboBoxSetting(this), MuxDBStorage(this, id, "hierarchy")
666  {
667  setLabel(QObject::tr("Hierarchy"));
668  setHelpText(QObject::tr("Hierarchy (Default: Auto)"));
669  addSelection(QObject::tr("Auto"), "a");
670  addSelection(QObject::tr("None"), "n");
671  addSelection("1");
672  addSelection("2");
673  addSelection("4");
674  }
675 };
676 
677 
679 {
680  public:
681  TransportPage(const MultiplexID *id, uint nType);
682 
683  protected:
684  const MultiplexID *id;
685 };
686 
689 {
690  setLabel(QObject::tr("Transport Options"));
691  setUseLabel(false);
692 
693  VerticalConfigurationGroup *left = NULL, *right = NULL;
694 
695  left = new VerticalConfigurationGroup(false, true, false, false);
696 
697  if (CardUtil::OFDM == nType)
698  {
699  left->addChild(new DTVStandard(id, true, false));
700  left->addChild(new Frequency(id));
701  left->addChild(new DVBTBandwidth(id));
702  left->addChild(new DVBInversion(id));
703  left->addChild(new Modulation(id, nType));
704 
705  right = new VerticalConfigurationGroup(false, true, false, false);
706  right->addChild(new DVBTCoderateLP(id));
707  right->addChild(new DVBTCoderateHP(id));
708  right->addChild(new DVBTTransmissionMode(id));
709  right->addChild(new DVBTGuardInterval(id));
710  right->addChild(new DVBTHierarchy(id));
711  }
712  else if (CardUtil::QPSK == nType)
713  {
714  left->addChild(new DTVStandard(id, true, false));
715  left->addChild(new Frequency(id, true));
716  left->addChild(new DVBSymbolRate(id));
717 
718  right = new VerticalConfigurationGroup(false, true, false, false);
719  right->addChild(new DVBInversion(id));
720  right->addChild(new DVBForwardErrorCorrection(id));
721  right->addChild(new SignalPolarity(id));
722  }
723  else if (CardUtil::QAM == nType)
724  {
725  left->addChild(new DTVStandard(id, true, false));
726  left->addChild(new Frequency(id));
727  left->addChild(new DVBSymbolRate(id));
728 
729  right = new VerticalConfigurationGroup(false, true, false, false);
730  right->addChild(new Modulation(id, nType));
731  right->addChild(new DVBInversion(id));
732  right->addChild(new DVBForwardErrorCorrection(id));
733  }
734  else if (CardUtil::ATSC == nType ||
735  CardUtil::HDHOMERUN == nType)
736  {
737  left->addChild(new DTVStandard(id, false, true));
738  left->addChild(new Frequency(id));
739  left->addChild(new Modulation(id, nType));
740  }
741  else if ((CardUtil::FIREWIRE == nType) ||
742  (CardUtil::FREEBOX == nType))
743  {
744  left->addChild(new DTVStandard(id, true, true));
745  }
746  else if ((CardUtil::V4L == nType) ||
747  (CardUtil::MPEG == nType))
748  {
749  left->addChild(new Frequency(id));
750  left->addChild(new Modulation(id, nType));
751  }
752 
753  addChild(left);
754 
755  if (right)
756  addChild(right);
757 };
758 
760  uint _mplexid, uint _sourceid, CardUtil::CARD_TYPES _cardtype) :
761  mplexid(new MultiplexID())
762 {
763  setLabel(QObject::tr("DVB Transport"));
764 
765  // Must be first.
766  mplexid->setValue(_mplexid);
767  addChild(mplexid);
768  addChild(new VideoSourceID(mplexid, _sourceid));
769  addChild(new TransportPage(mplexid, _cardtype));
770 }
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:765
TransportList * m_list
virtual QString GetSetClause(MSqlBindings &bindings) const
StorageUser * user
Definition: mythstorage.h:46
void setVisible(bool b)
Definition: settings.h:66
void bindValue(const QString &placeholder, const QVariant &val)
Definition: mythdbcon.cpp:857
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:254
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:135
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
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:83
virtual void addChild(Configurable *child)
padding left
Definition: MythXMLTest.css:95
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:26
DVBTTransmissionMode(const MultiplexID *id)
DVBInversion(const MultiplexID *id)
border right
Definition: MythXMLTest.css:87
VERBOSE_PREAMBLE Most Errors or other very important messages true
Definition: verbosedefs.h:91
static MSqlQueryInfo InitCon(ConnectionReuse=kNormalConnection)
Only use this in combination with MSqlQuery constructor.
Definition: mythdbcon.cpp:529
QString GetColumnName(void) const
Definition: mythstorage.h:43
static QString ProbeSubTypeName(uint cardid)
Definition: cardutil.cpp:510
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())
bool prepare(const QString &query)
QSqlQuery::prepare() is not thread safe in Qt <= 3.3.2.
Definition: mythdbcon.cpp:790
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:58
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:597
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:183
void setFocus(void)
Definition: settings.h:382
static enum CARD_TYPES toCardType(const QString &name)
Definition: cardutil.h:73
static QString pp_modulation(QString mod)
void addChild(Configurable *child)
DVBSymbolRate(const MultiplexID *id)
DVBTCoderateLP(const MultiplexID *id)