Index: resources/settings/instructions/readme.md =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -r94fc1cd187816ecbf176df26f9dc5601bf379f13 --- resources/settings/instructions/readme.md (.../readme.md) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ resources/settings/instructions/readme.md (.../readme.md) (revision 94fc1cd187816ecbf176df26f9dc5601bf379f13) @@ -1,20 +1,20 @@ -this folder contains the files require for the screens in the applicaiton which are instructionBased. -it has to be in the .conf folder of the home directory, for applicaiton to be able to read it when running on the device. -when running on the VM it has to be in the application project under the resources. +This folder contains the files required for the screens in the application which are instruction-based. +It has to be in the .config folder of the home directory, for application to be able to read it when running on the device. +When running on the VM, it has to be in the application project under the resources. -To meet the instruction requirement, applicaiotn needs to have a configuration file named: +To meet the instruction requirement, application needs to have a configuration file named: - instructions.conf -which is the file that have the mapping of the image:description set for each instructionBased screen. -Each instructionBased screen in the map file shall have a section with the format of: +which is the file that has the mapping of the image:description set for each instruction-based screen. +Each instruction-based screen in the map file shall have a section with the format of: - [^] -and then for each instrcution image and description a line with the format of: +and then for each instruction image and description a line with the format of: - <Description>=<image file name> -Not that the current instruction design won't allow more than one line of Description. -The naming and formats show that the instruction can not have '^' in the title or category and can not have '=' in the description. +Note that the current instruction design will not allow for more than one line of Description. +The naming and formats show that the instruction cannot have '^' in the title or category and can not have '=' in the description. Example: Index: sources/gui/GuiGlobals.h =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r94fc1cd187816ecbf176df26f9dc5601bf379f13 --- sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/gui/GuiGlobals.h (.../GuiGlobals.h) (revision 94fc1cd187816ecbf176df26f9dc5601bf379f13) @@ -116,13 +116,13 @@ ID_DGFilterFlushData = 0x6000, // 96 ID_AdjustWaterSampleReq = 0x5D00, // 93 ID_AdjustWaterSampleRsp = 0x5E00, // 94 - ID_AdjustWaterSampleResultReq = 0x5F00, // 95 // there is no response and will a response by changing the state in Pre_Treatment_States + ID_AdjustWaterSampleResultReq = 0x5F00, // 95 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment Consumables Installation Confirm - ID_AdjustConsumablesConfirmReq = 0x6800, // 104 // there is no response and will a response by changing the state in Pre_Treatment_States + ID_AdjustConsumablesConfirmReq = 0x6800, // 104 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment SelfTest NoCartridge Progress Data - ID_SelfTestNoCartridgeData = 0x6100, // 97 // there is no response and will a response by changing the state in Pre_Treatment_States + ID_SelfTestNoCartridgeData = 0x6100, // 97 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment Disposables Installation Confirm - ID_AdjustDisposablesConfirmReq = 0x6200, // 98 // there is no response and will a response by changing the state in Pre_Treatment_States + ID_AdjustDisposablesConfirmReq = 0x6200, // 98 // there is no specific response message for this request and changing of the state in Pre_Treatment_States is used as the response // Pre-Treatment SelfTest Dry Progress Data ID_SelfTestDryData = 0x6300, // 99 // Pre-Treatment Disposable Priming Index: sources/gui/qml/compounds/InstructionView.qml =================================================================== diff -u -r99a56ec30f1ca4f401e744766bde4f6fac291752 -r94fc1cd187816ecbf176df26f9dc5601bf379f13 --- sources/gui/qml/compounds/InstructionView.qml (.../InstructionView.qml) (revision 99a56ec30f1ca4f401e744766bde4f6fac291752) +++ sources/gui/qml/compounds/InstructionView.qml (.../InstructionView.qml) (revision 94fc1cd187816ecbf176df26f9dc5601bf379f13) @@ -82,10 +82,10 @@ model: _root.stepNames Loader { id: _content anchors.bottom: parent.bottom - active: SwipeView.isCurrentItem || SwipeView.isNextItem || SwipeView.isPreviousItem + active: SwipeView.isPreviousItem || SwipeView.isCurrentItem || SwipeView.isNextItem sourceComponent: Item { Text { id: _message - text : _root.stepNames.length ? _root.stepNames[_swipeview.currentIndex] : "" + text : _root.stepNames.length ? _root.stepNames[index] : "" color : Colors.textMain width : parent.width height : _root.frameVGap @@ -94,7 +94,7 @@ font.pixelSize: Fonts.fontPixelDialogText } Image { id: _image - source: _root.stepImages.length && _root.stepImages[_swipeview.currentIndex] ? "file:" + _root.location + _root.stepImages[_swipeview.currentIndex] : "" + source: _root.stepImages.length && _root.stepImages[index] ? "file:" + _root.location + _root.stepImages[index] : "" width : _innerFrame.width height : _innerFrame.height anchors.centerIn: parent Index: sources/model/settings/MSettings.cpp =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -r94fc1cd187816ecbf176df26f9dc5601bf379f13 --- sources/model/settings/MSettings.cpp (.../MSettings.cpp) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ sources/model/settings/MSettings.cpp (.../MSettings.cpp) (revision 94fc1cd187816ecbf176df26f9dc5601bf379f13) @@ -22,33 +22,68 @@ // name spaces using namespace Storage; +/*! + * \brief MSettings::MSettings + * \details The constructor + * \param parent + */ MSettings::MSettings(QObject *parent) : QObject(parent) { } +/*! + * \brief MSettings::groups + * \details Returns all the groups of the settings + * \return list of the groups as list of strings + */ QStringList MSettings::groups() { QMutexLocker locker(&_mutex); return _settings.keys(); } +/*! + * \brief MSettings::keys + * \details returns all keys in a group + * \param vGroup - the group to look for all the keys + * \return list of the keys in QString for the group vGroup + */ QStringList MSettings::keys(const QString &vGroup) { - Q_UNUSED(vGroup) const QMutexLocker locker(&_mutex); return _settings[vGroup].keys; } +/*! + * \brief MSettings::values + * \details returns all values in a group + * \param vGroup - the group to look for all the values + * \return list of the values in QString for the group vGroup + */ QVariantList MSettings::values(const QString &vGroup) { QMutexLocker locker(&_mutex); return _settings[vGroup].values; } +/*! + * \brief MSettings::location + * \details The locations where the settings have been read for the group vGroup + * \param vGroup - the group to look for the location + * \return the location in QString + */ QString MSettings::location(const QString &vGroup) { QMutexLocker locker(&_mutex); return _location[vGroup]; } +/*! + * \brief MSettings::add + * \details The function to be used to add elements in the settings + * \param vGroup - the group of the settings + * \param vKey - the key to be added under the group vGroup + * \param vValue - the value of the key to be added under group vGroup for the key vKey + * \param vLocation - the location of the setting data if is different will be set. + */ void MSettings::add(const QString &vGroup, const QString &vKey, const QVariant &vValue, const QString &vLocation) { QMutexLocker locker(&_mutex); Index: sources/storage/FileHandler.cpp =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -r94fc1cd187816ecbf176df26f9dc5601bf379f13 --- sources/storage/FileHandler.cpp (.../FileHandler.cpp) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ sources/storage/FileHandler.cpp (.../FileHandler.cpp) (revision 94fc1cd187816ecbf176df26f9dc5601bf379f13) @@ -347,7 +347,7 @@ // the sorting may require to change from QDir::Time to QDir::Name // since the birthTime always returns invalid // and as part of our log naming we have the birthTime in file name. - // be careful that this function is being used in cases other only logging. + // be careful that this function is being used in cases other than only just logging. QDir::Time ); return fileInfoList; Index: sources/storage/Settings.cpp =================================================================== diff -u -rf688ed9f1c64a2603a6d10fbb090b257a43e1f6f -r94fc1cd187816ecbf176df26f9dc5601bf379f13 --- sources/storage/Settings.cpp (.../Settings.cpp) (revision f688ed9f1c64a2603a6d10fbb090b257a43e1f6f) +++ sources/storage/Settings.cpp (.../Settings.cpp) (revision 94fc1cd187816ecbf176df26f9dc5601bf379f13) @@ -72,27 +72,14 @@ QStringList keyValue = line.split('='); QString key = keyValue[0].trimmed(); QString value = keyValue[1].trimmed(); - QString location= settingFile.absolutePath().prepend("/") + "/"; - qDebug() << group << key << location + value; + QString location= settingFile.absolutePath() + "/"; _SettingModel.add(group, key, QVariant(value), location); } } } } } - - // QSettings settings(settingFile.absoluteFilePath(), QSettings::IniFormat); - // for (const auto &group : settings.childGroups()) { - // settings.beginGroup(group); - // for (const auto &key: settings.allKeys()) { - // qDebug() << group << key << settingFile.absolutePath().prepend("/") + "/" + settings.value(key).toString(); - // _SettingModel.add(group, key, settings.value(key).toString(), settingFile.absolutePath().prepend("/") + "/"); - // } - // settings.endGroup(); - // } - } - qDebug() << " ----- " << "DONE"; return 0; } Index: sources/storage/Settings.h =================================================================== diff -u -r821bf955d0ba7e028bccfee7c04ca77cf80a0bd4 -r94fc1cd187816ecbf176df26f9dc5601bf379f13 --- sources/storage/Settings.h (.../Settings.h) (revision 821bf955d0ba7e028bccfee7c04ca77cf80a0bd4) +++ sources/storage/Settings.h (.../Settings.h) (revision 94fc1cd187816ecbf176df26f9dc5601bf379f13) @@ -42,7 +42,6 @@ } bool isValid(const QString &vSettingFile); - // bool read (const QString &vSettingFile); public: Settings() {}