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};
31using ChannelGroupList = std::vector<ChannelGroupItem>;
32
36{
38
39 public:
40 // ChannelGroup
41 static ChannelGroupList GetChannelGroups(bool includeEmpty = true);
42 static ChannelGroupList GetManualChannelGroups(bool includeEmpty = true);
43 static ChannelGroupList GetAutomaticChannelGroups(bool includeEmpty = true);
44 static bool ToggleChannel(uint chanid, int changrpid, bool delete_chan);
45 static bool AddChannel(uint chanid, int changrpid);
46 static bool DeleteChannel(uint chanid, int changrpid);
47 static int GetNextChannelGroup(const ChannelGroupList &sorted, int grpid);
48 static bool InChannelGroupList(const ChannelGroupList &groupList, int grpid);
49 static bool NotInChannelGroupList(const ChannelGroupList &groupList, int grpid);
50 static QString GetChannelGroupName(int grpid);
51 static int GetChannelGroupId(const QString& changroupname);
52 static void UpdateChannelGroups(void);
53 static int AddChannelGroup(const QString &groupName);
54 static bool RemoveChannelGroup(const QString &groupName);
55 static bool UpdateChannelGroup(const QString & oldName, const QString & newName);
56
57 private:
58
59};
60
61#endif
std::vector< ChannelGroupItem > ChannelGroupList
Definition: channelgroup.h:31
ChannelGroupItem & operator=(const ChannelGroupItem &)=default
ChannelGroupItem(const ChannelGroupItem &)=default
ChannelGroupItem(const uint grpid, QString name)
Definition: channelgroup.h:19
Q_DECLARE_TR_FUNCTIONS(ChannelGroup)
unsigned int uint
Definition: freesurround.h:24
bool operator==(MusicMetadata &a, MusicMetadata &b)
#define MTV_PUBLIC
Definition: mythtvexp.h:15
STL namespace.