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 #include "cardutil.h"
40 
42 class MultiplexID;
43 
44 /*
45  * Objects added for Transport Editing section
46  */
48 {
49  Q_OBJECT
50 
51  public:
52  TransportSetting(const QString &label, uint mplexid, uint sourceid,
53  uint cardtype);
54 
55  bool keyPressEvent(QKeyEvent *event) override; // StandardSetting
56 
57  uint getMplexId() const;
58 
59  signals:
60  void deletePressed();
61  void openMenu();
62 
63  private:
64  MultiplexID *m_mplexid {nullptr};
65 };
66 
67 // Page for selecting a transport to be created/edited
69 {
70  Q_OBJECT
71 
72  public:
73  explicit TransportListEditor(uint initial_sourceid);
74  void Load(void) override; // StandardSetting
75 
76  void SetSourceID(uint _sourceid);
77 
78  public slots:
79  void SetSourceID(const QString &_sourceid);
80  void Menu(TransportSetting *transport);
81  void NewTransport(void);
82 
83  private:
84  ~TransportListEditor() = default;
85  void Delete(TransportSetting *transport);
86 
87  private:
88  VideoSourceSelector *m_videosource {nullptr};
89  QVector<StandardSetting*> m_list;
90  uint m_sourceid {0};
92  bool m_isLoading {false};
93 };
94 
95 #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