//listener from gui //-------------------------------------------------------------- void ofxPubMed::listenerAddTextSearchBar(guiPubMedEvent & args) { reseteSearch(); ofLogVerbose("GuiVerbose")<< "Addind and Apply query (by listener). Query: " << args.query << endl; addTagRequest(setformatForSearch(args.query)); applyRequest(); bHitRequest = true; }
//-------------------------------------------------------------- void ofxPubMed::keyPressed(int key){ myGuiPubMed.keyPressed(key); myAbstracts.keyPressed(key); // press 's' for save xml file results //Direct Request for Test and apply with RETURN if(key == '1'){ request = "http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?pubmed&term=((Pei[Author])+AND+2006/12/01[Date%20-%20Create]%3A3000[Date%20-%20Create])+AND+(2001[Date%20-%20Create]%3A3000[Date%20-%20Create])"; } else if(key == '2'){ request = "http://www.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?pubmed&term=((Pei[Author])+AND+(\"2006/12/01\"[Date%20-%20Create]%3A\"3000\"[Date%20-%20Create]))+AND+(\"2001\"[Date%20-%20Create]%3A\"3000\"[Date%20-%20Create])"; } else if(key == '3'){ request = "http://eutils.ncbi.nlm.nih.gov/entrez/eutils/esearch.fcgi?db=pubmed&term=cancer&reldate=60&datetype=edat&retmax=100&usehistory=y"; } //Examples of a Progressive Request // Hit 4 then 5 .. and finallt apply with «R« else if(key == '4'){ starteSearchRequestWithItem("aspirin hart attack prevention", "[All%20Fields]"); } else if(key == '5'){ addRelDateRequest(sRelDate, "60"); addDataTypeRequest("EDAT"); } else if(key == '6'){ addMinMaxDataSearchRequest("1991/02/12","[DA]","2013/12/30","[DCOM]"); } else if(key == '7'){ addORSimpleTagRequest("high performance", "[All%20Fields]"); } else if(key == '8'){ addDataTagRequest("1991/10/20","present", "[pDate]"); } else if(key == '9'){ addDataTagRequest("1991","2014", "[All%20Fields]"); } if(key == 'R'){ applyRequest(); // fast tests using 1,2,3... options //General Request is under construction bHitRequest = false; } //Reset actual request if(key == 127)request=""; }
void BoundTextEdit::keyPressEvent(QKeyEvent *event) { if (_model != NULL) { int modifiers = Qt::ControlModifier | Qt::MetaModifier; if ((event->modifiers() & modifiers) && (event->key() == Qt::Key_Return || event->key() == Qt::Key_Enter)) { emit applyRequest(); } else { QTextEdit::keyPressEvent(event); } } else { QTextEdit::keyPressEvent(event); } }
/*! * This function applies our current state to our parent collection. */ void CSDirCollectionConfigWidget::apply() { Q_EMIT applyRequest(); }