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  ScanWizard(uint default_sourceid = 0,
50  uint default_cardid = 0,
51  QString default_inputname = QString());
52 
53  ~ScanWizard() = default;
54 
55  protected slots:
56  void Scan();
57  void SetInput(const QString &cardid_inputname);
58 
59  protected:
60  uint m_lastHWCardID {0};
61  uint m_lastHWCardType {CardUtil::ERROR_PROBE};
62  ChannelScannerGUI *m_scannerPane {nullptr};
63 
64  // The following are moved from deleted class ScanWizardConfig
65  public:
66  void SetupConfig(uint default_sourceid, uint default_cardid,
67  const QString& default_inputname);
68 
69  uint GetSourceID(void) const;
70  uint GetScanID(void) const { return m_scanConfig->GetScanID(); }
71  QString GetModulation(void) const { return m_scanConfig->GetModulation(); }
72  int GetScanType(void) const { return m_scanType->getValue().toInt();}
73  uint GetCardID(void) const { return m_input->GetCardID(); }
74  QString GetInputName(void) const { return m_input->GetInputName(); }
75  QString GetFilename(void) const { return m_scanConfig->GetFilename(); }
76  uint GetMultiplex(void) const { return m_scanConfig->GetMultiplex(); }
77  bool GetFrequencyTableRange(QString &start, QString &end) const
78  { return m_scanConfig->GetFrequencyTableRange(start, end); }
79  QString GetFrequencyStandard(void) const
80  { return m_scanConfig->GetFrequencyStandard(); }
81  QString GetFrequencyTable(void) const
82  { return m_scanConfig->GetFrequencyTable(); }
83  QMap<QString,QString> GetStartChan(void) const
84  { return m_scanConfig->GetStartChan(); }
85  ServiceRequirements GetServiceRequirements(void) const;
86  bool DoIgnoreSignalTimeout(void) const
87  { return m_scanConfig->DoIgnoreSignalTimeout(); }
88  bool DoFollowNIT(void) const
89  { return m_scanConfig->DoFollowNIT(); }
90  bool DoFreeToAirOnly(void) const;
91  bool DoChannelNumbersOnly(void) const;
92  bool DoCompleteChannelsOnly(void) const;
93  bool DoAddFullTS(void) const;
94  bool DoTestDecryption(void) const;
95 
96  protected:
97  VideoSourceSelector *m_videoSource {nullptr};
98  InputSelector *m_input {nullptr};
99  ScanTypeSetting *m_scanType {nullptr};
100  ScanOptionalConfig *m_scanConfig {nullptr};
101  DesiredServices *m_services {nullptr};
102  FreeToAirOnly *m_ftaOnly {nullptr};
103  ChannelNumbersOnly *m_lcnOnly {nullptr};
104  CompleteChannelsOnly *m_completeOnly{nullptr};
105  AddFullTS *m_addFullTS {nullptr};
106  TrustEncSISetting *m_trustEncSI {nullptr};
107 // End of members moved from ScanWizardConfig
108 };
109 
110 #endif // SCANWIZARD_H
unsigned int slots[4]
Definition: element.c:38
QString GetFrequencyStandard(void) const
Definition: scanwizard.h:79
QString GetFilename(void) const
Definition: scanwizard.h:75
bool DoIgnoreSignalTimeout(void) const
Definition: scanwizard.h:86
unsigned int uint
Definition: compat.h:140
QString GetFrequencyTable(void) const
Definition: scanwizard.h:81
#define MTV_PUBLIC
Definition: mythtvexp.h:15
QString GetModulation(void) const
Definition: scanwizard.h:71
uint GetScanID(void) const
Definition: scanwizard.h:70
uint GetMultiplex(void) const
Definition: scanwizard.h:76
int GetScanType(void) const
Definition: scanwizard.h:72
QString GetInputName(void) const
Definition: scanwizard.h:74
ServiceRequirements
bool DoFollowNIT(void) const
Definition: scanwizard.h:88
bool GetFrequencyTableRange(QString &start, QString &end) const
Definition: scanwizard.h:77
uint GetCardID(void) const
Definition: scanwizard.h:73
QMap< QString, QString > GetStartChan(void) const
Definition: scanwizard.h:83