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

void Operations::simple_comand ( QString  title,
QString  label,
QString  _command 
)

Shows simple dialog with one label and line edit, and executes _command with line edit value.

Parameters:
title Dialog title.
label Dialog label.
_command Command to execute.
Returns:
true if user press ok button.

Definition at line 448 of file operations.cpp.

References OctaveConnection::command_enter(), input_dialog(), and BaseWidget::widgetType().

{
      BaseWidget *top_widget=*active_widget;
      bool ok;
      
      if(top_widget->widgetType()==TABLE)
      {
            matrix=((Table*)top_widget)->getMatrix();
      }
      
      ok=input_dialog(title, label, matrix);
      
      if (ok && !matrix.isEmpty())
      {
            QString command;
            QTextStream(&command) << _command << "(" << matrix << ")";
            
            if(copy_clipboard_ok)
            {
                   QClipboard *clipboard = QApplication::clipboard();
                   clipboard->setText(command);
            }
            else
            {
                  octave_connection->command_enter(command);
            }
      }
}


Generated by  Doxygen 1.6.0   Back to index