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

Subversion Repositories riscv_vhdl

[/] [riscv_vhdl/] [trunk/] [debugger/] [src/] [gui_plugin/] [CpuWidgets/] [MemViewWidget.cpp] - Blame information for rev 5

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 3 sergeykhbr
/**
2
 * @file
3
 * @copyright  Copyright 2016 GNSS Sensor Ltd. All right reserved.
4
 * @author     Sergey Khabarov - sergeykhbr@gmail.com
5
 * @brief      Memory editor form.
6
 */
7
 
8
#include "MemArea.h"
9
#include "MemControl.h"
10
#include "MemViewWidget.h"
11
#include "moc_MemViewWidget.h"
12
 
13
#include <memory>
14
 
15
namespace debugger {
16
 
17
MemViewWidget::MemViewWidget(IGui *igui, QWidget *parent,
18
    uint64_t addr, uint64_t sz) : QWidget(parent) {
19
    igui_ = igui;
20
 
21
    gridLayout = new QGridLayout(this);
22
    gridLayout->setSpacing(4);
23
    gridLayout->setHorizontalSpacing(10);
24
    gridLayout->setVerticalSpacing(0);
25
    gridLayout->setContentsMargins(4, 4, 4, 4);
26
    setLayout(gridLayout);
27
 
28
    MemControl *pctrl = new MemControl(this, addr, sz);
29
 
30
    MemArea *parea = new MemArea(igui, this, addr, sz);
31
    gridLayout->addWidget(pctrl , 0, 0);
32
    gridLayout->addWidget(parea, 1, 0);
33
    gridLayout->setRowStretch(1, 10);
34
 
35
    connect(this, SIGNAL(signalUpdateByTimer()),
36
            parea, SLOT(slotUpdateByTimer()));
37
 
38
    connect(pctrl, SIGNAL(signalAddressChanged(AttributeType *)),
39
            parea, SLOT(slotAddressChanged(AttributeType *)));
40
}
41
 
42
 
43
void MemViewWidget::slotUpdateByTimer() {
44
    if (!isVisible()) {
45
        return;
46
    }
47
    emit signalUpdateByTimer();
48
}
49
 
50
}  // namespace debugger

powered by: WebSVN 2.1.0

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