Пример #1
0
void OlvisExecGuiPlugin::closeProject()
{
    mTimer.stop();
    mInterface->stop();
    QProgressDialog dlg(tr("Waiting for vision system to stop"), tr("Continue"), 0, 0);
    connect(mInterface,SIGNAL(executionFinished()), &dlg, SLOT(close()));
    while(!mInterface->waitForStop(1000))
    {
        dlg.exec();
    }

    if(graphFile.isEmpty())
        return;

    if(mInterface->testUpdateFlag())
    {
        if(QMessageBox::question(0, tr("Save vision configuration?"),
                                 tr("Do you want to save the vision configuration?"),
                                 QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
        {
            save();
        }
    }
    graphFile = QString();
    QFile(autoSaveFile).remove();
    autoSaveFile = QString();
    toolbar->setEnabled(false);
    videoWidget->setEnabled(false);
    mInterface->clear();
}
Пример #2
0
OlvisToolbar::OlvisToolbar(QWidget *parent) :
    QToolBar(parent),
    ui(new Ui::OlvisToolbar)
{
    ui->setupUi(this);
    connect(&OlvisSingleton::instance(), SIGNAL(executionStarted()), SLOT(onExecutionStarted()));
    connect(&OlvisSingleton::instance(), SIGNAL(executionFinished()), SLOT(onExecutionFinished()));
}
Пример #3
0
bool RestData::dispatchRequest(DataRequest *value)
{
//    qDebug() << __PRETTY_FUNCTION__ << __LINE__ << __FILE__;
    if(enabled)
    {
        if(value && !value->getProcessing())
        {
//            m_workers->sendRequest(value);
            RequestWorker * tmp = m_workers->getWorker();//HttpWorkerPool::getWorker();//new HttpRequestWorker(request);
//            qDebug() << "WORKER" << tmp;
            connect(tmp, SIGNAL(workerDone(DataRequest *)), this, SLOT(workerDone(DataRequest *)));
            connect(tmp, SIGNAL(executionFinished(QByteArray)), this, SIGNAL(executionFinished(QByteArray)));
            tmp->setInputrequest(value);
            tmp->execute();
            return true;
        }
        else
        {
Пример #4
0
 int run() { emit executionFinished(); kDebug() << "run " << name(); return 0; }
void NCSLocalApplicationBridge::stopExecution(bool destroy)
{
    m_destroyProcess = destroy;
    executionFinished();
}
void NCSLocalApplicationBridge::m_processFinished()
{
    executionFinished();
}
Пример #7
0
    ui->actionImageDisplays->setMenu(&mImageDisplayMenu);

    ui->actionStop->setChecked(true);
    ui->actionProblems->setVisible(false);
    connect(&mInterface, SIGNAL(portValueChanged(int, QString,QVariant)), SLOT(check()));
    connect(&mInterface, SIGNAL(filterConnected(PortId,PortId,int)), SLOT(check()));
    connect(&mInterface, SIGNAL(filterDisconnected(PortId,PortId,int)), SLOT(check()));
    connect(&mInterface,SIGNAL(processorsDisconnected(int,int)), SLOT(check()));
    connect(&mInterface,SIGNAL(inputPortConnected(QString,PortId,int)), SLOT(check()));
    connect(&mInterface,SIGNAL(inputPortDisconnected(QString,PortId,int)), SLOT(check()));
    connect(&mInterface, SIGNAL(filterCreated(FilterInfo,int)), SLOT(check()));
    connect(&mInterface, SIGNAL(filterDeleted(FilterInfo)), SLOT(check()));
    connect(&mInterface, SIGNAL(processorCreated(ProcessorInfo)), SLOT(check()));
    connect(&mInterface, SIGNAL(processorDeleted(ProcessorInfo)), SLOT(check()));
    connect(&mInterface, SIGNAL(cleared()), SLOT(check()));
    connect(&mInterface, SIGNAL(executionFinished()), SLOT(onExecutionFinished()));
    connect(&mInterface, SIGNAL(executionStarted()), SLOT(onExecutionStarted()));
    connect(&mInterface, SIGNAL(makroInputCreated(QString,PortId,int)), SLOT(check()));
    connect(&mInterface, SIGNAL(makroInputRemoved(PortId,int)), SLOT(check()));

    // connect signals to olvis interface always QUEUED, to be sure gui has finished all repaints and animations
    connect(this, SIGNAL(startRequested()),& mInterface, SLOT(start()), Qt::QueuedConnection);
    connect(this, SIGNAL(stopRequested()), &mInterface, SLOT(stop()), Qt::QueuedConnection);
    connect(this, SIGNAL(pauseRequested()), &mInterface, SLOT(pause()), Qt::QueuedConnection);
    connect(this, SIGNAL(stepRequested(bool)), &mInterface, SLOT(step(bool)), Qt::QueuedConnection);
    connect(this, SIGNAL(setTraceEnabled(bool)), &mInterface, SLOT(setTracingEnabled(bool)), Qt::QueuedConnection);
    onExecutionFinished();
    check();
}

void MainToolBar::initMenu(QMenu* fileMenu, QMenu* olvisMenu)