1
0
Fork 0

GUI: changed layout of the AssembleDialog

This commit is contained in:
mrexodia 2015-12-30 04:17:25 +01:00
parent 59e6c43b18
commit a719dfb54c
3 changed files with 146 additions and 97 deletions

View File

@ -19,6 +19,7 @@ AssembleDialog::AssembleDialog(QWidget* parent) :
mSelectedInstrVa = 0; mSelectedInstrVa = 0;
bKeepSizeChecked = false; bKeepSizeChecked = false;
bFillWithNopsChecked = false; bFillWithNopsChecked = false;
this->setKeepSizeLabel("");
mValidateThread = new ValidateExpressionThread(this); mValidateThread = new ValidateExpressionThread(this);
mValidateThread->setOnExpressionChangedCallback(std::bind(&AssembleDialog::validateInstruction, this, std::placeholders::_1)); mValidateThread->setOnExpressionChangedCallback(std::bind(&AssembleDialog::validateInstruction, this, std::placeholders::_1));
@ -55,11 +56,6 @@ void AssembleDialog::setFillWithNopsChecked(bool checked)
bFillWithNopsChecked = checked; bFillWithNopsChecked = checked;
} }
void AssembleDialog::setFillWithNopsLabel(const QString & text)
{
ui->labelFillWithNops->setText(text);
}
void AssembleDialog::setSelectedInstrVa(const duint va) void AssembleDialog::setSelectedInstrVa(const duint va)
{ {
this->mSelectedInstrVa = va; this->mSelectedInstrVa = va;

View File

@ -28,7 +28,6 @@ public:
bool bFillWithNopsChecked; bool bFillWithNopsChecked;
void setFillWithNopsChecked(bool checked); void setFillWithNopsChecked(bool checked);
void setFillWithNopsLabel(const QString & text);
void setSelectedInstrVa(const duint va); void setSelectedInstrVa(const duint va);
void setOkButtonEnabled(bool enabled); void setOkButtonEnabled(bool enabled);

View File

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>433</width> <width>481</width>
<height>114</height> <height>84</height>
</rect> </rect>
</property> </property>
<property name="windowTitle"> <property name="windowTitle">
@ -17,24 +17,58 @@
<iconset resource="../../resource.qrc"> <iconset resource="../../resource.qrc">
<normaloff>:/icons/images/ui-combo-box-edit.png</normaloff>:/icons/images/ui-combo-box-edit.png</iconset> <normaloff>:/icons/images/ui-combo-box-edit.png</normaloff>:/icons/images/ui-combo-box-edit.png</iconset>
</property> </property>
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_3">
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing"> <property name="spacing">
<number>4</number>
</property>
<property name="leftMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>6</number> <number>6</number>
</property> </property>
<item> <item>
<widget class="QLineEdit" name="lineEdit"> <widget class="QLineEdit" name="lineEdit">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
<width>0</width> <width>0</width>
<height>24</height> <height>20</height>
</size> </size>
</property> </property>
</widget> </widget>
</item> </item>
<item> <item>
<layout class="QHBoxLayout" name="horizontalLayout_2"> <layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
<number>3</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>0</number>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="topMargin">
<number>2</number>
</property>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>3</number>
</property>
<item> <item>
<widget class="QCheckBox" name="checkBoxKeepSize"> <widget class="QCheckBox" name="checkBoxKeepSize">
<property name="sizePolicy"> <property name="sizePolicy">
@ -48,32 +82,6 @@
</property> </property>
</widget> </widget>
</item> </item>
<item>
<widget class="QLabel" name="labelKeepSize">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item> <item>
<widget class="QCheckBox" name="checkBoxFillWithNops"> <widget class="QCheckBox" name="checkBoxFillWithNops">
<property name="text"> <property name="text">
@ -81,18 +89,40 @@
</property> </property>
</widget> </widget>
</item> </item>
</layout>
</item>
<item> <item>
<widget class="QLabel" name="labelFillWithNops"> <spacer name="verticalSpacer">
<property name="minimumSize"> <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>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>3</number>
</property>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size> <size>
<width>40</width> <width>40</width>
<height>20</height> <height>20</height>
</size> </size>
</property> </property>
<property name="text"> </spacer>
<string/>
</property>
</widget>
</item> </item>
<item> <item>
<widget class="QPushButton" name="pushButtonOk"> <widget class="QPushButton" name="pushButtonOk">
@ -118,6 +148,30 @@
</item> </item>
</layout> </layout>
</item> </item>
<item>
<widget class="QLabel" name="labelKeepSize">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="text">
<string>&lt;font color='orange'&gt;&lt;b&gt;Instruction decoding error&lt;/b&gt;&lt;/font&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
</layout>
</item>
</layout> </layout>
</widget> </widget>
<resources> <resources>