MythTV
master
mythtv
libs
libmythtv
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
15
class
MTV_PUBLIC
ChannelGroupItem
16
{
17
public
:
18
ChannelGroupItem
(
const
ChannelGroupItem
&) =
default
;
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
25
ChannelGroupItem
& operator=(
const
ChannelGroupItem
&) =
default
;
26
27
public
:
28
uint
m_grpId
;
29
QString
m_name
;
30
};
31
using
ChannelGroupList
= std::vector<ChannelGroupItem>;
32
35
class
MTV_PUBLIC
ChannelGroup
36
{
37
Q_DECLARE_TR_FUNCTIONS(
ChannelGroup
);
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
ChannelGroupItem::m_grpId
uint m_grpId
Definition:
channelgroup.h:28
ChannelGroup
Definition:
channelgroup.h:35
ChannelGroupItem
Definition:
channelgroup.h:15
mythtvexp.h
operator==
bool operator==(MusicMetadata &a, MusicMetadata &b)
Definition:
musicmetadata.cpp:40
ChannelGroupList
std::vector< ChannelGroupItem > ChannelGroupList
Definition:
channelgroup.h:31
uint
unsigned int uint
Definition:
compat.h:81
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
Generated on Mon Nov 25 2024 03:16:06 for MythTV by
1.8.17