OpenCores
URL https://opencores.org/ocsvn/riscv_vhdl/riscv_vhdl/trunk

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [gui_plugin/] [ControlWidget/] [ConsoleWidget.cpp] - Diff between revs 3 and 4

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 3 Rev 4
Line 75... Line 75...
void ConsoleWidget::handleResponse(AttributeType *req, AttributeType *resp) {
void ConsoleWidget::handleResponse(AttributeType *req, AttributeType *resp) {
    if (resp->is_nil() || resp->is_invalid()) {
    if (resp->is_nil() || resp->is_invalid()) {
        return;
        return;
    }
    }
    RISCV_mutex_lock(&mutexOutput_);
    RISCV_mutex_lock(&mutexOutput_);
    strOutput_ += QString(resp->to_config()) + "\n";
    strOutput_ += QString(resp->to_config().to_string()) + "\n";
    RISCV_mutex_unlock(&mutexOutput_);
    RISCV_mutex_unlock(&mutexOutput_);
    emit signalNewData();
    emit signalNewData();
}
}
 
 
void ConsoleWidget::keyPressEvent(QKeyEvent *e) {
void ConsoleWidget::keyPressEvent(QKeyEvent *e) {
Line 89... Line 89...
    char vt_char = static_cast<char>(vt_key);
    char vt_char = static_cast<char>(vt_key);
    if (vt_char >= 'A' && vt_char <= 'Z' && e->modifiers() == Qt::NoModifier) {
    if (vt_char >= 'A' && vt_char <= 'Z' && e->modifiers() == Qt::NoModifier) {
        vt_key -= static_cast<uint32_t>('A');
        vt_key -= static_cast<uint32_t>('A');
        vt_key += static_cast<uint32_t>('a');
        vt_key += static_cast<uint32_t>('a');
    }
    }
 
    uint8_t spsmb = static_cast<uint8_t>(e->text().at(0).toLatin1());
 
    if (spsmb == '_' || vt_key == ':' || vt_key == '\\' || vt_key == '/') {
 
        vt_key = spsmb;
 
    }
    //printf("vt_key = %08x\n", vt_key);
    //printf("vt_key = %08x\n", vt_key);
    bool cmd_ready = iauto_->processKey(vt_key, &cmd, &cursorPos_);
    bool cmd_ready = iauto_->processKey(vt_key, &cmd, &cursorPos_);
 
 
    moveCursor(QTextCursor::End);
    moveCursor(QTextCursor::End);
    cursor = textCursor();
    cursor = textCursor();

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.