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 <vector>
6 using namespace std;
7 
8 // qt
9 #include <QString>
10 #include <QCoreApplication>
11 
12 // mythtv
13 #include "mythtvexp.h"
14 
16 {
17  public:
19  m_grpid(other.m_grpid), m_name(other.m_name) {}
20  ChannelGroupItem(const uint grpid, const QString &name) :
21  m_grpid(grpid), m_name(name) {}
22 
23  bool operator == (uint grpid) const
24  { return m_grpid == grpid; }
25 
26  ChannelGroupItem& operator=(const ChannelGroupItem&) = default;
27 
28  public:
30  QString m_name;
31 };
32 typedef vector<ChannelGroupItem> ChannelGroupList;
33 
37 {
38  Q_DECLARE_TR_FUNCTIONS(ChannelGroup);
39 
40  public:
41  // ChannelGroup
42  static ChannelGroupList GetChannelGroups(bool includeEmpty = true);
43  static bool ToggleChannel(uint chanid, int changrpid, bool delete_chan);
44  static bool AddChannel(uint chanid, int changrpid);
45  static bool DeleteChannel(uint chanid, int changrpid);
46  static int GetNextChannelGroup(const ChannelGroupList &sorted, int grpid);
47  static QString GetChannelGroupName(int grpid);
48  static int GetChannelGroupId(const QString& changroupname);
49 
50  private:
51 
52 };
53 
54 #endif
bool operator==(MusicMetadata &a, MusicMetadata &b)
vector< ChannelGroupItem > ChannelGroupList
Definition: channelgroup.h:32
unsigned int uint
Definition: compat.h:140
ChannelGroupItem(const ChannelGroupItem &other)
Definition: channelgroup.h:18
#define MTV_PUBLIC
Definition: mythtvexp.h:15
const char * name
Definition: ParseText.cpp:328
ChannelGroupItem(const uint grpid, const QString &name)
Definition: channelgroup.h:20