/** If button is checked (first press), do nothing, except * change button icon to show remove in progress. * If button is unchecked (second press), remove data. */ void EraseDataToolButton::requestEraseData() { this->setRemoveIcon(); if (mRemoveAction->isChecked()) return; emit eraseData(); }
void readFASTA( const std::string& inPath, const std::string& outPath, const int maxLength, const int overlapLength) { std::ifstream ifs(inPath.c_str()); std::string buf; std::string label; std::string sequence; while(ifs && std::getline(ifs, buf)) { if(buf.find(">") != std::string::npos) { if(!label.empty()) { splitFASTA(label, sequence, outPath, maxLength, overlapLength); eraseData(label, sequence); } label = buf; } else if(buf.empty()) { if(!label.empty()) { splitFASTA(label, sequence, outPath, maxLength, overlapLength); eraseData(label, sequence); } } else { if(!label.empty()) { removeSpace(buf); sequence += buf; } } } if(ifs.eof()) { if(!label.empty()) { splitFASTA(label, sequence, outPath, maxLength, overlapLength); eraseData(label, sequence); } } }
int Rom::eraseData(int addr,int size) { return eraseData(addr,size,false); }
int Rom::eraseRATSdata(int addr) { int size = checkRATSdata(addr); if(size <= 0) return 0; eraseData(addr,size+8,true); return size+8; }