MythTV  master
channelgroup.h
Go to the documentation of this file.
1 #ifndef CHANNELGROUP_H
2 #define CHANNELGROUP_H
3 
4 // c/c++
5 #include <utility>
6 #include <vector>
7 
8 // qt
9 #include <QString>
10 #include <QCoreApplication>
11 
12 // mythtv
13 #include "mythtvexp.h"
14 
16 {
17  public:
19  ChannelGroupItem(const uint grpid, QString name) :
20  m_grpId(grpid), m_name(std::move(name)) {}
21 
22  bool operator == (uint grpid) const
23  { return m_grpId == grpid; }
24 
26 
27  public:
29  QString m_name;
30 };
31 using ChannelGroupList = std::vector<ChannelGroupItem>;
32 
36 {
38 
39  public:
40  // ChannelGroup
41  static ChannelGroupList GetChannelGroups(bool includeEmpty = true);
42  static bool ToggleChannel(uint chanid, int changrpid, bool delete_chan);
43  static bool AddChannel(uint chanid, int changrpid);
44  static bool DeleteChannel(uint chanid, int changrpid);
45  static int GetNextChannelGroup(const ChannelGroupList &sorted, int grpid);
46  static QString GetChannelGroupName(int grpid);
47  static int GetChannelGroupId(const QString& changroupname);
48 
49  private:
50 
51 };
52 
53 #endif
ChannelGroupItem::m_grpId
uint m_grpId
Definition: channelgroup.h:28
ChannelGroup
Definition: channelgroup.h:36
ChannelGroupItem
Definition: channelgroup.h:16
mythtvexp.h
operator==
bool operator==(MusicMetadata &a, MusicMetadata &b)
Definition: musicmetadata.cpp:47
ChannelGroup::Q_DECLARE_TR_FUNCTIONS
Q_DECLARE_TR_FUNCTIONS(ChannelGroup)
ChannelGroupList
std::vector< ChannelGroupItem > ChannelGroupList
Definition: channelgroup.h:31
uint
unsigned int uint
Definition: compat.h:140
ChannelGroupItem::m_name
QString m_name
Definition: channelgroup.h:29
MTV_PUBLIC
#define MTV_PUBLIC
Definition: mythtvexp.h:15
ChannelGroupItem::ChannelGroupItem
ChannelGroupItem(const uint grpid, QString name)
Definition: channelgroup.h:19
ChannelGroupItem::operator=
ChannelGroupItem & operator=(const ChannelGroupItem &)=default
ChannelGroupItem::ChannelGroupItem
ChannelGroupItem(const ChannelGroupItem &)=default