MythTV master
v2commMethod.h
Go to the documentation of this file.
1
2// Program Name: V2commMethod.h
3// Created : Feb. 12, 2023
4//
5// Licensed under the GPL v2 or later, see COPYING for details
6//
8
9#ifndef V2COMMMETHOD_H_
10#define V2COMMMETHOD_H_
11
12#include <QObject>
13#include <QString>
14
16
17class V2CommMethod : public QObject
18{
19 Q_OBJECT
20 Q_CLASSINFO( "Version", "1.0" );
21
22
24 SERVICE_PROPERTY2( QString , LocalizedName );
25
26 public:
27
28 Q_INVOKABLE V2CommMethod(QObject *parent = nullptr)
29 : QObject( parent )
30 {
31 }
32
33 // void Copy( const V2CommMethod *src )
34 // {
35 // m_CommMethod = src->m_CommMethod ;
36 // m_Name = src->m_Name ;
37 // }
38
39 private:
41};
42
44
45class V2CommMethodList : public QObject
46{
47 Q_OBJECT
48 Q_CLASSINFO( "version", "1.0" );
49 Q_CLASSINFO( "CommMethods", "type=V2CommMethod");
50
51 SERVICE_PROPERTY2( QVariantList, CommMethods );
52
53 public:
54
55 Q_INVOKABLE V2CommMethodList(QObject *parent = nullptr)
56 : QObject( parent )
57 {
58 }
59
60 // void Copy( const V2CommMethodList *src )
61 // {
62 // CopyListContents< V2Country >( this, m_CommMethods, src->m_CommMethods );
63 // }
64
66 {
67 // We must make sure the object added to the QVariantList has
68 // a parent of 'this'
69
70 auto *pObject = new V2CommMethod( this );
71 m_CommMethods.append( QVariant::fromValue<QObject *>( pObject ));
72
73 return pObject;
74 }
75
76 private:
78};
79
81
82
83
84#endif
Q_CLASSINFO("version", "1.0")
Q_INVOKABLE V2CommMethodList(QObject *parent=nullptr)
Definition: v2commMethod.h:55
Q_CLASSINFO("CommMethods", "type=V2CommMethod")
SERVICE_PROPERTY2(QVariantList, CommMethods)
Q_DISABLE_COPY(V2CommMethodList)
V2CommMethod * AddNewCommMethod()
Definition: v2commMethod.h:65
Q_DISABLE_COPY(V2CommMethod)
SERVICE_PROPERTY2(QString, LocalizedName)
Q_CLASSINFO("Version", "1.0")
Q_DECLARE_METATYPE(std::chrono::seconds)