コード例 #1
0
DriverManager::DriverManager(Config::TerminalSettings_t *s)
{
    user_settings = s;
    applyUserSettings();


    // Create tty->tcp
    driver = new QProcess();
    connect(driver,SIGNAL(stateChanged(QProcess::ProcessState)),
            this,SLOT(process_stateChanged(QProcess::ProcessState)));
    connect(driver,SIGNAL(readyRead()),this,SLOT(driverStdoutDebug()));

    driverExpectStop = false;
    state = STOPPED;


#ifdef Q_OS_WIN
#if USE_COM2TCP
    driver_path = "com2tcp.exe";
#endif
#if USE_SERIALDRIVER
    driver_path = "SerialDriver.exe";
#endif
#elif Q_OS_LINUX
    /** @todo handle this */
#elif Q_OS_MAC
    /** @todo handle this */
#else
    /** @todo handle this */
#endif
}
コード例 #2
0
ファイル: mainwindow.cpp プロジェクト: Jeroen6/MultiTerminal
/// @brief config has closed
void MainWindow::config_closed(Config::ConfigExitCode exitCode)
{
    switch(exitCode){
    case Config::DISCARD:
        // Do nothing
        break;
    case Config::SAVE:
        // Copy new settings from Config to MainWindow
        user_settings = config->GetSettings();
        applyUserSettings();
        break;
    case Config::APPLY:
        // Not implemented
        break;
    default:
        break;
    }
    this->setEnabled(true);
}
コード例 #3
0
/**
 * Clear and populate both tables.
 */
void MuonAnalysisResultTableTab::populateTables()
{
  storeUserSettings();
  
  // Clear the previous table values
  m_logValues.clear();
  m_uiForm.fittingResultsTable->setRowCount(0);
  m_uiForm.valueTable->setRowCount(0);

  QStringList fittedWsList = getFittedWorkspaces();

  if ( ! fittedWsList.isEmpty() )
  {
    // Populate the individual log values and fittings into their respective tables.
    populateFittings(fittedWsList);
    populateLogsAndValues(fittedWsList);    

    // Make sure all fittings are selected by default.
    selectAllFittings(true);

    // If we have Run Number log value, we want to select it by default.
    auto found = m_uiForm.valueTable->findItems("run_number", Qt::MatchFixedString);
    if ( ! found.empty() )
    {
      int r = found[0]->row();

      if( auto cb = dynamic_cast<QCheckBox*>(m_uiForm.valueTable->cellWidget(r, 1)) )
      {
        cb->setCheckState(Qt::Checked); 
      }
    }

    applyUserSettings();
  }

}