Permalink
Please
sign in to comment.
Showing
with
657 additions
and 197 deletions.
- +4 β0 remote.pro
- +61 β14 sources/entities/blind.cpp
- +25 β12 sources/entities/blind.h
- +37 β0 sources/entities/blindinterface.h
- +20 β22 sources/entities/entities.cpp
- +2 β0 sources/entities/entities.h
- +5 β2 sources/entities/entitiesinterface.h
- +32 β4 sources/entities/entity.cpp
- +25 β14 sources/entities/entity.h
- +41 β0 sources/entities/entityinterface.h
- +73 β22 sources/entities/light.cpp
- +30 β18 sources/entities/light.h
- +38 β0 sources/entities/lightinterface.h
- +133 β46 sources/entities/mediaplayer.cpp
- +80 β41 sources/entities/mediaplayer.h
- +48 β0 sources/entities/mediaplayerinterface.h
- +2 β1 sources/entities/remote.cpp
- +1 β1 sources/entities/remote.h
@@ -0,0 +1,37 @@ | ||
#ifndef BLINDINTERFACE_H | ||
#define BLINDINTERFACE_H | ||
|
||
#include "entityinterface.h" | ||
|
||
/// This class is a work arround to make the feature enum available in the interface and in the specifc entity class. | ||
/// Qt cannot create metadata describing an enum contained in the interface | ||
/// In the specific entity class it is only needed to generically convert the feature enum to a string and back | ||
class BlindDef : QObject | ||
{ | ||
Q_OBJECT | ||
public: | ||
enum class Attributes { STATE, POSITION }; | ||
Q_ENUM (Attributes) | ||
|
||
explicit BlindDef(QObject *parent = nullptr) : QObject(parent) | ||
{} | ||
}; | ||
|
||
/// This interface allows integrations to access the specific attributes | ||
/// You get this interface from the generic entity using getSpecificInterface | ||
class BlindInterface | ||
{ | ||
public: | ||
virtual ~BlindInterface (); | ||
|
||
virtual bool state() = 0; | ||
virtual int position() = 0; | ||
}; | ||
|
||
QT_BEGIN_NAMESPACE | ||
#define BlindInterface_iid "YIO.BlindInterface" | ||
Q_DECLARE_INTERFACE(BlindInterface, BlindInterface_iid) | ||
QT_END_NAMESPACE | ||
|
||
|
||
#endif // BLINDINTERFACE_H |

Oops, something went wrong.
0 comments on commit
d6b8fa1