MythTV  master
scanwizard.h
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  * Author(s):
8  * John Pullan (john@pullan.org)
9  *
10  * Description:
11  * Collection of classes to provide dvb channel scanning
12  * functionallity
13  *
14  *
15  * This program is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU General Public License
17  * as published by the Free Software Foundation; either version 2
18  * of the License, or (at your option) any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * You should have received a copy of the GNU General Public License
26  * along with this program; if not, write to the Free Software
27  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
28  * Or, point your browser to http://www.gnu.org/copyleft/gpl.html
29  *
30  */
31 
32 #ifndef SCANWIZARD_H
33 #define SCANWIZARD_H
34 
35 // MythTV headers
37 #include "libmythbase/mythdbcon.h"
38 #include "libmythtv/cardutil.h"
40 #include "libmythtv/mythtvexp.h"
41 
42 class ChannelScannerGUI;
43 
45 {
46  Q_OBJECT
47 
48  public:
49  explicit ScanWizard(uint default_sourceid = 0,
50  uint default_cardid = 0,
51  const QString& default_inputname = QString());
52 
53  ~ScanWizard() override = default;
54 
55  protected slots:
56  void Scan();
57  void SetInput(const QString &cardid_inputname);
58  void SetPaneDefaults(const QString &cardid_inputname);
59 
60  protected:
61  uint m_lastHWCardID {0};
62  uint m_lastHWCardType {CardUtil::ERROR_PROBE};
63  ChannelScannerGUI *m_scannerPane {nullptr};
64 
65  // The following are moved from deleted class ScanWizardConfig
66  public:
67  void SetupConfig(uint default_sourceid, uint default_cardid,
68  const QString& default_inputname);
69 
70  uint GetSourceID(void) const;
71  uint GetScanID(void) const { return m_scanConfig->GetScanID(); }
72  QString GetModulation(void) const { return m_scanConfig->GetModulation(); }
73  int GetScanType(void) const { return m_scanType->getValue().toInt();}
74  uint GetCardID(void) const { return m_input->GetCardID(); }
75  QString GetInputName(void) const { return m_input->GetInputName(); }
76  QString GetFilename(void) const { return m_scanConfig->GetFilename(); }
77  uint GetMultiplex(void) const { return m_scanConfig->GetMultiplex(); }
78  bool GetFrequencyTableRange(QString &start, QString &end) const
79  { return m_scanConfig->GetFrequencyTableRange(start, end); }
80  QString GetFrequencyStandard(void) const
81  { return m_scanConfig->GetFrequencyStandard(); }
82  QString GetFrequencyTable(void) const
83  { return m_scanConfig->GetFrequencyTable(); }
84  QMap<QString,QString> GetStartChan(void) const
85  { return m_scanConfig->GetStartChan(); }
86  ServiceRequirements GetServiceRequirements(void) const;
87  bool DoIgnoreSignalTimeout(void) const
88  { return m_scanConfig->DoIgnoreSignalTimeout(); }
89  bool DoFollowNIT(void) const
90  { return m_scanConfig->DoFollowNIT(); }
91  bool DoFreeToAirOnly(void) const;
92  bool DoChannelNumbersOnly(void) const;
93  bool DoCompleteChannelsOnly(void) const;
94  bool DoFullChannelSearch(void) const;
95  bool DoRemoveDuplicates(void) const;
96  bool DoAddFullTS(void) const;
97  bool DoTestDecryption(void) const;
98  bool DoScanOpenTV(void) const;
99 
100  protected:
101  VideoSourceSelector *m_videoSource {nullptr};
102  InputSelector *m_input {nullptr};
103  ScanTypeSetting *m_scanType {nullptr};
104  ScanOptionalConfig *m_scanConfig {nullptr};
105  DesiredServices *m_services {nullptr};
106  FreeToAirOnly *m_ftaOnly {nullptr};
107  ChannelNumbersOnly *m_lcnOnly {nullptr};
108  CompleteChannelsOnly *m_completeOnly {nullptr};
109  FullChannelSearch *m_fullSearch {nullptr};
110  RemoveDuplicates *m_removeDuplicates {nullptr};
111  AddFullTS *m_addFullTS {nullptr};
112  TrustEncSISetting *m_trustEncSI {nullptr};
113  // End of members moved from ScanWizardConfig
114 };
115 
116 #endif // SCANWIZARD_H
RemoveDuplicates
Definition: channelscanmiscsettings.h:174
CompleteChannelsOnly
Definition: channelscanmiscsettings.h:139
ScanWizard::GetScanType
int GetScanType(void) const
Definition: scanwizard.h:73
ScanWizard::GetInputName
QString GetInputName(void) const
Definition: scanwizard.h:75
TrustEncSISetting
Definition: channelscanmiscsettings.h:204
ScanOptionalConfig
Definition: scanwizardconfig.h:123
mythtvexp.h
mythdbcon.h
ScanWizard::DoFollowNIT
bool DoFollowNIT(void) const
Definition: scanwizard.h:89
scanwizardconfig.h
ScanTypeSetting
Definition: scanwizardconfig.h:67
ChannelScannerGUI
Definition: channelscanner_gui.h:47
ScanWizard
Definition: scanwizard.h:44
VideoSourceSelector
Definition: videosource.h:57
ScanWizard::GetCardID
uint GetCardID(void) const
Definition: scanwizard.h:74
ScanWizard::GetStartChan
QMap< QString, QString > GetStartChan(void) const
Definition: scanwizard.h:84
CardUtil::ERROR_PROBE
@ ERROR_PROBE
Definition: cardutil.h:53
ServiceRequirements
ServiceRequirements
Definition: channelscantypes.h:4
ScanWizard::GetFrequencyTableRange
bool GetFrequencyTableRange(QString &start, QString &end) const
Definition: scanwizard.h:78
InputSelector
Definition: inputselectorsetting.h:35
uint
unsigned int uint
Definition: compat.h:81
FullChannelSearch
Definition: channelscanmiscsettings.h:157
standardsettings.h
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
ScanWizard::DoIgnoreSignalTimeout
bool DoIgnoreSignalTimeout(void) const
Definition: scanwizard.h:87
ScanWizard::GetFilename
QString GetFilename(void) const
Definition: scanwizard.h:76
ChannelNumbersOnly
Definition: channelscanmiscsettings.h:123
ScanWizard::GetFrequencyStandard
QString GetFrequencyStandard(void) const
Definition: scanwizard.h:80
cardutil.h
DesiredServices
Definition: channelscanmiscsettings.h:79
FreeToAirOnly
Definition: channelscanmiscsettings.h:109
ScanWizard::GetScanID
uint GetScanID(void) const
Definition: scanwizard.h:71
ScanWizard::GetFrequencyTable
QString GetFrequencyTable(void) const
Definition: scanwizard.h:82
ScanWizard::GetModulation
QString GetModulation(void) const
Definition: scanwizard.h:72
ScanWizard::GetMultiplex
uint GetMultiplex(void) const
Definition: scanwizard.h:77
GroupSetting
Definition: standardsettings.h:435
AddFullTS
Definition: channelscanmiscsettings.h:190