MythTV  master
frontend.h
Go to the documentation of this file.
1 // Program Name: input.h
3 // Created : May. 30, 2014
4 //
5 // Copyright (c) 2014 Stuart Morgan <smorgan@mythtv.org>
6 //
7 // Licensed under the GPL v2 or later, see LICENSE for details
8 //
10 
11 #ifndef FRONTEND_H_
12 #define FRONTEND_H_
13 
14 #include <QString>
15 
18 
19 namespace DTC
20 {
21 
23 
24 class SERVICE_PUBLIC Frontend : public QObject
25 {
26  Q_OBJECT
27  Q_CLASSINFO( "version" , "1.0" );
28 
29  Q_PROPERTY( QString Name READ Name WRITE setName )
30  Q_PROPERTY( QString IP READ IP WRITE setIP )
31  Q_PROPERTY( int Port READ Port WRITE setPort )
32  Q_PROPERTY( int OnLine READ OnLine WRITE setOnLine )
33 
34  PROPERTYIMP_REF( QString , Name )
35  PROPERTYIMP_REF( QString , IP )
36  PROPERTYIMP ( int , Port )
37  PROPERTYIMP ( bool , OnLine )
38 
39  public:
40 
41  static inline void InitializeCustomTypes();
42 
43  Q_INVOKABLE Frontend(QObject *parent = nullptr)
44  : QObject ( parent ),
45  m_Port(0), m_OnLine(false)
46  {
47  }
48 
49  void Copy( const Frontend *src )
50  {
51  m_Name = src->m_Name;
52  m_IP = src->m_IP;
53  m_Port = src->m_Port;
54  m_OnLine = src->m_OnLine;
55  }
56 
57  private:
58  Q_DISABLE_COPY(Frontend);
59 };
60 
62 {
63  qRegisterMetaType< Frontend* >();
64 }
65 
66 } // namespace DTC
67 
68 #endif
false
VERBOSE_PREAMBLE false
Definition: verbosedefs.h:89
SERVICE_PUBLIC
#define SERVICE_PUBLIC
Definition: serviceexp.h:9
datacontracthelper.h
serviceexp.h
DTC::Frontend::Copy
void Copy(const Frontend *src)
Definition: frontend.h:49
DTC::Frontend::InitializeCustomTypes
static void InitializeCustomTypes()
Definition: frontend.h:61
PROPERTYIMP
#define PROPERTYIMP(type, name)
Definition: datacontracthelper.h:56
Name
Definition: channelsettings.cpp:71
DTC
Definition: datacontracthelper.h:123
PROPERTYIMP_REF
#define PROPERTYIMP_REF(type, name)
Definition: datacontracthelper.h:70
DTC::Frontend
Definition: frontend.h:24