blob: c3a6b442f0fd8919c0066a35dac47c13bd89dd04 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
// license:BSD-3-Clause
// copyright-holders:Andrew Gardner
#include "emu.h"
#include "logwindow.h"
#include "util/xmlfile.h"
#include <QtWidgets/QVBoxLayout>
namespace osd::debugger::qt {
LogWindow::LogWindow(DebuggerQt &debugger, QWidget *parent) :
WindowQt(debugger, nullptr)
{
setWindowTitle("Debug: Machine Log");
if (parent)
{
QPoint parentPos = parent->pos();
setGeometry(parentPos.x()+100, parentPos.y()+100, 800, 400);
}
//
// The main frame and its input and log widgets
//
QFrame *mainWindowFrame = new QFrame(this);
// The main log view
m_logView = new DebuggerView(DVT_LOG, m_machine, this);
// Layout
QVBoxLayout* vLayout = new QVBoxLayout(mainWindowFrame);
vLayout->setSpacing(3);
vLayout->setContentsMargins(2,2,2,2);
vLayout->addWidget(m_logView);
setCentralWidget(mainWindowFrame);
}
LogWindow::~LogWindow()
{
}
void LogWindow::restoreConfiguration(util::xml::data_node const &node)
{
WindowQt::restoreConfiguration(node);
m_logView->restoreConfigurationFromNode(node);
}
void LogWindow::saveConfigurationToNode(util::xml::data_node &node)
{
WindowQt::saveConfigurationToNode(node);
node.set_attribute_int(ATTR_WINDOW_TYPE, WINDOW_TYPE_ERROR_LOG_VIEWER);
m_logView->saveConfigurationToNode(node);
}
} // namespace osd::debugger::qt
|