Ejemplo n.º 1
0
void QmitkStoreSCPLauncher::OnReadyProcessOutput()
{
    QString out(m_StoreSCP->readAllStandardOutput());
    QStringList allDataList,importList;

    allDataList = out.split("\n",QString::SkipEmptyParts);
    QStringListIterator it(allDataList);

    while(it.hasNext())
    {
        QString output = it.next();
        if (output.contains("E: "))
        {
            output.replace("E: ","");
            m_ErrorText = output;
            OnProcessError(QProcess::UnknownError);
            return;
        }
        if(output.contains("I: storing DICOM file: "))
        {
            output.replace("I: storing DICOM file: ","");
            output.replace("\\", "/"); // cannot handle backslashes
            output.replace("\r", ""); // cannot handle carriage return
            importList += output;
        }
    }
    if(!importList.isEmpty())
    {
        emit SignalStartImport(importList);
    }
}
Ejemplo n.º 2
0
tResult cJuryModule::Init()
{
    // connect the widgets and methods
    connect(m_pWidget->m_btnFileSelection, SIGNAL(released()), this, SLOT(OnManeuverListButton()));
    connect(m_pWidget->m_btnFileSelectionDescr, SIGNAL(released()), this, SLOT(OnDescriptionFileButton()));
    connect(m_pWidget->m_edtManeuverFile, SIGNAL(returnPressed()), this, SLOT(OnManeuverListSelected()));
    connect(m_pWidget->m_edtManeuverFile, SIGNAL(editingFinished()), this, SLOT(OnManeuverListSelected()));
    connect(m_pWidget->m_btnEmergencyStop, SIGNAL(released()), this, SLOT(OnEmergencyStop()));
    connect(m_pWidget->m_btnStart, SIGNAL(released()), this, SLOT(OnStart()));
    connect(m_pWidget->m_btnStop, SIGNAL(released()), this, SLOT(OnStop()));
    connect(m_pWidget->m_btnRequest, SIGNAL(released()), this, SLOT(OnRequestReady()));
    connect(m_pWidget->m_btnConnectDisconnect, SIGNAL(released()), this, SLOT(OnConnectDisconnect()));
    connect(m_pWidget->m_btnManeuverlist, SIGNAL(released()), this, SLOT(SendManeuverList()));
    connect(this, SIGNAL(SetDriverState(int, int)), this, SLOT(OnDriverState(int, int)));    
    connect(this, SIGNAL(SetLogText(QString)), this, SLOT(OnAppendText(QString)));
    connect(this, SIGNAL(SetConnectionState()), this, SLOT(OnConnectionStateChange()));
    connect(this, SIGNAL(SetControlState()), this, SLOT(OnControlState()));
    connect(m_pWidget->m_comboSector, SIGNAL(currentIndexChanged(int)), this, SLOT(OnComboSectionBoxChanged(int)));
    connect(m_pWidget->m_comboManeuver, SIGNAL(currentIndexChanged(int)), this, SLOT(OnComboActionBoxChanged(int)));
    connect(m_pWidget->m_cbxLocalHost, SIGNAL(stateChanged(int)), this, SLOT(OnLocalhostCheckChanged(int)));
    connect(m_pWidget->m_btnOpenTerminal, SIGNAL(released()), this, SLOT(OnOpenTerminalProcess()));
    connect(&m_oTerminalProcess, SIGNAL(started()), this, SLOT(OnProcessStarted()));
    connect(&m_oTerminalProcess, SIGNAL(finished(int,QProcess::ExitStatus)), this, SLOT(OnProcessFinished(int,QProcess::ExitStatus)));
    connect(&m_oTerminalProcess, SIGNAL(error(QProcess::ProcessError)), this, SLOT(OnProcessError(QProcess::ProcessError)));

    // set the connection and control state
    SetConnectionState();
    SetControlState();
    
    RETURN_NOERROR;
}
Ejemplo n.º 3
0
QmitkStoreSCPLauncher::QmitkStoreSCPLauncher(QmitkStoreSCPLauncherBuilder* builder)
: m_StoreSCP(new QProcess())
{
    connect( m_StoreSCP, SIGNAL(error(QProcess::ProcessError)),this, SLOT(OnProcessError(QProcess::ProcessError)));
    connect( m_StoreSCP, SIGNAL(stateChanged(QProcess::ProcessState)),this, SLOT(OnStateChanged(QProcess::ProcessState)));
    connect( m_StoreSCP, SIGNAL(readyReadStandardOutput()),this, SLOT(OnReadyProcessOutput()));
    SetArgumentList(builder);
}
Ejemplo n.º 4
0
QmitkStoreSCPLauncher::~QmitkStoreSCPLauncher()
{
    disconnect( m_StoreSCP, SIGNAL(error(QProcess::ProcessError)),this, SLOT(OnProcessError(QProcess::ProcessError)));
    disconnect( m_StoreSCP, SIGNAL(stateChanged(QProcess::ProcessState)),this, SLOT(OnStateChanged(QProcess::ProcessState)));
    disconnect( m_StoreSCP, SIGNAL(readyReadStandardOutput()),this, SLOT(OnReadyProcessOutput()));
    m_StoreSCP->close();
    m_StoreSCP->waitForFinished(1000);
    delete m_StoreSCP;
}
Ejemplo n.º 5
0
tLibs3::tLibs3( QObject* pParent )
    : QObject( pParent )
    , m_Transfers()
    , m_Process()
    , m_Mutex(QMutex::Recursive) // NSW-22633 - 20th Jan 2015 - Lazar Sumar
{
    Connect( &m_Process, SIGNAL( finished( int, QProcess::ExitStatus ) ), this, SLOT( ProcessFinished( int, QProcess::ExitStatus ) ) );
    Connect( &m_Process, SIGNAL( error( QProcess::ProcessError ) ), this, SLOT( OnProcessError( QProcess::ProcessError ) ) );
    Connect( &m_Process, SIGNAL( readyReadStandardOutput() ), this, SLOT( ProcessReadyReadStandardOutput() ) );
    Connect( &m_Process, SIGNAL( readyReadStandardError() ), this, SLOT( ProcessReadyReadStandardError() ) );

}
Ejemplo n.º 6
0
tResult cJuryModule::OnOpenTerminalProcess()
{
    // start the given terminal process (detached because otherwise no terminal window will be opened
    if(m_oTerminalProcess.startDetached(m_pWidget->m_edtTerminalProgram->text() ))
    {
        OnProcessStarted();
    }
    else
    {
        OnProcessError(m_oTerminalProcess.error());
    }

    RETURN_NOERROR;
}