13 QString fieldTag = (
":WHERE" +
id.getField().toUpper());
14 QString query(
id.getField() +
" = " + fieldTag);
16 bindings.insert(fieldTag,
id.getValue());
23 QString fieldTag = (
":SET" +
id.getField().toUpper());
26 QString query(
id.getField() +
" = " + fieldTag +
", " +
29 bindings.insert(fieldTag,
id.getValue());
45 setLabel(QObject::tr(
"Channel Name"));
55 setLabel(QObject::tr(
"Channel Number"));
66 setLabel(QObject::tr(
"Video Source"));
87 query.
prepare(
"SELECT name, sourceid "
101 query.
value(1).toString());
129 "If this channel uses a format other than TV "
130 "Format in the General Backend Setup screen, set it here."));
135 for (
int i = 0; i < list.size(); i++)
143 list.push_back(
"NTSC");
144 list.push_back(
"NTSC-JP");
145 list.push_back(
"PAL");
146 list.push_back(
"PAL-60");
147 list.push_back(
"PAL-BG");
148 list.push_back(
"PAL-DK");
149 list.push_back(
"PAL-D");
150 list.push_back(
"PAL-I");
151 list.push_back(
"PAL-M");
152 list.push_back(
"PAL-N");
153 list.push_back(
"PAL-NC");
154 list.push_back(
"SECAM");
155 list.push_back(
"SECAM-D");
156 list.push_back(
"SECAM-DK");
168 setLabel(QObject::tr(
"DataDirect") +
" " + QObject::tr(
"Time Offset"));
169 setHelpText(QObject::tr(
"Offset (in minutes) to apply to the program "
170 "guide data during import. This can be used when the "
171 "listings for a particular channel are in a different "
172 "time zone.") +
" " +
173 QObject::tr(
"(Works for DataDirect listings only.)"));
186 QObject::tr(
"Number of priority points to be added to any "
187 "recording on this channel during scheduling.")+
" "+
188 QObject::tr(
"Use a positive number as the priority if you "
189 "want this to be a preferred channel, a "
190 "negative one to deprecate this channel."));
201 setHelpText(QObject::tr(
"Image file to use as the icon for this "
202 "channel on various MythTV displays."));
212 setLabel(QObject::tr(
"Video filters"));
213 setHelpText(QObject::tr(
"Filters to be used when recording "
214 "from this channel. Not used with "
215 "hardware encoding cards."));
227 setLabel(QObject::tr(
"Playback filters"));
228 setHelpText(QObject::tr(
"Filters to be used when recordings "
229 "from this channel are viewed. "
230 "Start with a plus to append to the "
231 "global playback filters."));
244 "ID used by listing services to get an exact "
245 "correspondance between a channel in your line-up "
246 "and a channel in their database. Normally this is "
247 "set automatically when 'mythfilldatabase' is run."));
264 QFile file(xmltvFile);
265 if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
270 while (!file.atEnd())
272 QByteArray line = file.readLine();
274 if (line.startsWith(
"channel="))
276 QString
id = line.mid(8, -1).trimmed();
283 for (
int x = 0;
x < idList.size();
x++)
298 setLabel(QObject::tr(
"Commercial Detection Method"));
300 "commercial detection used for recordings on this channel or "
301 "skips detection by marking the channel as Commercial Free."));
307 for (
uint i = 0; i < tmp.size(); i++)
320 setHelpText(QObject::tr(
"If enabled, the channel will be visible in the "
331 setLabel(QObject::tr(
"Use on air guide"));
332 setHelpText(QObject::tr(
"If enabled, guide information for this "
333 "channel will be updated using 'Over-the-Air' "
334 "program listings."));
348 setLabel(QObject::tr(
"Frequency")+
" "+QObject::tr(
"or")+
" "+
349 QObject::tr(
"Channel"));
351 "Specify either the exact frequency (in kHz) or "
352 "a valid channel for your 'TV Format'."));
363 setLabel(QObject::tr(
"Finetune")+
" (kHz)");
364 setHelpText(QObject::tr(
"Value to be added to your desired frequency "
365 "(in kHz) for 'fine tuning'."));
387 setLabel(QObject::tr(
"Brightness"));
413 uint default_sourceid) :
416 setLabel(QObject::tr(
"Channel Options - Common"));
472 bool supports_eit =
true;
473 bool uses_eit_only =
false;
476 query.
prepare(
"SELECT cardtype "
477 "FROM capturecard, videosource, cardinput "
478 "WHERE cardinput.sourceid = videosource.sourceid AND "
479 " cardinput.cardid = capturecard.cardid AND "
480 " videosource.sourceid = :SOURCEID");
487 supports_eit = (query.
size()) ?
false :
true;
491 query.
value(0).toString().toUpper());
494 query.
prepare(
"SELECT xmltvgrabber "
496 "WHERE sourceid = :SOURCEID");
503 uses_eit_only = (query.
size()) ?
true :
false;
506 uses_eit_only &= (query.
value(0).toString() ==
"eitonly");
519 setLabel(QObject::tr(
"Channel Options - Filters"));
529 setLabel(QObject::tr(
"Channel Options - Video4Linux"));
547 setLabel(QObject::tr(
"Channel Options - Raw Transport Stream"));
555 for (
uint i = 0; i < mx; i++)
569 for (
uint j = 0x101; j <= 0x1ff; j++)
573 sids[i]->addSelection(
575 .arg(desc).arg(j&0xff,2,16,QLatin1Char(
'0')),
576 QString::number(j),
false);
578 for (
uint j = 0x101; j <= 0x1ff; j++)
582 sids[i]->addSelection(
583 QString(
"0x%1").arg(j&0xff,2,16,QLatin1Char(
'0')),
584 QString::number(j),
false);
613 pid_cache_t::const_iterator it = pid_cache.begin();
614 for (
uint i = 0; i <
kMaxPIDs && it != pid_cache.end(); )
616 if (!(it->IsPermanent()))
622 pids[i]->setValue(QString(
"0x%1")
623 .arg(it->GetPID(),2,16,QLatin1Char(
'0')));
624 sids[i]->setValue(QString::number(it->GetComposite()&0x1ff));
625 pcrs[i]->setValue(it->IsPCRPID());
640 uint pid =
pids[i]->getValue().toUInt(&ok, 0);