#include <dnpsearchalgo.h>
Inheritance diagram for DnpSearchAlgo:
Public Member Functions | |
DnpSearchAlgo (TrapperDoc *pDoc_, std::set< db_recno_t > &recnoList, AlgoParam *param) | |
void | start () |
Definition at line 7 of file dnpsearchalgo.h.
|
Definition at line 10 of file dnpsearchalgo.h. 00010 : 00011 RAlgo(pDoc_, recnoList, param) {}
|
|
Implements RAlgo. Definition at line 7 of file dnpsearchalgo.cc. References MAl_Readonly::get_len(), MAl_Readonly::get_num_seq(), RAlgo::getMAl(), and MAl_Readonly::select_read(). 00008 { 00009 bool ok; 00010 int res = QInputDialog::getInteger( 00011 "Search DNP ID", "Enter ID:", 0, 0, numeric_limits<int>::max(), 1, 00012 &ok, 0 ); 00013 00014 if ( ok ) { 00015 // user entered something and pressed OK 00016 for( size_t i = 0; i < getMAl()->get_num_seq(); i++ ) { 00017 bool found(false); 00018 for( size_t j = 0; j < getMAl()->get_len(i); j++ ) { 00019 if ( getMAl()->is_DNP( i, j ) && getMAl()->get_DNP_ID(i, j) == res ) { 00020 found = true; 00021 break; 00022 } 00023 } 00024 if ( !found ) 00025 getMAl()->select_read(i, false); 00026 } 00027 00028 } else { 00029 // user pressed Cancel 00030 return; 00031 } 00032 00033 }
|