Index: sources/view/settings/VDateTime.h =================================================================== diff -u -ra5be04172757fa469d85fb83a6998a4404214f19 -r2ef03b2ce51b4dc507f66e9671953a8e0824bde9 --- sources/view/settings/VDateTime.h (.../VDateTime.h) (revision a5be04172757fa469d85fb83a6998a4404214f19) +++ sources/view/settings/VDateTime.h (.../VDateTime.h) (revision 2ef03b2ce51b4dc507f66e9671953a8e0824bde9) @@ -1,14 +1,14 @@ /*! * - * Copyright (c) 2019-2020 Diality Inc. - All Rights Reserved. + * Copyright (c) 2021-2024 Diality Inc. - All Rights Reserved. * \copyright * THIS CODE MAY NOT BE COPIED OR REPRODUCED IN ANY FORM, IN PART OR IN * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file VDateTime.h - * \author (last) Peter Lucia - * \date (last) 16-Apr-2021 - * \author (original) Peter Lucia + * \author (last) Vy + * \date (last) 16-Aug-2023 + * \author (original) Behrouz NematiPour * \date (original) 16-Apr-2021 * */ @@ -17,12 +17,14 @@ // Qt #include #include +#include // Project -#include "main.h" // Doxygen : don't remove +#include "main.h" // Doxygen : do not remove #include "VAdjustmentResponseBase.h" #include "MAdjustHDDateTimeResponse.h" #include "MAdjustDGDateTimeResponse.h" +#include "MHDRTCEpochData.h" // forward declarations @@ -50,10 +52,19 @@ }; Q_ENUM(DateTimeSetStatus) + enum GreetingRanges { + eMorningMin = 500, // 5:00 AM + eMorningMax = 1200, // 12:00 PM + + eAfternoonMin = 1200, // 12:00 PM + eAfternoonMax = 1800, // 18:00 PM + }; + protected: - void timerEvent(QTimerEvent *event); + void timerEvent(QTimerEvent *event) override; private: + QDateTime _currentDateTime ; int _timerInterval = 1000; // ms QProcess _process ; @@ -80,11 +91,17 @@ PROPERTY(QString, status , "" ) PROPERTY(QString, current , "" ) + PROPERTY(QString, greeting , "" ) + PROPERTY(QString, timezone , "" ) + VIEW_DEC_CLASS(VDateTime) VIEW_DEC_SLOT (AdjustHDDateTimeResponseData) VIEW_DEC_SLOT (AdjustDGDateTimeResponseData) + VIEW_DEC_SLOT (HDRTCEpochData) + void greeting(quint16 vMilitaryTime); + private slots: void onSetDateUIFinished(const int &vExitCode); @@ -96,6 +113,7 @@ const QString &vHour , const QString &vMinute); + void onSetDateUIErrored(QProcess::ProcessError error); signals: void didAdjustment(const AdjustHDDateTimeRequestData); void didAdjustment(const AdjustDGDateTimeRequestData);