Index: sources/storage/RxProfilesController.cpp =================================================================== diff -u -rb4d8fe6f11b7cdf0c631b3ab35ba36f18e0d7bc4 -readfcc99876849e52370db5dde4c4c42d4dbc76f --- sources/storage/RxProfilesController.cpp (.../RxProfilesController.cpp) (revision b4d8fe6f11b7cdf0c631b3ab35ba36f18e0d7bc4) +++ sources/storage/RxProfilesController.cpp (.../RxProfilesController.cpp) (revision eadfcc99876849e52370db5dde4c4c42d4dbc76f) @@ -71,6 +71,21 @@ emit didFilesList(rxProfilesPath(), { QString("*.%1").arg(_rxProfiles) }); } +void RxProfiles::doDeleteRxProfile(QString vRxProfileName) +{ + qDebug() < vRxProfileDataList; for (const QFileInfo fileInfo:vRxProfileList){ RxProfilesData rxData = initModel(fileInfo) ; - if (rxData.rxProfileContent.size() == Model::RxProfilesIndex::eRxProfilesIndexCount - 1) + if (rxData.rxProfileContent.size() == Model::RxProfilesIndex::eRxProfilesIndexCount ) { vRxProfileDataList.append(rxData); } else LOG_DEBUG(QString("Bad Prescription Log Given: %1, %2").arg(fileInfo.baseName(), QString::number( rxData.rxProfileContent.size() ))); } - //below is Test to write a file -// QStringList rxDataTest = vRxProfileDataList[0].rxProfileContent; -// rxDataTest.replace(Model::RxProfilesIndex::eProfileName, QString("Written New Rx")) ; -// // rxProfileContent -// doSave(rxDataTest); emit didRxProfileList(vRxProfileDataList); } -/*! - * \brief RxProfiles::filelimitReached - * The actual function that checks if RX file limit has been reached for Duplicate, Add, and import events - */ -bool RxProfiles::fileLimitReached() -{ QDir RxProfilesDir(_rxProfilesPath); - int fileCount = RxProfilesDir.count(); - if (fileCount != _RxLimit){ return false; } - LOG_DEBUG(QString("Rx Limit has been reached")); - return true; -} -