MythTV master
v2lineup.h
Go to the documentation of this file.
1
2// Program Name: lineup.h
3// Created : Sep. 18, 2011
4//
5// Copyright (c) 2011 Robert McNamara <rmcnamara@mythtv.org>
6//
7// Licensed under the GPL v2 or later, see COPYING for details
8//
10
11#ifndef V2LINEUP_H_
12#define V2LINEUP_H_
13
14#include <QString>
15
17
18
20
21class V2Lineup : public QObject
22{
23 Q_OBJECT
24 Q_CLASSINFO( "Version" , "1.0" );
25
26 SERVICE_PROPERTY2( QString , LineupId )
27 SERVICE_PROPERTY2( QString , Name )
28 SERVICE_PROPERTY2( QString , DisplayName )
29 SERVICE_PROPERTY2( QString , Type )
30 SERVICE_PROPERTY2( QString , Postal )
31 SERVICE_PROPERTY2( QString , Device )
32
33 public:
34
35 Q_INVOKABLE V2Lineup(QObject *parent = nullptr)
36 : QObject ( parent )
37 {
38 }
39
40 void Copy( const V2Lineup *src )
41 {
42 m_LineupId = src->m_LineupId ;
43 m_Name = src->m_Name ;
44 m_DisplayName = src->m_DisplayName ;
45 m_Type = src->m_Type ;
46 m_Postal = src->m_Postal ;
47 m_Device = src->m_Device ;
48 }
49
50 private:
52};
53
55
56class V2LineupList : public QObject
57{
58 Q_OBJECT
59 Q_CLASSINFO( "Version", "1.0" );
60
61 Q_CLASSINFO( "Lineups", "type=V2Lineup");
62
63 SERVICE_PROPERTY2( QVariantList, Lineups );
64
65 public:
66
67 Q_INVOKABLE V2LineupList(QObject *parent = nullptr)
68 : QObject( parent )
69 {
70 }
71
72 void Copy( const V2LineupList *src )
73 {
74 CopyListContents< V2Lineup >( this, m_Lineups, src->m_Lineups );
75 }
76
78 {
79 // We must make sure the object added to the QVariantList has
80 // a parent of 'this'
81
82 auto *pObject = new V2Lineup( this );
83 m_Lineups.append( QVariant::fromValue<QObject *>( pObject ));
84
85 return pObject;
86 }
87
88 private:
90};
91
93
94#endif
A device containing images (ie. USB stick, CD, storage group etc)
void Copy(const V2LineupList *src)
Definition: v2lineup.h:72
V2Lineup * AddNewLineup()
Definition: v2lineup.h:77
Q_CLASSINFO("Lineups", "type=V2Lineup")
SERVICE_PROPERTY2(QVariantList, Lineups)
Q_INVOKABLE V2LineupList(QObject *parent=nullptr)
Definition: v2lineup.h:67
Q_DISABLE_COPY(V2LineupList)
Q_CLASSINFO("Version", "1.0")
void Copy(const V2Lineup *src)
Definition: v2lineup.h:40
Q_INVOKABLE V2Lineup(QObject *parent=nullptr)
Definition: v2lineup.h:35
Q_DISABLE_COPY(V2Lineup)
Q_CLASSINFO("Version", "1.0")
Q_DECLARE_METATYPE(std::chrono::seconds)
#define SERVICE_PROPERTY2(Type, Name)