Index: sources/view/settings/VSettings.h =================================================================== diff -u -r6e6ec6822b82c77bb4942c9f4061e860d1a70f85 -r6c6f1f5d466badd9b4fd67be7c907234c342b2a2 --- sources/view/settings/VSettings.h (.../VSettings.h) (revision 6e6ec6822b82c77bb4942c9f4061e860d1a70f85) +++ sources/view/settings/VSettings.h (.../VSettings.h) (revision 6c6f1f5d466badd9b4fd67be7c907234c342b2a2) @@ -6,8 +6,8 @@ * WHOLE, WITHOUT THE EXPLICIT PERMISSION OF THE COPYRIGHT OWNER. * * \file VSettings.h - * \author (last) Behrouz NematiPour - * \date (last) 02-Apr-2023 + * \author (last) Vy + * \date (last) 04-Apr-2023 * \author (original) Behrouz NematiPour * \date (original) 29-Mar-2021 * @@ -31,7 +31,7 @@ { Q_OBJECT - QString _location = QString(Storage::Settings_Category_InstructionsImagesLoc).arg(Storage::Settings_Path_Name); + QString _location = QString(Storage::Settings_Category_InstructionsImagesLoc).arg(Storage::Settings_Path()); typedef QList TKeysList; typedef struct { QString location; @@ -63,25 +63,35 @@ PROPERTY(QStringList , categorys , {} ) PROPERTY(QVariantMap , instructions , {} ) + PROPERTY(bool , isDefaultServicePassword , false ) + SETTINGS(QString , servicePass , "" , Storage::Settings_Category_SettingsSystem , "Service" , "Password" ) SETTINGS(quint8 , alarmVolume , 5 , Storage::Settings_Category_SettingsSystem , "Alarm" , "Volume" ) SETTINGS(bool , roWaterMode , false , Storage::Settings_Category_SettingsSystem , "RoWaterMode" , "RoWaterMode" ) SETTINGS(bool , noCANBus , false , Storage::Settings_Category_NoCANBus , "Navigation" , "Create Treatment To Patient ID" ) + TRIGGER (bool , encryptionPass, false ) + VIEW_DEC(VSettings, SettingsData) private: + void initConnectionsSettings(); + TKeysList updateReplacements ( const QString &vGroup, const QStringList &vKeys ); void updateInstructions ( const QString &vGroup, const TKeysList &vKeysList, const QVariantList &vValues ); void updateInstructions ( const QString &vGroup ); - QString encryptString (const QString &vString ); + QString defaultPassword (); + bool isPasswordDefault (); + QString hashedPassword (const QString &vPassword, bool vIsService); public slots: - bool isPasswordValid (const QString &vPassword); - bool isPasswordMatch (const QString &vPassword); - void updatePassword (const QString &vPassword); + bool isPasswordValid (const QString &vPassword); + bool isServicePasswordMatch (const QString &vPassword); + void updateServicePassword (const QString &vPassword); + void checkServicePasswordSet (); + private slots: void onActionReceive (GuiActionType vAction, const QVariantList &vData);