Exemplo n.º 1
0
void TupLayerIndex::setLocalRequest(int layer, int column)
{
    Q_UNUSED(layer);
    Q_UNUSED(column);

    emit localRequest();
}
Exemplo n.º 2
0
void TupLayerIndex::keyPressEvent(QKeyEvent *event)
{
    int row = currentRow();
    int total = rowCount();

    if (event->key() == Qt::Key_Up) {
        if (row > 0) {
            setCurrentCell(row - 1, 0);
            emit localRequest();
        }
    }

    if (event->key() == Qt::Key_Down) {
        if (row < total-1) {
            setCurrentCell(row + 1, 0);
            emit localRequest();
        }
    }
}
Exemplo n.º 3
0
bool LabBot::DummyCrate::getData(LabBot::Request &req, LabBot::Response &resp) {
    Json::Value root;
    int i = 0;
    for (auto dev: m_devs) {
        Response lresp;
        Json::Value reqRoot;
        reqRoot["reqtype"] = "getDummyData";
        reqRoot["subsystem"] = dev;
        Request lreq(JsonBson(reqRoot).str(), this);
        localRequest(lreq, lresp);
        root["data"][i] = (Json::Value)(JsonBson(lresp.m_string));
        i++;
    }
    root["status"] = "success";
    resp = root;
    return true;
}