added show jump lines in disassembly (#286)

This commit is contained in:
Jubal 2018-01-28 17:28:25 -05:00 committed by xarkes
parent 98c6c0a56e
commit a7ce43784b
5 changed files with 23 additions and 4 deletions

View File

@ -507,6 +507,7 @@ void CutterCore::resetDefaultAsmOptions()
setConfig("asm.offset", Config()->getAsmOffset());
setConfig("asm.describe", Config()->getAsmDescribe());
setConfig("asm.stackptr", Config()->getAsmStackPointer());
setConfig("asm.lines", Config()->getAsmLines());
setConfig("asm.bytes", Config()->getAsmBytes());
setConfig("asm.bytespace", Config()->getAsmBytespace());
setConfig("asm.lbytes", Config()->getAsmLBytes());
@ -525,6 +526,7 @@ void CutterCore::saveDefaultAsmOptions()
Config()->setAsmOffset(getConfigb("asm.offset"));
Config()->setAsmDescribe(getConfigb("asm.describe"));
Config()->setAsmStackPointer(getConfigb("asm.stackptr"));
Config()->setAsmLines(getConfigb("asm.lines"));
Config()->setAsmBytes(getConfigb("asm.bytes"));
Config()->setAsmBytespace(getConfigb("asm.bytespace"));
Config()->setAsmLBytes(getConfigb("asm.lbytes"));
@ -760,7 +762,6 @@ void CutterCore::getOpcodes()
void CutterCore::setSettings()
{
setConfig("scr.interactive", false);
setConfig("asm.lines", false);
// Intredazting...
//setConfig("asm.linesright", "true");
//setConfig("asm.lineswidth", "15");

View File

@ -40,6 +40,7 @@ void AsmOptionsWidget::updateAsmOptionsFromVars()
qhelpers::setCheckedWithoutSignals(ui->offsetCheckBox, Core()->getConfigb("asm.offset"));
qhelpers::setCheckedWithoutSignals(ui->describeCheckBox, Core()->getConfigb("asm.describe"));
qhelpers::setCheckedWithoutSignals(ui->stackpointerCheckBox, Core()->getConfigb("asm.stackptr"));
qhelpers::setCheckedWithoutSignals(ui->linesCheckBox, Core()->getConfigb("asm.lines"));
bool bytesEnabled = Core()->getConfigb("asm.bytes");
qhelpers::setCheckedWithoutSignals(ui->bytesCheckBox, bytesEnabled);
@ -134,6 +135,12 @@ void AsmOptionsWidget::on_stackpointerCheckBox_toggled(bool checked)
triggerAsmOptionsChanged();
}
void AsmOptionsWidget::on_linesCheckBox_toggled(bool checked)
{
Core()->setConfig("asm.lines", checked);
triggerAsmOptionsChanged();
}
void AsmOptionsWidget::on_bytesCheckBox_toggled(bool checked)
{
Core()->setConfig("asm.bytes", checked);

View File

@ -39,6 +39,7 @@ private slots:
void on_offsetCheckBox_toggled(bool checked);
void on_describeCheckBox_toggled(bool checked);
void on_stackpointerCheckBox_toggled(bool checked);
void on_linesCheckBox_toggled(bool checked);
void on_bytesCheckBox_toggled(bool checked);
void on_bytespaceCheckBox_toggled(bool checked);
void on_lbytesCheckBox_toggled(bool checked);

View File

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>461</width>
<height>463</height>
<width>541</width>
<height>478</height>
</rect>
</property>
<property name="windowTitle">
@ -49,6 +49,13 @@
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="linesCheckBox">
<property name="text">
<string>Show jump lines (asm.lines)</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="bytesCheckBox">
<property name="text">

View File

@ -58,6 +58,9 @@ public:
bool getAsmStackPointer() const { return s.value("asm.stackptr", false).toBool(); }
void setAsmStackPointer(bool v) { s.setValue("asm.stackptr", v); }
bool getAsmLines() const { return s.value("asm.lines", false).toBool(); }
void setAsmLines(bool v) { s.setValue("asm.lines", v); }
bool getAsmBytes() const { return s.value("asm.bytes", false).toBool(); }
void setAsmBytes(bool v) { s.setValue("asm.bytes", v); }