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  grpid(other.grpid), name(other.name) {}
20  ChannelGroupItem(const uint _grpid, const QString &_name) :
21  grpid(_grpid), name(_name) {}
22 
23  bool operator == (uint _grpid) const
24  { return grpid == _grpid; }
25 
26  ChannelGroupItem& operator=(const ChannelGroupItem&);
27 
28  public:
30  QString 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, int 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(QString changroupname);
49 
50  private:
51 
52 };
53 
54 #endif
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
ChannelGroupItem(const uint _grpid, const QString &_name)
Definition: channelgroup.h:20
const char * name
Definition: ParseText.cpp:339
bool operator==(const DialogCode &a, const QDialog::DialogCode &b)
Definition: mythdialogs.h:38