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; }
tHandle cJuryTransmitter::CreateView() { QWidget* pWidget = (QWidget*)m_pViewport->VP_GetWindow(); m_pWidget = new DisplayWidget(pWidget); connect(m_pWidget, SIGNAL(sendNotAus()), this, SLOT(OnNotAus())); connect(m_pWidget, SIGNAL(sendStart(tInt16)), this, SLOT(OnStart(tInt16))); connect(m_pWidget, SIGNAL(sendStop(tInt16)), this, SLOT(OnStop(tInt16))); connect(m_pWidget, SIGNAL(sendReadyRequest(tInt16)), this, SLOT(OnRequestReady(tInt16))); connect(this, SIGNAL(sendDriverState(int, int)), m_pWidget, SLOT(OnDriverState(int, int))); connect(this, SIGNAL(sendMessage(QString)), m_pWidget, SLOT(OnAppendText(QString))); return (tHandle)m_pWidget; }