MythTV  master
transporteditor.h
Go to the documentation of this file.
1 /*
2  * $Id$
3  * vim: set expandtab tabstop=4 shiftwidth=4:
4  *
5  * Original Project
6  * MythTV http://www.mythtv.org
7  *
8  * Author(s):
9  * John Pullan (john@pullan.org)
10  * Taylor Jacob (rtjacob@earthlink.net)
11  *
12  * Description:
13  * Collection of classes to provide dvb a transport editor
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 _TRANSPORT_EDITOR_H_
33 #define _TRANSPORT_EDITOR_H_
34 
35 #include <QObject>
36 
37 #include "mythtvexp.h"
38 #include "standardsettings.h"
39 
41 class MultiplexID;
42 
43 /*
44  * Objects added for Transport Editing section
45  */
47 {
48  Q_OBJECT
49 
50  public:
51  TransportSetting(const QString &label, uint mplexid, uint sourceid,
52  uint cardtype);
53 
54  bool keyPressEvent(QKeyEvent *event) override; // StandardSetting
55 
56  uint getMplexId() const;
57 
58  signals:
59  void deletePressed();
60  void openMenu();
61 
62  private:
63  MultiplexID *m_mplexid {nullptr};
64 };
65 
66 // Page for selecting a transport to be created/edited
68 {
69  Q_OBJECT
70 
71  public:
72  explicit TransportListEditor(uint initial_sourceid);
73  void Load(void) override; // StandardSetting
74 
75  void SetSourceID(uint _sourceid);
76 
77  public slots:
78  void SetSourceID(const QString &_sourceid);
79  void Menu(TransportSetting *transport);
80  void NewTransport(void);
81 
82  private:
83  ~TransportListEditor() = default;
84  void Delete(TransportSetting *transport);
85 
86  private:
87  VideoSourceSelector *m_videosource {nullptr};
88  QVector<StandardSetting*> m_list;
91  bool m_isLoading {false};
92 };
93 
94 #endif // _TRANSPORT_EDITOR_H_
uint getMplexId() const
unsigned int slots[4]
Definition: element.c:38
virtual void Load(void)
bool keyPressEvent(QKeyEvent *event) override
unsigned int uint
Definition: compat.h:140
#define MTV_PUBLIC
Definition: mythtvexp.h:15
QVector< StandardSetting * > m_list
TransportSetting(const QString &label, uint mplexid, uint sourceid, uint cardtype)
MultiplexID * m_mplexid