2 // debuggertab.cpp: "Debugger" tab on the settings dialog
6 // JPM = Jean-Paul Mari <djipi.mari@gmail.com>
9 // --- ---------- ------------------------------------------------------------
10 // JPM 06/19/2016 Created this file
11 // JPM 06/19/2016 Soft debugger support
13 #include "debuggertab.h"
17 DebuggerTab::DebuggerTab(QWidget
* parent
/*= 0*/): QWidget(parent
)
19 QLabel
* label3
= new QLabel("Disassembly lines:");
20 edit3
= new QLineEdit("");
21 edit3
->setPlaceholderText("Number of disassembly lines");
22 QVBoxLayout
* layout1
= new QVBoxLayout
;
23 layout1
->addWidget(label3
);
25 QVBoxLayout
* layout2
= new QVBoxLayout
;
26 layout2
->addWidget(edit3
);
28 QHBoxLayout
* layout3
= new QHBoxLayout
;
29 layout3
->addLayout(layout1
);
30 layout3
->addLayout(layout2
);
32 QVBoxLayout
* layout4
= new QVBoxLayout
;
33 layout4
->addLayout(layout3
);
36 displayHWlabels
= new QCheckBox(tr("Display HW labels"));
37 disasmopcodes
= new QCheckBox(tr("Display M68000 opcodes"));
38 displayFullSourceFilename
= new QCheckBox(tr("Display source filename"));
39 disasmopcodes
->setDisabled(false);
40 displayHWlabels
->setDisabled(false);
41 displayFullSourceFilename
->setDisabled(false);
43 layout4
->addWidget(disasmopcodes
);
44 layout4
->addWidget(displayHWlabels
);
45 layout4
->addWidget(displayFullSourceFilename
);
51 DebuggerTab::~DebuggerTab()
56 // Save / Update the settings from the tabs dialog
57 void DebuggerTab::SetSettings(void)
61 //strcpy(vjs.debuggerROMPath, debuggerTab->edit1->text().toUtf8().data());
62 //strcpy(vjs.absROMPath, debuggerTab->edit2->text().toUtf8().data());
63 vjs
.nbrdisasmlines
= edit3
->text().toUInt(&ok
, 10);
64 //vjs.allowWritesToROM = debuggerTab->writeROM->isChecked();
65 vjs
.displayHWlabels
= displayHWlabels
->isChecked();
66 vjs
.disasmopcodes
= disasmopcodes
->isChecked();
67 vjs
.displayFullSourceFilename
= displayFullSourceFilename
->isChecked();
71 // Load / Update the tabs dialog from the settings
72 void DebuggerTab::GetSettings(void)
74 QVariant
v(vjs
.nbrdisasmlines
);
75 //debuggerTab->edit1->setText(vjs.debuggerROMPath);
76 //debuggerTab->edit2->setText(vjs.absROMPath);
77 edit3
->setText(v
.toString());
78 //debuggerTab->writeROM->setChecked(vjs.allowWritesToROM
79 displayHWlabels
->setChecked(vjs
.displayHWlabels
);
80 disasmopcodes
->setChecked(vjs
.disasmopcodes
);
81 displayFullSourceFilename
->setChecked(vjs
.displayFullSourceFilename
);