Index: sources/cloudsync/CloudSyncController.cpp =================================================================== diff -u -r380136967ba230affe91f614a9805319688eb05b -r015a7cea7842d589a11325a989436be342b801ef --- sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision 380136967ba230affe91f614a9805319688eb05b) +++ sources/cloudsync/CloudSyncController.cpp (.../CloudSyncController.cpp) (revision 015a7cea7842d589a11325a989436be342b801ef) @@ -81,6 +81,15 @@ // disabled coco end /*! + * \brief CloudSyncController::doRegister + * \details Send the register device command. + */ +void CloudSyncController::doRegister() +{ + sendDeviceRegister(); +} + +/*! * \brief CloudSyncController::initConnections * \details Initializes the required signal/slot connection between this class and other objects * to be able to communicate. Index: sources/cloudsync/CloudSyncController.h =================================================================== diff -u -r380136967ba230affe91f614a9805319688eb05b -r015a7cea7842d589a11325a989436be342b801ef --- sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision 380136967ba230affe91f614a9805319688eb05b) +++ sources/cloudsync/CloudSyncController.h (.../CloudSyncController.h) (revision 015a7cea7842d589a11325a989436be342b801ef) @@ -197,6 +197,8 @@ bool init(QThread &vThread); void quit(); + void doRegister (); + private slots: void onWatchFileChange (const QString &vFile); void onActionReceive (GuiActionType vAction, const QVariantList &vData); Index: sources/gui/qml/main.qml =================================================================== diff -u -rd949be21f2a9badd0978dddaaf436f6805de28dc -r015a7cea7842d589a11325a989436be342b801ef --- sources/gui/qml/main.qml (.../main.qml) (revision d949be21f2a9badd0978dddaaf436f6805de28dc) +++ sources/gui/qml/main.qml (.../main.qml) (revision 015a7cea7842d589a11325a989436be342b801ef) @@ -45,6 +45,7 @@ import VAdjustmentAlarmVolume 0.1 import VBluetooth 0.1 import VDuetRoWaterDG 0.1 +import VCloudSync 0.1 // States views import VHDOperationMode 0.1 @@ -144,6 +145,7 @@ VAdjustmentAlarmVolume { id: vAdjustmentAlarmVolume } VBluetooth { id: vBluetooth } VDuetRoWaterDG { id: vDuetRoWaterDG } + VCloudSync { id: vCloudSync } // ---- States VHDOperationMode { id: vHDOperationMode } Index: sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml =================================================================== diff -u -r380136967ba230affe91f614a9805319688eb05b -r015a7cea7842d589a11325a989436be342b801ef --- sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml (.../SettingsDeviceRegistration.qml) (revision 380136967ba230affe91f614a9805319688eb05b) +++ sources/gui/qml/pages/settings/SettingsDeviceRegistration.qml (.../SettingsDeviceRegistration.qml) (revision 015a7cea7842d589a11325a989436be342b801ef) @@ -121,9 +121,9 @@ y : _root.topMargin anchors.right : parent.right anchors.rightMargin : _root.rightMargin - - completeText : qsTr("Registration complete") - stepNames : [ + completeVisible : vCloudSync.isReady + completeText : qsTr("Registration complete") + stepNames : [ qsTr("Cloud Service is running" ), qsTr("Registering the device" ) ] @@ -132,15 +132,29 @@ TouchRect { id : _scanButton anchors.bottom : parent.bottom anchors.bottomMargin : Variables.mainMenuHeight * 2 + Variables.minVGap * 2 - anchors.horizontalCenter: parent.horizontalCenter + anchors.horizontalCenter: parent.horizontalCenter text.text : qsTr("START") width : 350 isDefault : true enabled : true // ! device device registered onClicked : { - vAdjustmentVersions .doAdjustment() + let mHasNetworkConnection = (_ipAddress_eth0.isValid || _ipAddress_wlan0.isValid) + if ( ! mHasNetworkConnection) { _root.notificationText = qsTr("No Network Connection"); return } + + let mHasSerials = ( _serial_HD != "" && _serial_DG != "") + if ( ! mHasSerials ) { _root.notificationText = qsTr("No device Serial" ); return } + + vCloudSync .doRegister () } // start device registration } + // Connections { target: vCloudSync + // function onselfTestConsumables_primeEntered ( vValue ) {/* _preTreatmentConsumablesSelfTest.checkList.setItem( 0, vValue )*/ } + // function onSelfTestConsumables_biCarbPumpEntered ( vValue ) { _preTreatmentConsumablesSelfTest.checkList.setItem( 0, vValue )} + // function onSelfTestConsumables_biCarbPumpEntered ( vValue ) { _preTreatmentConsumablesSelfTest.checkList.setItem( 0, vValue )} + // function onSelfTestConsumables_biCarbPumpEntered ( vValue ) { _preTreatmentConsumablesSelfTest.checkList.setItem( 0, vValue )} + // function onSelfTestConsumables_acidPumpEntered ( vValue ) { _preTreatmentConsumablesSelfTest.checkList.setItem( 1, vValue )} + // } + notificationText: "" } Index: sources/view/settings/VCloudSync.cpp =================================================================== diff -u -r380136967ba230affe91f614a9805319688eb05b -r015a7cea7842d589a11325a989436be342b801ef --- sources/view/settings/VCloudSync.cpp (.../VCloudSync.cpp) (revision 380136967ba230affe91f614a9805319688eb05b) +++ sources/view/settings/VCloudSync.cpp (.../VCloudSync.cpp) (revision 015a7cea7842d589a11325a989436be342b801ef) @@ -37,4 +37,12 @@ connect(&_CloudSyncController , &CloudSyncController ::didRegisterDone, this , [this](bool vPass) { isRegisterDone (vPass); }); + + connect(this , SIGNAL(didRegister()), + &_CloudSyncController , SLOT( doRegister())); } + +void VCloudSync::doRegister() +{ + emit didRegister(); +} Index: sources/view/settings/VCloudSync.h =================================================================== diff -u -r380136967ba230affe91f614a9805319688eb05b -r015a7cea7842d589a11325a989436be342b801ef --- sources/view/settings/VCloudSync.h (.../VCloudSync.h) (revision 380136967ba230affe91f614a9805319688eb05b) +++ sources/view/settings/VCloudSync.h (.../VCloudSync.h) (revision 015a7cea7842d589a11325a989436be342b801ef) @@ -38,15 +38,18 @@ friend class ::tst_views; STATE(bool , isRunning , false) - STATE(bool , isReady , false) STATE(bool , isRegisterStart , false) STATE(bool , isRegisterDone , false) + STATE(bool , isReady , false) VIEW_DEC_CLASS(VCloudSync) private slots: -public: +public slots: + void doRegister(); + signals: + void didRegister(); }; }