MythTV
master
mythtv
libs
libmythtv
channelscan
frequencytablesetting.cpp
Go to the documentation of this file.
1
/* -*- Mode: c++ -*-
2
* vim: set expandtab tabstop=4 shiftwidth=4:
3
*
4
* Original Project
5
* MythTV http://www.mythtv.org
6
*
7
* Copyright (c) 2004, 2005 John Pullan <john@pullan.org>
8
* Copyright (c) 2005 - 2007 Daniel Kristjansson
9
*
10
* Description:
11
* Collection of classes to provide channel scanning functionallity
12
*
13
* This program is free software; you can redistribute it and/or
14
* modify it under the terms of the GNU General Public License
15
* as published by the Free Software Foundation; either version 2
16
* of the License, or (at your option) any later version.
17
*
18
* This program is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with this program; if not, write to the Free Software
25
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
26
* Or, point your browser to http://www.gnu.org/copyleft/gpl.html
27
*
28
*/
29
30
#include "
frequencytablesetting.h
"
31
32
// libmythbase headers
33
#include "
libmythbase/mythcorecontext.h
"
34
#include "
libmythbase/mythlocale.h
"
35
36
// Frequency tables for USA/ATSC broadcast and cable networks
37
ScanFrequencyTable::ScanFrequencyTable
()
38
{
39
addSelection
(QObject::tr(
"Broadcast"
),
"us"
,
true
);
40
addSelection
(QObject::tr(
"Cable"
) +
" "
+
41
QObject::tr(
"High"
),
"uscablehigh"
,
false
);
42
addSelection
(QObject::tr(
"Cable HRC"
) +
" "
+
43
QObject::tr(
"High"
),
"ushrchigh"
,
false
);
44
addSelection
(QObject::tr(
"Cable IRC"
) +
" "
+
45
QObject::tr(
"High"
),
"usirchigh"
,
false
);
46
addSelection
(QObject::tr(
"Cable"
),
"uscable"
,
false
);
47
addSelection
(QObject::tr(
"Cable HRC"
),
"ushrc"
,
false
);
48
addSelection
(QObject::tr(
"Cable IRC"
),
"usirc"
,
false
);
49
50
setLabel
(QObject::tr(
"Frequency Table"
));
51
setHelpText
(QObject::tr(
"Frequency table to use."
) +
" "
+
52
QObject::tr(
53
"The option of scanning only \"High\" "
54
"frequency channels is useful because most "
55
"digital channels are on the higher frequencies."
));
56
}
57
58
// Frequency tables for DVB-T/T2 terrestrial broadcast per country
59
ScanCountry::ScanCountry
()
60
{
61
// Default to saved country
62
QString country =
gCoreContext
->
GetLocale
()->
GetCountryCode
().toLower();
63
64
setLabel
(QObject::tr(
"Country"
));
65
addSelection
(QObject::tr(
"Australia"
),
"au"
, country ==
"au"
);
66
addSelection
(QObject::tr(
"Chile"
),
"cl"
, country ==
"cl"
);
67
addSelection
(QObject::tr(
"Czech Republic"
),
"cz"
, country ==
"cz"
);
68
addSelection
(QObject::tr(
"Denmark"
),
"dk"
, country ==
"dk"
);
69
addSelection
(QObject::tr(
"Finland"
),
"fi"
, country ==
"fi"
);
70
addSelection
(QObject::tr(
"France"
),
"fr"
, country ==
"fr"
);
71
addSelection
(QObject::tr(
"Germany"
),
"de"
, country ==
"de"
);
72
addSelection
(QObject::tr(
"Greece"
),
"gr"
, country ==
"gr"
);
73
addSelection
(QObject::tr(
"Israel"
),
"il"
, country ==
"il"
);
74
addSelection
(QObject::tr(
"Italy"
),
"it"
, country ==
"it"
);
75
addSelection
(QObject::tr(
"Netherlands"
),
"nl"
, country ==
"nl"
);
76
addSelection
(QObject::tr(
"New Zealand"
),
"nz"
, country ==
"nz"
);
77
addSelection
(QObject::tr(
"Spain"
),
"es"
, country ==
"es"
);
78
addSelection
(QObject::tr(
"Sweden"
),
"se"
, country ==
"se"
);
79
addSelection
(QObject::tr(
"United Kingdom"
),
"gb"
, country ==
"gb"
);
80
}
81
82
// Frequency tables for DVB-C cable networks per country
83
ScanNetwork::ScanNetwork
()
84
{
85
// Default to saved country
86
QString country =
gCoreContext
->
GetLocale
()->
GetCountryCode
().toLower();
87
88
setLabel
(QObject::tr(
"Country"
));
89
addSelection
(QObject::tr(
"Germany"
),
"de"
, country ==
"de"
);
90
addSelection
(QObject::tr(
"Netherlands"
),
"nl"
, country ==
"nl"
);
91
addSelection
(QObject::tr(
"United Kingdom"
),
"gb"
, country ==
"gb"
);
92
}
MythCoreContext::GetLocale
MythLocale * GetLocale(void) const
Definition:
mythcorecontext.cpp:1766
ScanFrequencyTable::ScanFrequencyTable
ScanFrequencyTable()
Definition:
frequencytablesetting.cpp:37
ScanCountry::ScanCountry
ScanCountry()
Definition:
frequencytablesetting.cpp:59
MythLocale::GetCountryCode
QString GetCountryCode() const
Definition:
mythlocale.cpp:59
frequencytablesetting.h
StandardSetting::setHelpText
virtual void setHelpText(const QString &str)
Definition:
standardsettings.h:37
mythlocale.h
gCoreContext
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
Definition:
mythcorecontext.cpp:55
StandardSetting::setLabel
virtual void setLabel(QString str)
Definition:
standardsettings.h:34
MythUIComboBoxSetting::addSelection
void addSelection(const QString &label, QString value=QString(), bool select=false)
Definition:
standardsettings.cpp:502
mythcorecontext.h
ScanNetwork::ScanNetwork
ScanNetwork()
Definition:
frequencytablesetting.cpp:83
Generated on Thu Feb 6 2025 03:17:13 for MythTV by
1.8.17