Index: sources/view/settings/VAdjustmentServiceDates.cpp =================================================================== diff -u -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 -r2344b221623f3ce2d18f91a255ec6a0649c9db33 --- sources/view/settings/VAdjustmentServiceDates.cpp (.../VAdjustmentServiceDates.cpp) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) +++ sources/view/settings/VAdjustmentServiceDates.cpp (.../VAdjustmentServiceDates.cpp) (revision 2344b221623f3ce2d18f91a255ec6a0649c9db33) @@ -25,6 +25,7 @@ ADJUST_VIEW_CONNECTION( AdjustServiceDatesRequestData) ACTION_VIEW_CONNECTION(AdjustServiceDatesHDResponseData) ACTION_VIEW_CONNECTION(AdjustServiceDatesDGResponseData) + ACTION_VIEW_CONNECTION(SettingsData) } void View::VAdjustmentServiceDates::onActionReceive(const AdjustServiceDatesHDResponseData &vData) @@ -33,8 +34,8 @@ hdLastServiceEpoch (vData.mLastServiceDateEpoch ); hdServiceInterval (vData.mServiceIntervalSeconds ); - hdLastServiceDate (Format::fromEpoch(vData.mLastServiceDateEpoch , _serviceDateFormat)); - hdNextServiceDate (Format::fromEpoch(vData.mLastServiceDateEpoch + vData.mServiceIntervalSeconds , _serviceDateFormat)); + hdLastServiceDate (Format::fromEpoch(vData.mLastServiceDateEpoch , _dateFormat)); + hdNextServiceDate (Format::fromEpoch(vData.mLastServiceDateEpoch + vData.mServiceIntervalSeconds , _dateFormat)); // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the previous values before being set. *** @@ -47,11 +48,15 @@ dgLastServiceEpoch (vData.mLastServiceDateEpoch ); dgServiceInterval (vData.mServiceIntervalSeconds ); - dgLastServiceDate (Format::fromEpoch(vData.mLastServiceDateEpoch , _serviceDateFormat)); - dgNextServiceDate (Format::fromEpoch(vData.mLastServiceDateEpoch + vData.mServiceIntervalSeconds , _serviceDateFormat)); + dgLastServiceDate (Format::fromEpoch(vData.mLastServiceDateEpoch , _dateFormat)); + dgNextServiceDate (Format::fromEpoch(vData.mLastServiceDateEpoch + vData.mServiceIntervalSeconds , _dateFormat)); // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the previous values before being set. *** adjustmentDG(true); // set here only because adjustment parent needs it, but HD Service does not } +void View::VAdjustmentServiceDates::onActionReceive(const SettingsData &) +{ + _dateFormat = _Settings.dateFormat(); +} Index: sources/view/settings/VAdjustmentServiceDates.h =================================================================== diff -u -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 -r2344b221623f3ce2d18f91a255ec6a0649c9db33 --- sources/view/settings/VAdjustmentServiceDates.h (.../VAdjustmentServiceDates.h) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) +++ sources/view/settings/VAdjustmentServiceDates.h (.../VAdjustmentServiceDates.h) (revision 2344b221623f3ce2d18f91a255ec6a0649c9db33) @@ -21,6 +21,7 @@ #include "VAdjustmentResponseBase.h" #include "MAdjustHDServiceDatesResponse.h" #include "MAdjustDGServiceDatesResponse.h" +#include "MSettings.h" namespace View { @@ -37,9 +38,8 @@ // friends friend class ::tst_views; - const QString _serviceDateFormat = "yyyy/MM/dd"; + QString _dateFormat = "yyyy/MM/dd"; - // disabled coco begin validated: // The property adjustment_Triggered has to be always true // and to always trigger the change event to work as a notifier for GUI @@ -63,6 +63,7 @@ VIEW_DEC_CLASS(VAdjustmentServiceDates) VIEW_DEC_SLOT (AdjustServiceDatesHDResponseData) VIEW_DEC_SLOT (AdjustServiceDatesDGResponseData) + VIEW_DEC_SLOT (SettingsData) // ---------- Version public slots: Index: sources/view/settings/VHDUsageInfo.cpp =================================================================== diff -u -r4c975736fbcc57e7e401001440b67b1317849c7e -r2344b221623f3ce2d18f91a255ec6a0649c9db33 --- sources/view/settings/VHDUsageInfo.cpp (.../VHDUsageInfo.cpp) (revision 4c975736fbcc57e7e401001440b67b1317849c7e) +++ sources/view/settings/VHDUsageInfo.cpp (.../VHDUsageInfo.cpp) (revision 2344b221623f3ce2d18f91a255ec6a0649c9db33) @@ -24,6 +24,7 @@ void View::VHDUsageInfo::initConnections() { ADJUST_VIEW_CONNECTION( HDUsageInfoRequestData) ACTION_VIEW_CONNECTION(HDUsageInfoResponseData) + ACTION_VIEW_CONNECTION(SettingsData) } /*! @@ -38,9 +39,14 @@ timeFormatted = QString("%1").arg(vData.mTotalTxHoursSinceLastService); totalTxHoursSinceLastService(timeFormatted); - epochOfStartOfLastTx (Format::fromEpoch(vData.mEpochOfStartOfLastTx, _LastTreatmentDateFormat)); + epochOfStartOfLastTx (Format::fromEpoch(vData.mEpochOfStartOfLastTx, _dateFormat)); // *** has to be the last to let the information to be set and then emit the signal *** // *** otherwise will use the Previous values before being set. *** adjustment ( true ); } + +void View::VHDUsageInfo::onActionReceive(const SettingsData &) +{ + _dateFormat = _Settings.dateFormat(); +} Index: sources/view/settings/VHDUsageInfo.h =================================================================== diff -u -r4c975736fbcc57e7e401001440b67b1317849c7e -r2344b221623f3ce2d18f91a255ec6a0649c9db33 --- sources/view/settings/VHDUsageInfo.h (.../VHDUsageInfo.h) (revision 4c975736fbcc57e7e401001440b67b1317849c7e) +++ sources/view/settings/VHDUsageInfo.h (.../VHDUsageInfo.h) (revision 2344b221623f3ce2d18f91a255ec6a0649c9db33) @@ -21,6 +21,7 @@ #include "VAdjustmentResponseBase.h" #include "MAdjustHDRequests.h" #include "MHDUsageInfoResponse.h" +#include "MSettings.h" namespace View { @@ -38,9 +39,8 @@ friend class ::tst_views; HDUsageInfoRequestData _data; + QString _dateFormat = "yyyy/MM/dd"; - const QString _LastTreatmentDateFormat = "yyyy/MM/dd"; - // disabled coco begin validated: // The property adjustment_Triggered has to be always true // and to always trigger the change event to work as a notifier for GUI @@ -56,6 +56,7 @@ VIEW_DEC_CLASS(VHDUsageInfo) VIEW_DEC_SLOT (HDUsageInfoResponseData) + VIEW_DEC_SLOT (SettingsData) // ---------- Version public slots: