/*! * * Copyright (c) 2021-2022 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 VSettings.h * \author (last) Behrouz NematiPour * \date (last) 04-May-2021 * \author (original) Behrouz NematiPour * \date (original) 29-Mar-2021 * */ #pragma once // Qt #include #include // Project #include "main.h" #include "MSettings.h" #include "VView.h" namespace View { class VSettings : public QObject { Q_OBJECT TRIGGER ( bool , adjustment , 0 ) // TODO: This view needs modification and it needs to isolate the settings and have its own specific properties, not the complete settings exposed to QML and let QML access it. // Don't use QVariantHash, qml doesn't like it and won't show the values, *** and not even complains/errors ***. CONSTANT(QString , groupFormat , "%1^%2" ) PROPERTY(bool , initialized , false ) PROPERTY(QStringList , categorys , {} ) PROPERTY(QVariantMap , settings , {} ) PROPERTY(QVariantMap , data , {} ) SETTINGS(QString , servicePass ,"123" , "Settings/System" , "Service" , "Password" ) SETTINGS(quint8 , alarmVolume , 100 , "Settings/System" , "Alarm" , "Volume" ) SETTINGS(bool , noCANBus , false , "Development/NoCANBus", "Navigation" , "Create Treatment To Patient ID" ) VIEW_DEC(VSettings, SettingsData) }; }