|
@@ -55,6 +55,9 @@
|
|
* \subsubsection argument QObject *argument
|
|
* \subsubsection argument QObject *argument
|
|
* \details Pointer to argument that will be used for subscription.
|
|
* \details Pointer to argument that will be used for subscription.
|
|
*
|
|
*
|
|
|
|
+ * \subsubsection returnValue QObject *returnValue
|
|
|
|
+ * \details Value returned by the subscription (Note that it is the same "return" object passed by the "updated" signal)
|
|
|
|
+ *
|
|
* \subsection Signals
|
|
* \subsection Signals
|
|
* \subsubsection updated updated(ReturnType value)
|
|
* \subsubsection updated updated(ReturnType value)
|
|
* \details The signal notifies about received update for subscription. It provides "return" value ready for use in QML.
|
|
* \details The signal notifies about received update for subscription. It provides "return" value ready for use in QML.
|
|
@@ -97,6 +100,7 @@ class QQuickGrpcSubscription : public QObject
|
|
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
|
|
Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
|
|
Q_PROPERTY(QString method READ method WRITE setMethod NOTIFY methodChanged)
|
|
Q_PROPERTY(QString method READ method WRITE setMethod NOTIFY methodChanged)
|
|
Q_PROPERTY(QObject *argument READ argument WRITE setArgument NOTIFY argumentChanged)
|
|
Q_PROPERTY(QObject *argument READ argument WRITE setArgument NOTIFY argumentChanged)
|
|
|
|
+ Q_PROPERTY(QObject *returnValue READ returnValue NOTIFY returnValueChanged)
|
|
|
|
|
|
public:
|
|
public:
|
|
QQuickGrpcSubscription(QObject *parent = nullptr);
|
|
QQuickGrpcSubscription(QObject *parent = nullptr);
|
|
@@ -118,6 +122,10 @@ public:
|
|
return m_argument;
|
|
return m_argument;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ QObject *returnValue() const {
|
|
|
|
+ return m_returnValue;
|
|
|
|
+ }
|
|
|
|
+
|
|
void setClient(QAbstractGrpcClient *client) {
|
|
void setClient(QAbstractGrpcClient *client) {
|
|
if (m_client == client) {
|
|
if (m_client == client) {
|
|
return;
|
|
return;
|
|
@@ -166,6 +174,7 @@ signals:
|
|
void methodChanged();
|
|
void methodChanged();
|
|
void enabledChanged();
|
|
void enabledChanged();
|
|
void argumentChanged();
|
|
void argumentChanged();
|
|
|
|
+ void returnValueChanged();
|
|
|
|
|
|
private:
|
|
private:
|
|
void updateSubscription();
|
|
void updateSubscription();
|