FACT++  1.0
void FactGui::on_fDimCmdSend_clicked ( )
inlineprivatevirtual

Needs access to DimNetwork thus it is implemented in the derived class.

Implements MainWindow.

Definition at line 3179 of file FactGui.h.

References buffer.

3180  {
3181  const QString server = fDimCmdServers->currentIndex().data().toString();
3182  const QString command = fDimCmdCommands->currentIndex().data().toString();
3183  const QString arguments = fDimCmdLineEdit->displayText();
3184 
3185  // FIXME: Sending a command exactly when the info Handler changes
3186  // the list it might lead to confusion.
3187  try
3188  {
3189  SendDimCommand(server.toStdString(), command.toStdString()+" "+arguments.toStdString());
3190  fTextEdit->append("<font color='green'>Command '"+server+'/'+command+"' successfully emitted.</font>");
3191  fDimCmdLineEdit->clear();
3192  }
3193  catch (const runtime_error &e)
3194  {
3195  stringstream txt;
3196  txt << e.what();
3197 
3198  string buffer;
3199  while (getline(txt, buffer, '\n'))
3200  fTextEdit->append(("<font color='red'><pre>"+buffer+"</pre></font>").c_str());
3201  }
3202  }
bool SendDimCommand(std::ostream &lout, const std::string &server, const std::string &str) const
int buffer[BUFFSIZE]
Definition: db_dim_client.c:14