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
14 #include "debuggertab.h"
18 DebuggerTab::DebuggerTab(QWidget
* parent
/*= 0*/): QWidget(parent
)
20 QLabel
* label3
= new QLabel("Disassembly lines:");
21 edit3
= new QLineEdit("");
22 edit3
->setPlaceholderText("Number of disassembly lines");
23 QVBoxLayout
* layout1
= new QVBoxLayout
;
24 layout1
->addWidget(label3
);
26 QVBoxLayout
* layout2
= new QVBoxLayout
;
27 layout2
->addWidget(edit3
);
29 QHBoxLayout
* layout3
= new QHBoxLayout
;
30 layout3
->addLayout(layout1
);
31 layout3
->addLayout(layout2
);
33 QVBoxLayout
* layout4
= new QVBoxLayout
;
34 layout4
->addLayout(layout3
);
37 displayHWlabels
= new QCheckBox(tr("Display HW labels"));
38 disasmopcodes
= new QCheckBox(tr("Display M68000 opcodes"));
39 displayFullSourceFilename
= new QCheckBox(tr("Display source filename"));
40 disasmopcodes
->setDisabled(false);
41 displayHWlabels
->setDisabled(false);
42 displayFullSourceFilename
->setDisabled(false);
44 layout4
->addWidget(disasmopcodes
);
45 layout4
->addWidget(displayHWlabels
);
46 layout4
->addWidget(displayFullSourceFilename
);
52 DebuggerTab::~DebuggerTab()
57 // Save / Update the settings from the tabs dialog
58 void DebuggerTab::SetSettings(void)
62 //strcpy(vjs.debuggerROMPath, debuggerTab->edit1->text().toUtf8().data());
63 strcpy(vjs
.debuggerROMPath
, vjs
.alpineROMPath
);
64 //strcpy(vjs.absROMPath, debuggerTab->edit2->text().toUtf8().data());
65 vjs
.nbrdisasmlines
= edit3
->text().toUInt(&ok
, 10);
66 //vjs.allowWritesToROM = debuggerTab->writeROM->isChecked();
67 vjs
.displayHWlabels
= displayHWlabels
->isChecked();
68 vjs
.disasmopcodes
= disasmopcodes
->isChecked();
69 vjs
.displayFullSourceFilename
= displayFullSourceFilename
->isChecked();
73 // Load / Update the tabs dialog from the settings
74 void DebuggerTab::GetSettings(void)
76 QVariant
v(vjs
.nbrdisasmlines
);
77 //debuggerTab->edit1->setText(vjs.debuggerROMPath);
78 //debuggerTab->edit2->setText(vjs.absROMPath);
79 edit3
->setText(v
.toString());
80 //debuggerTab->writeROM->setChecked(vjs.allowWritesToROM
81 displayHWlabels
->setChecked(vjs
.displayHWlabels
);
82 disasmopcodes
->setChecked(vjs
.disasmopcodes
);
83 displayFullSourceFilename
->setChecked(vjs
.displayFullSourceFilename
);