OpenStudioPostProcessJob::~OpenStudioPostProcessJob()
 {
   requestStop();
   wait();
   // disconnect any remaining slots
   disconnect(this);
 }
示例#2
0
 NullJob::~NullJob()
 {
   requestStop();
   wait();
   // disconnect any remaining slots
   disconnect(this);
 }
 EnergyPlusPreProcessJob::~EnergyPlusPreProcessJob()
 {
   requestStop();
   wait();
   // disconnect any remaining slots
   disconnect(this);
 }
示例#4
0
  void pauseRunManager(openstudio::runmanager::RunManager& rm)
  {
    rm.setPaused(true);

    std::vector<openstudio::runmanager::Job> jobs = rm.getJobs();

    for (auto itr = jobs.begin();
         itr != jobs.end();
         ++itr)
    {
      itr->setCanceled(true);
    }

    for (auto itr = jobs.begin();
         itr != jobs.end();
         ++itr)
    { 
      itr->requestStop();
    }

    for (auto itr = jobs.begin();
         itr != jobs.end();
         ++itr)
    {
      itr->waitForFinished();
    }
  }
 CalculateEconomicsJob::~CalculateEconomicsJob()
 {
   requestStop();
   wait();
   // disconnect any remaining slots
   disconnect(this);
 }
示例#6
0
 ModelToRadJob::~ModelToRadJob()
 {
   requestStop();
   wait();
   // disconnect any remaining slots
   disconnect(this);
 }
 ParallelEnergyPlusSplitJob::~ParallelEnergyPlusSplitJob()
 {
   requestStop();
   wait();
   // disconnect any remaining slots
   disconnect(this);
 }
 void componentConnected()
 {     
    CPPUNIT_ASSERT(!isMyVectorAttributeValid());   
                
    notifyOnMyVectorAttribute();                        
    requestInit();                
    requestStop();            
 }
示例#9
0
// Called by EventManager
void Event::stop() {
    requestStop();

    if (threadHandle == NULL)
        return;

    WaitForSingleObject(threadHandle, INFINITE);
    CloseHandle(threadHandle);

    threadHandle = NULL;
    stopModule = FALSE;
}
示例#10
0
文件: qvvideo.cpp 项目: l0wside/qvisu
QVVideo::QVVideo(QDomElement xml_desc, QString container, QWidget *parent = 0) :
    QVElement(xml_desc,container,parent)
{
    if (xml_desc.firstChildElement("url").isNull()) {
        player = 0;
        return;
    }
    player = new QVVideoPlayer(this,xml_desc.firstChildElement("url").text());
    QThread *thread = new QThread();
    player->moveToThread(thread);

    QObject::connect(this,SIGNAL(requestPlay()),player,SLOT(play()));
    QObject::connect(this,SIGNAL(requestStop()),player,SLOT(stop()));

    thread->start();
}
示例#11
0
 void componentConnected()
 {     
    CPPUNIT_ASSERT(!isAnotherIntAttrValid());   
    CPPUNIT_ASSERT(!isMyIntAttrValid());
    
    if (mMode & CAttributesTest::MaskAnotherIntAttribute)
    {        
       notifyOnAnotherIntAttr();      
    }
    else
    {        
       notifyOnMyIntAttr();      
    }
    
    if (mMode == CAttributesTest::InitializeAttributeAfterStartup)          
    {
       requestInit();
    }
    
    if (mMode & CAttributesTest::UpdateEventsCount)
    {
       // five times so the event may be sent 5 times back (with 'always' notification type)
       requestInit();
       requestInit();
       requestInit();
       requestInit();
       requestInit();
    }
    
    if (mMode & CAttributesTest::Invalidate)
    {
       requestInit();
       requestInvalidate();
    }
          
    requestStop();            
 }
示例#12
0
GstPlayer::GstPlayer(QObject *parent):
    IMediaPlayer(parent),
    playing(false),
    loaded(false),
    error(false),
    playingRequested(false),
    mustSeek(true),
    duration(-1),
    position(0),
    formatTime(GST_FORMAT_TIME),
    pipeline(0),
    gstObjectName("player")
{
    GstPlayer::ensureInitGst();
    connect(this,SIGNAL(requestPause()),this,SLOT(doPause()));
    connect(this,SIGNAL(requestPlay()),this,SLOT(doPlay()));
    connect(this,SIGNAL(requestStop()),this,SLOT(doStop()));
    //watcher = NULL;
    theVol = new GValue();
    g_value_init(theVol,G_TYPE_DOUBLE);

    positionQueryTimer = new QTimer(this);

}
示例#13
0
void ConsoleHandler::stop() {
  requestStop();
  wait();
}
示例#14
0
AbstractThread::~AbstractThread()
{
    requestStop();
    join();
}
示例#15
0
文件: qvvideo.cpp 项目: l0wside/qvisu
void QVVideo::hideEvent(QHideEvent*) {
    qDebug() << "video hidden";
    emit requestStop();
}
示例#16
0
void Video::postRun(MasterTimer* timer, QList<Universe*> universes)
{
    emit requestStop();
    Function::postRun(timer, universes);
}
示例#17
0



}

void MainWindow::setupSignalsAndSlots()
{
	connect(ui->doInitialize, SIGNAL(clicked(bool)), this, SLOT(onInitializeToggled(bool)));
	connect(ui->runToggle, SIGNAL(clicked(bool)), this, SLOT(onRunToggled(bool)));

	// MainWindow to VNALibrary
	connect(this, SIGNAL(requestLoadDLL(QString)), &lib, SLOT(loadAsync(QString)));
	connect(this, SIGNAL(requestInitialize(QtTaskHandle, Qtvoidptr)), &lib, SLOT(initializeAsync(QtTaskHandle, Qtvoidptr)));
	connect(this, SIGNAL(requestStart(QtTaskHandle)), &lib, SLOT(startAsync(QtTaskHandle)));
	connect(this, SIGNAL(requestStop(QtTaskHandle)), &lib, SLOT(stopAsync(QtTaskHandle)));
	connect(this, SIGNAL(requestUtilPingUnit(QtTaskHandle)), &lib, SLOT(utilPingUnitAsync(QtTaskHandle)));
	connect(this, SIGNAL(requestMeasureUncalibrated(QtTaskHandle,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData)),
			&lib, SLOT(measureUncalibratedAsync(QtTaskHandle, QtComplexData, QtComplexData, QtComplexData, QtComplexData, QtComplexData)));
	connect(this, SIGNAL(requestMeasure2PortCalibrated(QtTaskHandle,QtComplexData,QtComplexData,QtComplexData,QtComplexData)),
			&lib, SLOT(measure2PortCalibratedAsync(QtTaskHandle, QtComplexData, QtComplexData, QtComplexData, QtComplexData)));
	connect(this, SIGNAL(requestMeasureCalibrationStep(QtTaskHandle,QtCalibrationStep)),
			&lib, SLOT(measureCalibrationStepAsync(QtTaskHandle, QtCalibrationStep)));
	connect(this, SIGNAL(requestImportCalibrationAsync(QtTaskHandle,const double*,uint,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData)),
			&lib, SLOT(importCalibrationAsync(QtTaskHandle,const double*,uint,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData,QtComplexData)));
	connect(this, SIGNAL(requestClearCalibration(QtTaskHandle)), &lib, SLOT(clearCalibrationAsync(QtTaskHandle)));

	// VNALibrary to MainWindow
	connect(&lib, SIGNAL(loadFinished(bool)), this, SLOT(onLoadFinished(bool)));
	connect(&lib, SIGNAL(initializeProgress(int,Qtvoidptr)), this, SLOT(onInitializeProgress(int,Qtvoidptr)));
	connect(&lib, SIGNAL(initializeFinished(QtErrCode)), this, SLOT(onInitializeFinished(QtErrCode)));