Exemplo n.º 1
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()));
}
Exemplo n.º 2
0
void WarptenCli::handleNetworkData(QNetworkReply *networkReply)
{
    errorType = networkReply->error();
    if (errorType == QNetworkReply::NoError) {
        response = networkReply->readAll();
    } else {
        errorStr = networkReply->errorString();
    }

    networkReply->deleteLater();
    emit onExecutionFinished(this);
}
Exemplo n.º 3
0
int Engine::qt_metacall(QMetaObject::Call _c, int _id, void **_a)
{
    _id = QObject::qt_metacall(_c, _id, _a);
    if (_id < 0)
        return _id;
    if (_c == QMetaObject::InvokeMetaMethod) {
        switch (_id) {
        case 0: onEnginePanic((*reinterpret_cast< Atom(*)>(_a[1])),(*reinterpret_cast< Word(*)>(_a[2])),(*reinterpret_cast< const QString(*)>(_a[3])),(*reinterpret_cast< const QString(*)>(_a[4]))); break;
        case 1: onLine((*reinterpret_cast< Atom(*)>(_a[1])),(*reinterpret_cast< Word(*)>(_a[2]))); break;
        case 2: onExecutionFinished(); break;
        case 3: onEngineStarted(); break;
        case 4: onEngineStopped(); break;
        case 5: eval((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< const QString(*)>(_a[2])),(*reinterpret_cast< bool(*)>(_a[3]))); break;
        case 6: evalFn((*reinterpret_cast< const QString(*)>(_a[1])),(*reinterpret_cast< Atom(*)>(_a[2]))); break;
        case 7: fullstop(); break;
        default: ;
        }
        _id -= 8;
    }
    return _id;
}
Exemplo n.º 4
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)