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
36 #include "mythtvexp.h"
37 #include "mythdbcon.h"
38 #include "cardutil.h"
39 #include "standardsettings.h"
40 #include "scanwizardconfig.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 DoAddFullTS(void) const;
96  bool DoTestDecryption(void) const;
97  bool DoScanOpenTV(void) const;
98 
99  protected:
100  VideoSourceSelector *m_videoSource {nullptr};
101  InputSelector *m_input {nullptr};
102  ScanTypeSetting *m_scanType {nullptr};
103  ScanOptionalConfig *m_scanConfig {nullptr};
104  DesiredServices *m_services {nullptr};
105  FreeToAirOnly *m_ftaOnly {nullptr};
106  ChannelNumbersOnly *m_lcnOnly {nullptr};
107  CompleteChannelsOnly *m_completeOnly {nullptr};
108  FullChannelSearch *m_fullSearch {nullptr};
109  AddFullTS *m_addFullTS {nullptr};
110  TrustEncSISetting *m_trustEncSI {nullptr};
111  // End of members moved from ScanWizardConfig
112 };
113 
114 #endif // SCANWIZARD_H
unsigned int slots[4]
Definition: element.c:38
QString GetFrequencyStandard(void) const
Definition: scanwizard.h:80
QString GetFilename(void) const
Definition: scanwizard.h:76
bool DoIgnoreSignalTimeout(void) const
Definition: scanwizard.h:87
QString GetFrequencyTable(void) const
Definition: scanwizard.h:82
#define MTV_PUBLIC
Definition: mythtvexp.h:15
QString GetModulation(void) const
Definition: scanwizard.h:72
uint GetScanID(void) const
Definition: scanwizard.h:71
unsigned int uint
Definition: compat.h:140
uint GetMultiplex(void) const
Definition: scanwizard.h:77
int GetScanType(void) const
Definition: scanwizard.h:73
QString GetInputName(void) const
Definition: scanwizard.h:75
ServiceRequirements
bool DoFollowNIT(void) const
Definition: scanwizard.h:89
bool GetFrequencyTableRange(QString &start, QString &end) const
Definition: scanwizard.h:78
uint GetCardID(void) const
Definition: scanwizard.h:74
QMap< QString, QString > GetStartChan(void) const
Definition: scanwizard.h:84