GUI: finished EditBreakpointDialog
This commit is contained in:
parent
23d3fbb157
commit
42c9b70cae
|
@ -1,5 +1,6 @@
|
||||||
#include "EditBreakpointDialog.h"
|
#include "EditBreakpointDialog.h"
|
||||||
#include "ui_EditBreakpointDialog.h"
|
#include "ui_EditBreakpointDialog.h"
|
||||||
|
#include "StringUtil.h"
|
||||||
|
|
||||||
EditBreakpointDialog::EditBreakpointDialog(QWidget* parent, const BRIDGEBP & bp)
|
EditBreakpointDialog::EditBreakpointDialog(QWidget* parent, const BRIDGEBP & bp)
|
||||||
: QDialog(parent),
|
: QDialog(parent),
|
||||||
|
@ -7,6 +8,12 @@ EditBreakpointDialog::EditBreakpointDialog(QWidget* parent, const BRIDGEBP & bp)
|
||||||
mBp(bp)
|
mBp(bp)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||||
|
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
|
||||||
|
#endif
|
||||||
|
setFixedSize(this->size()); //fixed size
|
||||||
|
setWindowTitle(QString("Edit Breakpoint %1").arg(ToHexString(bp.addr)));
|
||||||
|
loadFromBp();
|
||||||
}
|
}
|
||||||
|
|
||||||
EditBreakpointDialog::~EditBreakpointDialog()
|
EditBreakpointDialog::~EditBreakpointDialog()
|
||||||
|
@ -17,7 +24,7 @@ EditBreakpointDialog::~EditBreakpointDialog()
|
||||||
void EditBreakpointDialog::loadFromBp()
|
void EditBreakpointDialog::loadFromBp()
|
||||||
{
|
{
|
||||||
ui->editName->setText(mBp.name);
|
ui->editName->setText(mBp.name);
|
||||||
ui->editHitCount->setText(QString("%1").arg(mBp.hitCount));
|
ui->spinHitCount->setValue(mBp.hitCount);
|
||||||
ui->editBreakCondition->setText(mBp.breakCondition);
|
ui->editBreakCondition->setText(mBp.breakCondition);
|
||||||
ui->checkBoxFastResume->setChecked(mBp.fastResume);
|
ui->checkBoxFastResume->setChecked(mBp.fastResume);
|
||||||
ui->editLogText->setText(mBp.logText);
|
ui->editLogText->setText(mBp.logText);
|
||||||
|
@ -62,13 +69,12 @@ void EditBreakpointDialog::on_editCommandCondition_textEdited(const QString & ar
|
||||||
copyTruncate(mBp.commandCondition, arg1);
|
copyTruncate(mBp.commandCondition, arg1);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditBreakpointDialog::on_buttonResetCount_clicked()
|
|
||||||
{
|
|
||||||
mBp.hitCount = 0;
|
|
||||||
ui->editHitCount->setText(QString("%1").arg(mBp.hitCount));
|
|
||||||
}
|
|
||||||
|
|
||||||
void EditBreakpointDialog::on_checkBoxFastResume_toggled(bool checked)
|
void EditBreakpointDialog::on_checkBoxFastResume_toggled(bool checked)
|
||||||
{
|
{
|
||||||
mBp.fastResume = checked;
|
mBp.fastResume = checked;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void EditBreakpointDialog::on_spinHitCount_valueChanged(int arg1)
|
||||||
|
{
|
||||||
|
mBp.hitCount = arg1;
|
||||||
|
}
|
||||||
|
|
|
@ -23,20 +23,13 @@ public:
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_editName_textEdited(const QString & arg1);
|
void on_editName_textEdited(const QString & arg1);
|
||||||
|
|
||||||
void on_editBreakCondition_textEdited(const QString & arg1);
|
void on_editBreakCondition_textEdited(const QString & arg1);
|
||||||
|
|
||||||
void on_editLogText_textEdited(const QString & arg1);
|
void on_editLogText_textEdited(const QString & arg1);
|
||||||
|
|
||||||
void on_editLogCondition_textEdited(const QString & arg1);
|
void on_editLogCondition_textEdited(const QString & arg1);
|
||||||
|
|
||||||
void on_editCommandText_textEdited(const QString & arg1);
|
void on_editCommandText_textEdited(const QString & arg1);
|
||||||
|
|
||||||
void on_editCommandCondition_textEdited(const QString & arg1);
|
void on_editCommandCondition_textEdited(const QString & arg1);
|
||||||
|
|
||||||
void on_buttonResetCount_clicked();
|
|
||||||
|
|
||||||
void on_checkBoxFastResume_toggled(bool checked);
|
void on_checkBoxFastResume_toggled(bool checked);
|
||||||
|
void on_spinHitCount_valueChanged(int arg1);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::EditBreakpointDialog* ui;
|
Ui::EditBreakpointDialog* ui;
|
||||||
|
|
|
@ -6,14 +6,33 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>568</width>
|
<width>506</width>
|
||||||
<height>261</height>
|
<height>221</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>Edit breakpoint</string>
|
||||||
|
</property>
|
||||||
|
<property name="windowIcon">
|
||||||
|
<iconset resource="../../resource.qrc">
|
||||||
|
<normaloff>:/icons/images/breakpoint.png</normaloff>:/icons/images/breakpoint.png</iconset>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout">
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<property name="spacing">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
|
@ -25,40 +44,7 @@
|
||||||
<property name="horizontalSpacing">
|
<property name="horizontalSpacing">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
|
||||||
<widget class="QLabel" name="labelName">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Name:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>editName</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="0" column="1">
|
|
||||||
<widget class="QLineEdit" name="editName"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QLabel" name="labelHitCount">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Hit Count:</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="0">
|
|
||||||
<widget class="QLabel" name="labelBreakCondition">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Break Condition:</string>
|
|
||||||
</property>
|
|
||||||
<property name="buddy">
|
|
||||||
<cstring>editBreakCondition</cstring>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="2" column="1">
|
|
||||||
<widget class="QLineEdit" name="editBreakCondition"/>
|
|
||||||
</item>
|
|
||||||
<item row="3" column="0">
|
|
||||||
<widget class="QLabel" name="labelLogText">
|
<widget class="QLabel" name="labelLogText">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Log Text:</string>
|
<string>&Log Text:</string>
|
||||||
|
@ -68,10 +54,29 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="1">
|
<item row="0" column="0">
|
||||||
|
<widget class="QLabel" name="labelBreakCondition">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Break Condition:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>editBreakCondition</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1">
|
||||||
|
<widget class="QLineEdit" name="editBreakCondition"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="1">
|
||||||
<widget class="QLineEdit" name="editLogText"/>
|
<widget class="QLineEdit" name="editLogText"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="0">
|
<item row="5" column="1">
|
||||||
|
<widget class="QLineEdit" name="editName"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLineEdit" name="editLogCondition"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0">
|
||||||
<widget class="QLabel" name="labelLogCondition">
|
<widget class="QLabel" name="labelLogCondition">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Lo&g Condition:</string>
|
<string>Lo&g Condition:</string>
|
||||||
|
@ -81,17 +86,17 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="4" column="1">
|
<item row="5" column="0">
|
||||||
<widget class="QLineEdit" name="editLogCondition"/>
|
<widget class="QLabel" name="labelName">
|
||||||
</item>
|
|
||||||
<item row="5" column="1">
|
|
||||||
<widget class="QCheckBox" name="checkBoxFastResume">
|
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Fast Resume</string>
|
<string>&Name:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>editName</cstring>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="labelCommandText">
|
<widget class="QLabel" name="labelCommandText">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>&Command Text:</string>
|
<string>&Command Text:</string>
|
||||||
|
@ -101,10 +106,30 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="1">
|
<item row="3" column="1">
|
||||||
<widget class="QLineEdit" name="editCommandText"/>
|
<widget class="QLineEdit" name="editCommandText"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="0">
|
<item row="6" column="1">
|
||||||
|
<widget class="QSpinBox" name="spinHitCount">
|
||||||
|
<property name="minimum">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="maximum">
|
||||||
|
<number>2000000000</number>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="6" column="0">
|
||||||
|
<widget class="QLabel" name="labelHitCount">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Hit Count:</string>
|
||||||
|
</property>
|
||||||
|
<property name="buddy">
|
||||||
|
<cstring>spinHitCount</cstring>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="4" column="0">
|
||||||
<widget class="QLabel" name="labelCommandCondition">
|
<widget class="QLabel" name="labelCommandCondition">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>C&ommand Condition:</string>
|
<string>C&ommand Condition:</string>
|
||||||
|
@ -114,33 +139,9 @@
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="4" column="1">
|
||||||
<widget class="QLineEdit" name="editCommandCondition"/>
|
<widget class="QLineEdit" name="editCommandCondition"/>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
|
||||||
<layout class="QHBoxLayout" name="layoutHitCount">
|
|
||||||
<property name="spacing">
|
|
||||||
<number>3</number>
|
|
||||||
</property>
|
|
||||||
<property name="sizeConstraint">
|
|
||||||
<enum>QLayout::SetMinimumSize</enum>
|
|
||||||
</property>
|
|
||||||
<item>
|
|
||||||
<widget class="QLineEdit" name="editHitCount">
|
|
||||||
<property name="readOnly">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QPushButton" name="buttonResetCount">
|
|
||||||
<property name="text">
|
|
||||||
<string>&Reset</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
</layout>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
|
@ -158,6 +159,13 @@
|
||||||
</property>
|
</property>
|
||||||
</spacer>
|
</spacer>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="checkBoxFastResume">
|
||||||
|
<property name="text">
|
||||||
|
<string>&Fast Resume</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QPushButton" name="buttonSave">
|
<widget class="QPushButton" name="buttonSave">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
|
@ -174,33 +182,17 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<spacer name="verticalSpacer">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Vertical</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint" stdset="0">
|
|
||||||
<size>
|
|
||||||
<width>20</width>
|
|
||||||
<height>40</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>editName</tabstop>
|
<tabstop>editName</tabstop>
|
||||||
<tabstop>editBreakCondition</tabstop>
|
<tabstop>spinHitCount</tabstop>
|
||||||
<tabstop>editLogText</tabstop>
|
|
||||||
<tabstop>editLogCondition</tabstop>
|
|
||||||
<tabstop>checkBoxFastResume</tabstop>
|
|
||||||
<tabstop>editCommandText</tabstop>
|
|
||||||
<tabstop>editCommandCondition</tabstop>
|
|
||||||
<tabstop>buttonSave</tabstop>
|
<tabstop>buttonSave</tabstop>
|
||||||
<tabstop>buttonCancel</tabstop>
|
<tabstop>buttonCancel</tabstop>
|
||||||
</tabstops>
|
</tabstops>
|
||||||
<resources/>
|
<resources>
|
||||||
|
<include location="../../resource.qrc"/>
|
||||||
|
</resources>
|
||||||
<connections>
|
<connections>
|
||||||
<connection>
|
<connection>
|
||||||
<sender>buttonCancel</sender>
|
<sender>buttonCancel</sender>
|
||||||
|
|
Loading…
Reference in New Issue