Logo Search packages:      
Sourcecode: qtoctave version File versions  Download package

void Dynamic_help::textChanged ( const QString &  text  )  [slot]

Shows help when of text.

Parameters:
text Text from QLineEdit.

Definition at line 89 of file dynamic_help.cpp.

Referenced by setLineEdit(), and update().

{
      if(text.length()<2 || stop_help->checkState()==Qt::Checked) return;
      if( time.elapsed()< 1000)
      {
            input_text=text;
            timer.start(1000);
            return;
      }
      time.start();
      
      int separator,pos=-1;
      input_text=text.trimmed();
      separator=input_text.indexOf(" ");
      if(separator>-1 && separator<pos || pos<0) pos=separator;
      separator=input_text.indexOf("\t");
      if(separator>-1 && separator<pos || pos<0) pos=separator;
      separator=input_text.indexOf("\n");
      if(separator>-1 && separator<pos || pos<0) pos=separator;
      separator=input_text.indexOf("(");
      if(separator>-1 && separator<pos || pos<0) pos=separator;
      
      if(pos>0)input_text.truncate(pos);
      
      QString command;
      QTextStream(&command) << "ayuda(\"" << input_text << "\")\n";
      octave->write(command.toLocal8Bit());
      
      textEdit->clear();
      textEdit->insertHtml("<b>Results for "+input_text+":</b><br>\n");
}


Generated by  Doxygen 1.6.0   Back to index