X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=remote%2Fsource%2Fdiscoveryitem.h;fp=remote%2Fsource%2Fdiscoveryitem.h;h=a200b82f5406e9a5bb58beca7e450816dd6538ee;hb=1abfbdd94fa45883f6d742df00508715f79c9954;hp=0000000000000000000000000000000000000000;hpb=5a79899d5a888e9aa76f29cb889e77979062a4a1;p=xinema.git diff --git a/remote/source/discoveryitem.h b/remote/source/discoveryitem.h new file mode 100644 index 0000000..a200b82 --- /dev/null +++ b/remote/source/discoveryitem.h @@ -0,0 +1,34 @@ +#ifndef DISCOVERYITEM_H_ +#define DISCOVERYITEM_H_ + +#include +#include "discovery.h" + +class DiscoveryItem: public QQuickItem +{ + Q_OBJECT + + Q_PROPERTY(bool active READ is_active WRITE set_active NOTIFY active_changed) + Q_PROPERTY(QString serverName READ get_server_name NOTIFY server_name_changed) + +private: + Discovery discovery; + bool active; + QHostAddress server_addr; + +public: + DiscoveryItem(); + + void set_active(bool); + bool is_active() const { return active; } + QString get_server_name() const { return server_addr.toString(); } + +signals: + void server_name_changed(); + void active_changed(); + +private slots: + void server_discovered(const QHostAddress &); +}; + +#endif