mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
Add asm.size option in preferences (#374)
This commit is contained in:
parent
c127772dc1
commit
742690afd0
@ -536,6 +536,7 @@ void CutterCore::resetDefaultAsmOptions()
|
|||||||
setConfig("asm.cmt.right", Config()->getAsmCmtRight());
|
setConfig("asm.cmt.right", Config()->getAsmCmtRight());
|
||||||
setConfig("asm.varsum", Config()->getAsmVarSum());
|
setConfig("asm.varsum", Config()->getAsmVarSum());
|
||||||
setConfig("asm.bytes", Config()->getAsmBytes());
|
setConfig("asm.bytes", Config()->getAsmBytes());
|
||||||
|
setConfig("asm.size", Config()->getAsmSize());
|
||||||
setConfig("asm.bytespace", Config()->getAsmBytespace());
|
setConfig("asm.bytespace", Config()->getAsmBytespace());
|
||||||
setConfig("asm.lbytes", Config()->getAsmLBytes());
|
setConfig("asm.lbytes", Config()->getAsmLBytes());
|
||||||
setConfig("asm.nbytes", Config()->getAsmNBytes());
|
setConfig("asm.nbytes", Config()->getAsmNBytes());
|
||||||
@ -561,6 +562,7 @@ void CutterCore::saveDefaultAsmOptions()
|
|||||||
Config()->setAsmCmtRight(getConfigb("asm.cmt.right"));
|
Config()->setAsmCmtRight(getConfigb("asm.cmt.right"));
|
||||||
Config()->setAsmVarSum(getConfigb("asm.varsum"));
|
Config()->setAsmVarSum(getConfigb("asm.varsum"));
|
||||||
Config()->setAsmBytes(getConfigb("asm.bytes"));
|
Config()->setAsmBytes(getConfigb("asm.bytes"));
|
||||||
|
Config()->setAsmSize(getConfigb("asm.size"));
|
||||||
Config()->setAsmBytespace(getConfigb("asm.bytespace"));
|
Config()->setAsmBytespace(getConfigb("asm.bytespace"));
|
||||||
Config()->setAsmLBytes(getConfigb("asm.lbytes"));
|
Config()->setAsmLBytes(getConfigb("asm.lbytes"));
|
||||||
Config()->setAsmNBytes(getConfigi("asm.nbytes"));
|
Config()->setAsmNBytes(getConfigi("asm.nbytes"));
|
||||||
|
@ -46,6 +46,7 @@ void AsmOptionsWidget::updateAsmOptionsFromVars()
|
|||||||
qhelpers::setCheckedWithoutSignals(ui->emuCheckBox, Core()->getConfigb("asm.emu"));
|
qhelpers::setCheckedWithoutSignals(ui->emuCheckBox, Core()->getConfigb("asm.emu"));
|
||||||
qhelpers::setCheckedWithoutSignals(ui->cmtrightCheckBox, Core()->getConfigb("asm.cmtright"));
|
qhelpers::setCheckedWithoutSignals(ui->cmtrightCheckBox, Core()->getConfigb("asm.cmtright"));
|
||||||
qhelpers::setCheckedWithoutSignals(ui->varsumCheckBox, Core()->getConfigb("asm.varsum"));
|
qhelpers::setCheckedWithoutSignals(ui->varsumCheckBox, Core()->getConfigb("asm.varsum"));
|
||||||
|
qhelpers::setCheckedWithoutSignals(ui->sizeCheckBox, Core()->getConfigb("asm.size"));
|
||||||
|
|
||||||
bool bytesEnabled = Core()->getConfigb("asm.bytes");
|
bool bytesEnabled = Core()->getConfigb("asm.bytes");
|
||||||
qhelpers::setCheckedWithoutSignals(ui->bytesCheckBox, bytesEnabled);
|
qhelpers::setCheckedWithoutSignals(ui->bytesCheckBox, bytesEnabled);
|
||||||
@ -196,6 +197,12 @@ void AsmOptionsWidget::on_bytesCheckBox_toggled(bool checked)
|
|||||||
triggerAsmOptionsChanged();
|
triggerAsmOptionsChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AsmOptionsWidget::on_sizeCheckBox_toggled(bool checked)
|
||||||
|
{
|
||||||
|
Core()->setConfig("asm.size", checked);
|
||||||
|
triggerAsmOptionsChanged();
|
||||||
|
}
|
||||||
|
|
||||||
void AsmOptionsWidget::on_bytespaceCheckBox_toggled(bool checked)
|
void AsmOptionsWidget::on_bytespaceCheckBox_toggled(bool checked)
|
||||||
{
|
{
|
||||||
Core()->setConfig("asm.bytespace", checked);
|
Core()->setConfig("asm.bytespace", checked);
|
||||||
|
@ -46,6 +46,7 @@ private slots:
|
|||||||
void on_cmtrightCheckBox_toggled(bool checked);
|
void on_cmtrightCheckBox_toggled(bool checked);
|
||||||
void on_varsumCheckBox_toggled(bool checked);
|
void on_varsumCheckBox_toggled(bool checked);
|
||||||
void on_bytesCheckBox_toggled(bool checked);
|
void on_bytesCheckBox_toggled(bool checked);
|
||||||
|
void on_sizeCheckBox_toggled(bool checked);
|
||||||
void on_bytespaceCheckBox_toggled(bool checked);
|
void on_bytespaceCheckBox_toggled(bool checked);
|
||||||
void on_lbytesCheckBox_toggled(bool checked);
|
void on_lbytesCheckBox_toggled(bool checked);
|
||||||
void on_syntaxComboBox_currentIndexChanged(int index);
|
void on_syntaxComboBox_currentIndexChanged(int index);
|
||||||
|
@ -98,6 +98,13 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="sizeCheckBox">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show size of opcodes in disassembly (asm.size)</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
|
@ -85,6 +85,9 @@ public:
|
|||||||
bool getAsmBytes() const { return s.value("asm.bytes", false).toBool(); }
|
bool getAsmBytes() const { return s.value("asm.bytes", false).toBool(); }
|
||||||
void setAsmBytes(bool v) { s.setValue("asm.bytes", v); }
|
void setAsmBytes(bool v) { s.setValue("asm.bytes", v); }
|
||||||
|
|
||||||
|
bool getAsmSize() const { return s.value("asm.size", false).toBool(); }
|
||||||
|
void setAsmSize(bool v) { s.setValue("asm.size", v); }
|
||||||
|
|
||||||
bool getAsmBytespace() const { return s.value("asm.bytespace", false).toBool(); }
|
bool getAsmBytespace() const { return s.value("asm.bytespace", false).toBool(); }
|
||||||
void setAsmBytespace(bool v) { s.setValue("asm.bytespace", v); }
|
void setAsmBytespace(bool v) { s.setValue("asm.bytespace", v); }
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user