~vbursian/research-assistant/intervers

« back to all changes in this revision

Viewing changes to RAPlugins/NIDAQmxDrivers/StartStopNIDAQ.cpp

  • Committer: Viktor Bursian
  • Date: 2013-06-06 15:10:08 UTC
  • Revision ID: vbursian@gmail.com-20130606151008-6641eh62f0lgx8jt
Tags: version_0.3.0
versionĀ 0.3.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
*///////////////////////////////////////////////////////////////////////////////
10
10
#include "StartStopNIDAQ.h"
11
11
#include "NetOps.h"
12
 
#include "GeneralGUI.h"
 
12
#include "StringsAndQStrings.h"
13
13
#include <QMessageBox>
14
14
#include <QSound>
15
15
#include <QDebug>
131
131
    sTextNode::sPtr             CounterId(DeviceConfig->GetAttr("Counter"));
132
132
    if( ! CounterId.IsCorrect() ){
133
133
      QMessageBox::critical(this
134
 
        ,sString2QString(DeviceIdentifier()+" failure.")
135
 
        ,tr("Wrong configuration.") );
 
134
        ,tr("%1 failure.").arg(ToQString(DeviceIdentifier()))
 
135
        ,tr("Wrong configuration of device %1.").arg(ToQString(DeviceIdentifier())) );
136
136
      SetDeviceState(Offline);
137
137
      return;
138
138
    };
141
141
                         (sDevice::FindCreatedDevice(sString(*CounterId)));
142
142
    if( ! PhotonCounter ){
143
143
      QMessageBox::critical(this
144
 
          ,sString2QString(DeviceIdentifier()+" failure.")
 
144
          ,tr("%1 failure.").arg(ToQString(DeviceIdentifier()))
145
145
          ,tr("The counter has not been found. "
146
146
              "Launch it manually, please, and re-connect ")
147
 
          +sString2QString(DeviceIdentifier()) );
 
147
          +ToQString(DeviceIdentifier()) );
148
148
      SetDeviceState(Offline);
149
149
      return;
150
150
    };
170
170
{
171
171
  if( DeviceState() == Warming ){
172
172
    QMessageBox::critical(this
173
 
        ,sString2QString(DeviceIdentifier()+" failure.")
 
173
        ,tr("%1 failure.").arg(ToQString(DeviceIdentifier()))
174
174
        ,tr("Cannot connect to the counter '")
175
 
        +sString2QString(PhotonCounter->DeviceIdentifier())
 
175
        +ToQString(PhotonCounter->DeviceIdentifier())
176
176
        +tr("'.")
177
177
        );
178
178
    disconnect(PhotonCounter,SIGNAL(NowOffline()),this,SLOT(ReportError()));
179
179
    disconnect(PhotonCounter,SIGNAL(NowStandby()),this,SLOT(EnterStandby()));
180
180
  }else{
181
181
    QMessageBox::critical(this
182
 
        ,sString2QString(DeviceIdentifier()+" failure.")
 
182
        ,tr("%1 failure.").arg(ToQString(DeviceIdentifier()))
183
183
        ,tr("The counter '")
184
 
        +sString2QString(PhotonCounter->DeviceIdentifier())
 
184
        +ToQString(PhotonCounter->DeviceIdentifier())
185
185
        +tr("' does not respond. Check connections.")
186
186
        );
187
187
    disconnect(PhotonCounter,SIGNAL(NowOffline()),this,SLOT(ReportError()));