Example #1
0
static int treeFindTipByLabelString(char  *str, tree *tr)                    
{
  int lookup = lookupWord(str, tr->nameHash);

  if(lookup > 0)
    {
      assert(! tr->nodep[lookup]->back);
      return lookup;
    }
  else
    { 
      printf("ERROR: Cannot find tree species: %s\n", str);
      return  0;
    }
}
Example #2
0
void LookupWidget::createConnections() {
  connect(ui_->word_input, SIGNAL(textChanged(QString)),
    this, SLOT(lookupWord(QString)));

  connect(ui_->database_selector, SIGNAL(currentIndexChanged(int)),
    this, SLOT(repeatLookup()));

  connect(client_pool_, SIGNAL(definitionReceived(Definition)),
    results_, SLOT(appendResult(Definition)));

  connect(client_pool_, SIGNAL(matchesReceived(Matches)),
    this, SLOT(setCompletionItems(Matches)));

  connect(client_pool_, SIGNAL(databaseListReceived()),
    this, SLOT(updateDatabaseSelector()));
}
Example #3
0
void LookupWidget::repeatLookup() {
  results_->setWord(QString{});
  lookupWord(ui_->word_input->text());
}