more fpu stuff
This commit is contained in:
parent
5bf857b6e4
commit
0d65cf39fa
|
@ -59,6 +59,7 @@
|
|||
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
|
||||
<Optimization>MaxSpeed</Optimization>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<TargetMachine>MachineX86</TargetMachine>
|
||||
|
|
|
@ -281,7 +281,7 @@ typedef struct
|
|||
|
||||
#define MXCSR_NAME_FLAG_TABLE_ENTRY(flag_name) { #flag_name, MXCSRFLAG_##flag_name }
|
||||
|
||||
bool valmxcsrflagfromstring(uint mxcsrflags, const char* string)
|
||||
unsigned int getmxcsrflagfromstring(const char* string)
|
||||
{
|
||||
static FLAG_NAME_VALUE_TABLE_t mxcsrnameflagtable[] =
|
||||
{
|
||||
|
@ -305,10 +305,19 @@ bool valmxcsrflagfromstring(uint mxcsrflags, const char* string)
|
|||
for(i = 0; i < (sizeof(mxcsrnameflagtable) / sizeof(*mxcsrnameflagtable)); i++)
|
||||
{
|
||||
if(scmp(string, mxcsrnameflagtable[i].name))
|
||||
return (bool)((int)(mxcsrflags & mxcsrnameflagtable[i].flag) != 0);
|
||||
return mxcsrnameflagtable[i].flag;
|
||||
}
|
||||
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool valmxcsrflagfromstring(uint mxcsrflags, const char* string)
|
||||
{
|
||||
unsigned int flag = getmxcsrflagfromstring(string);
|
||||
if(flag == 0)
|
||||
return false;
|
||||
|
||||
return (bool)((int)(mxcsrflags & flag) != 0);
|
||||
}
|
||||
|
||||
#define x87STATUSWORD_FLAG_I 0x1
|
||||
|
@ -327,7 +336,7 @@ bool valmxcsrflagfromstring(uint mxcsrflags, const char* string)
|
|||
|
||||
#define X87STATUSWORD_NAME_FLAG_TABLE_ENTRY(flag_name) { #flag_name, x87STATUSWORD_FLAG_##flag_name }
|
||||
|
||||
bool valx87statuswordflagfromstring(uint statusword, const char* string)
|
||||
unsigned int getx87statuswordflagfromstring(const char* string)
|
||||
{
|
||||
static FLAG_NAME_VALUE_TABLE_t statuswordflagtable[] =
|
||||
{
|
||||
|
@ -350,10 +359,19 @@ bool valx87statuswordflagfromstring(uint statusword, const char* string)
|
|||
for(i = 0; i < (sizeof(statuswordflagtable) / sizeof(*statuswordflagtable)); i++)
|
||||
{
|
||||
if(scmp(string, statuswordflagtable[i].name))
|
||||
return (bool)((int)(statusword & statuswordflagtable[i].flag) != 0);
|
||||
return statuswordflagtable[i].flag;
|
||||
}
|
||||
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool valx87statuswordflagfromstring(uint statusword, const char* string)
|
||||
{
|
||||
unsigned int flag = getx87statuswordflagfromstring(string);
|
||||
if(flag == 0)
|
||||
return false;
|
||||
|
||||
return (bool)((int)(statusword & flag) != 0);
|
||||
}
|
||||
|
||||
#define x87CONTROLWORD_FLAG_IM 0x1
|
||||
|
@ -367,7 +385,7 @@ bool valx87statuswordflagfromstring(uint statusword, const char* string)
|
|||
|
||||
#define X87CONTROLWORD_NAME_FLAG_TABLE_ENTRY(flag_name) { #flag_name, x87CONTROLWORD_FLAG_##flag_name }
|
||||
|
||||
bool valx87controlwordflagfromstring(uint controlword, const char* string)
|
||||
unsigned int getx87controlwordflagfromstring(const char* string)
|
||||
{
|
||||
static FLAG_NAME_VALUE_TABLE_t controlwordflagtable[] =
|
||||
{
|
||||
|
@ -385,10 +403,20 @@ bool valx87controlwordflagfromstring(uint controlword, const char* string)
|
|||
for(i = 0; i < (sizeof(controlwordflagtable) / sizeof(*controlwordflagtable)); i++)
|
||||
{
|
||||
if(scmp(string, controlwordflagtable[i].name))
|
||||
return (bool)((int)(controlword & controlwordflagtable[i].flag) != 0);
|
||||
return controlwordflagtable[i].flag;
|
||||
}
|
||||
|
||||
return false;
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool valx87controlwordflagfromstring(uint controlword, const char* string)
|
||||
{
|
||||
unsigned int flag = getx87controlwordflagfromstring(string);
|
||||
|
||||
if(flag == 0)
|
||||
return false;
|
||||
|
||||
return (bool)((int)(controlword & flag) != 0);
|
||||
}
|
||||
|
||||
unsigned short valmxcsrfieldfromstring(uint mxcsrflags, const char* string)
|
||||
|
@ -1538,22 +1566,90 @@ bool startsWith(const char* pre, const char* str)
|
|||
return longEnough(str, lenpre) ? StrNCmpI(str, pre, lenpre) == 0 : false;
|
||||
}
|
||||
|
||||
#define MxCsr_PRE_FIELD_STRING "MxCsr_"
|
||||
#define x87SW_PRE_FIELD_STRING "x87SW_"
|
||||
#define x87CW_PRE_FIELD_STRING "x87CW_"
|
||||
#define x87TW_PRE_FIELD_STRING "x87TW_"
|
||||
#define STRLEN_USING_SIZEOF(string) (sizeof(string) - 1)
|
||||
|
||||
|
||||
void fpustuff(const char* string, uint value)
|
||||
{
|
||||
if(startsWith("MxCsr_", string))
|
||||
uint xorval = 0;
|
||||
uint flags = 0;
|
||||
uint flag = 0;
|
||||
bool set = false;
|
||||
|
||||
if(value)
|
||||
set = true;
|
||||
|
||||
if(startsWith(MxCsr_PRE_FIELD_STRING, string))
|
||||
{
|
||||
uint flags = GetContextDataEx(hActiveThread, UE_MXCSR);
|
||||
flag = getmxcsrflagfromstring(string + STRLEN_USING_SIZEOF(MxCsr_PRE_FIELD_STRING));
|
||||
if(flags & flag and !set)
|
||||
xorval = flag;
|
||||
else if(set)
|
||||
xorval = flag;
|
||||
SetContextDataEx(hActiveThread, UE_MXCSR, flags ^ xorval);
|
||||
}
|
||||
else if(startsWith(x87TW_PRE_FIELD_STRING, string))
|
||||
{
|
||||
unsigned int i;
|
||||
|
||||
string += STRLEN_USING_SIZEOF(x87TW_PRE_FIELD_STRING);
|
||||
i = atoi(string);
|
||||
|
||||
if(i > 7)
|
||||
return;
|
||||
|
||||
flags = GetContextDataEx(hActiveThread, UE_X87_TAGWORD);
|
||||
|
||||
flag = 7;
|
||||
flag <<= i * 2;
|
||||
|
||||
flags &= ~flag;
|
||||
|
||||
flag = value;
|
||||
flag <<= i * 2;
|
||||
|
||||
flags |= flag;
|
||||
|
||||
SetContextDataEx(hActiveThread, UE_X87_TAGWORD, (unsigned short) flags);
|
||||
|
||||
}
|
||||
else if(startsWith("x87TW_", string))
|
||||
else if(startsWith(x87SW_PRE_FIELD_STRING, string))
|
||||
{
|
||||
if(StrNCmpI(string + STRLEN_USING_SIZEOF(x87SW_PRE_FIELD_STRING), "TOP", strlen("TOP")) == 0)
|
||||
{
|
||||
uint flags = GetContextDataEx(hActiveThread, UE_X87_STATUSWORD);
|
||||
int i = 7;
|
||||
i <<= 11;
|
||||
flags &= ~i;
|
||||
value <<= 11;
|
||||
flags |= value;
|
||||
SetContextDataEx(hActiveThread, UE_X87_STATUSWORD, flags);
|
||||
}
|
||||
else
|
||||
{
|
||||
uint flags = GetContextDataEx(hActiveThread, UE_X87_STATUSWORD);
|
||||
flag = getx87statuswordflagfromstring(string + STRLEN_USING_SIZEOF(x87SW_PRE_FIELD_STRING));
|
||||
if(flags & flag and !set)
|
||||
xorval = flag;
|
||||
else if(set)
|
||||
xorval = flag;
|
||||
SetContextDataEx(hActiveThread, UE_X87_STATUSWORD, flags ^ xorval);
|
||||
}
|
||||
}
|
||||
else if(startsWith("x87SW_", string))
|
||||
else if(startsWith(x87CW_PRE_FIELD_STRING, string))
|
||||
{
|
||||
|
||||
}
|
||||
else if(startsWith("x87CW_", string))
|
||||
{
|
||||
|
||||
uint flags = GetContextDataEx(hActiveThread, UE_X87_CONTROLWORD);
|
||||
flag = getx87controlwordflagfromstring(string + STRLEN_USING_SIZEOF(x87CW_PRE_FIELD_STRING));
|
||||
if(flags & flag and !set)
|
||||
xorval = flag;
|
||||
else if(set)
|
||||
xorval = flag;
|
||||
SetContextDataEx(hActiveThread, UE_X87_CONTROLWORD, flags ^ xorval);
|
||||
}
|
||||
else if(StrNCmpI(string, "x87TagWord", strlen(string)) == 0)
|
||||
{
|
||||
|
@ -1655,8 +1751,16 @@ bool valtostring(const char* string, uint* value, bool silent)
|
|||
}
|
||||
else if((*string == '_'))
|
||||
{
|
||||
if(!DbgIsDebugging())
|
||||
{
|
||||
if(!silent)
|
||||
dputs("not debugging!");
|
||||
return false;
|
||||
}
|
||||
fpustuff(string + 1, * value);
|
||||
GuiUpdateAllViews(); //repaint gui
|
||||
|
||||
return true;
|
||||
}
|
||||
else if(*string == '!' and isflag(string + 1)) //flag
|
||||
{
|
||||
|
|
|
@ -3,6 +3,7 @@
|
|||
#include "Configuration.h"
|
||||
#include "WordEditDialog.h"
|
||||
#include "LineEditDialog.h"
|
||||
#include "SelectFields.h"
|
||||
#include <QMessageBox>
|
||||
|
||||
|
||||
|
@ -284,6 +285,7 @@ RegistersView::RegistersView(QWidget* parent) : QScrollArea(parent), mVScrollOff
|
|||
mFPUx87.insert(x87SW_TOP);
|
||||
mFIELDVALUE.insert(x87SW_TOP);
|
||||
mFPU.insert(x87SW_TOP);
|
||||
mMODIFYDISPLAY.insert(x87SW_TOP);
|
||||
|
||||
mFPUx87.insert(x87SW_C2);
|
||||
mBOOLDISPLAY.insert(x87SW_C2);
|
||||
|
@ -353,41 +355,49 @@ RegistersView::RegistersView(QWidget* parent) : QScrollArea(parent), mVScrollOff
|
|||
mFIELDVALUE.insert(x87TW_0);
|
||||
mTAGWORD.insert(x87TW_0);
|
||||
mFPU.insert(x87TW_0);
|
||||
mMODIFYDISPLAY.insert(x87TW_0);
|
||||
|
||||
mFPUx87.insert(x87TW_1);
|
||||
mFIELDVALUE.insert(x87TW_1);
|
||||
mTAGWORD.insert(x87TW_1);
|
||||
mFPU.insert(x87TW_1);
|
||||
mMODIFYDISPLAY.insert(x87TW_1);
|
||||
|
||||
mFPUx87.insert(x87TW_2);
|
||||
mFIELDVALUE.insert(x87TW_2);
|
||||
mTAGWORD.insert(x87TW_2);
|
||||
mFPU.insert(x87TW_2);
|
||||
mMODIFYDISPLAY.insert(x87TW_2);
|
||||
|
||||
mFPUx87.insert(x87TW_3);
|
||||
mFIELDVALUE.insert(x87TW_3);
|
||||
mTAGWORD.insert(x87TW_3);
|
||||
mFPU.insert(x87TW_3);
|
||||
mMODIFYDISPLAY.insert(x87TW_3);
|
||||
|
||||
mFPUx87.insert(x87TW_4);
|
||||
mFIELDVALUE.insert(x87TW_4);
|
||||
mTAGWORD.insert(x87TW_4);
|
||||
mFPU.insert(x87TW_4);
|
||||
mMODIFYDISPLAY.insert(x87TW_4);
|
||||
|
||||
mFPUx87.insert(x87TW_5);
|
||||
mFIELDVALUE.insert(x87TW_5);
|
||||
mTAGWORD.insert(x87TW_5);
|
||||
mFPU.insert(x87TW_5);
|
||||
mMODIFYDISPLAY.insert(x87TW_5);
|
||||
|
||||
mFPUx87.insert(x87TW_6);
|
||||
mFIELDVALUE.insert(x87TW_6);
|
||||
mTAGWORD.insert(x87TW_6);
|
||||
mFPU.insert(x87TW_6);
|
||||
mMODIFYDISPLAY.insert(x87TW_6);
|
||||
|
||||
mFPUx87.insert(x87TW_7);
|
||||
mFIELDVALUE.insert(x87TW_7);
|
||||
mTAGWORD.insert(x87TW_7);
|
||||
mFPU.insert(x87TW_7);
|
||||
mMODIFYDISPLAY.insert(x87TW_7);
|
||||
|
||||
mFPUx87.insert(x87CW_PC);
|
||||
mFIELDVALUE.insert(x87CW_PC);
|
||||
|
@ -1374,37 +1384,50 @@ QString RegistersView::GetRegStringValueFromValue(REGISTER_NAME reg, char* value
|
|||
return valueText;
|
||||
}
|
||||
|
||||
QString RegistersView::GetTagWordStateString(unsigned short state)
|
||||
{
|
||||
#define X87FPU_TAGWORD_NONZERO 0
|
||||
#define X87FPU_TAGWORD_ZERO 1
|
||||
#define X87FPU_TAGWORD_SPECIAL 2
|
||||
#define X87FPU_TAGWORD_EMPTY 3
|
||||
QString string_state = "";
|
||||
switch(state)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
QString string;
|
||||
unsigned int value;
|
||||
} STRING_VALUE_TABLE_t;
|
||||
|
||||
STRING_VALUE_TABLE_t TagWordValueStringTable[] =
|
||||
{
|
||||
{"nonzero", X87FPU_TAGWORD_NONZERO},
|
||||
{"zero", X87FPU_TAGWORD_ZERO},
|
||||
{"special", X87FPU_TAGWORD_SPECIAL},
|
||||
{"empty", X87FPU_TAGWORD_EMPTY}
|
||||
};
|
||||
|
||||
unsigned int RegistersView::GetTagWordValueFromString(QString string)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i = 0; i < (sizeof(TagWordValueStringTable) / sizeof(*TagWordValueStringTable)); i++)
|
||||
{
|
||||
case X87FPU_TAGWORD_NONZERO:
|
||||
string_state += QString("nonzero");
|
||||
break;
|
||||
|
||||
case X87FPU_TAGWORD_ZERO:
|
||||
string_state += QString("zero");
|
||||
break;
|
||||
|
||||
case X87FPU_TAGWORD_SPECIAL:
|
||||
string_state += QString("special");
|
||||
break;
|
||||
|
||||
case X87FPU_TAGWORD_EMPTY:
|
||||
string_state += QString("empty");
|
||||
break;
|
||||
|
||||
default:
|
||||
string_state += QString("unkown");
|
||||
break;
|
||||
if(TagWordValueStringTable[i].string == string)
|
||||
return TagWordValueStringTable[i].value;
|
||||
}
|
||||
|
||||
return string_state;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
QString RegistersView::GetTagWordStateString(unsigned short state)
|
||||
{
|
||||
int i;
|
||||
|
||||
for(i = 0; i < (sizeof(TagWordValueStringTable) / sizeof(*TagWordValueStringTable)); i++)
|
||||
{
|
||||
if(TagWordValueStringTable[i].value == state)
|
||||
return TagWordValueStringTable[i].string;
|
||||
}
|
||||
|
||||
return "unknown";
|
||||
}
|
||||
|
||||
void RegistersView::drawRegister(QPainter* p, REGISTER_NAME reg, char* value)
|
||||
|
@ -1503,57 +1526,104 @@ void RegistersView::displayEditDialog()
|
|||
{
|
||||
if(mFPU.contains(mSelected))
|
||||
{
|
||||
bool errorinput = false;
|
||||
LineEditDialog mLineEdit(this);
|
||||
|
||||
mLineEdit.setText(GetRegStringValueFromValue(mSelected, registerValue(&wRegDumpStruct, mSelected)));
|
||||
mLineEdit.setWindowTitle("Edit FPU register");
|
||||
mLineEdit.setWindowIcon(QIcon(":/icons/images/log.png"));
|
||||
mLineEdit.setCursorPosition(0);
|
||||
|
||||
do
|
||||
if(mTAGWORD.contains(mSelected))
|
||||
{
|
||||
errorinput = false;
|
||||
if(mLineEdit.exec() != QDialog::Accepted)
|
||||
return; //pressed cancel
|
||||
SelectFields mSelectFields(this);
|
||||
QListWidget* mQListWidget = mSelectFields.GetList();
|
||||
|
||||
if(mLineEdit.editText.size() != GetSizeRegister(mSelected) * 2)
|
||||
QStringList items;
|
||||
items << GetTagWordStateString(X87FPU_TAGWORD_EMPTY) << GetTagWordStateString(X87FPU_TAGWORD_NONZERO)
|
||||
<< GetTagWordStateString(X87FPU_TAGWORD_SPECIAL) << GetTagWordStateString(X87FPU_TAGWORD_ZERO);
|
||||
|
||||
mQListWidget->addItems(items);
|
||||
|
||||
mSelectFields.setWindowTitle("Edit TAG");
|
||||
if(mSelectFields.exec() != QDialog::Accepted)
|
||||
return;
|
||||
|
||||
if(mQListWidget->selectedItems().count() != 1)
|
||||
return;
|
||||
|
||||
QListWidgetItem* item = mQListWidget->takeItem(mQListWidget->currentRow());
|
||||
|
||||
uint_t value = GetTagWordValueFromString(item->text());
|
||||
setRegister(mSelected, (uint_t)value);
|
||||
}
|
||||
else if(mSelected == x87SW_TOP)
|
||||
{
|
||||
SelectFields mSelectFields(this);
|
||||
QListWidget* mQListWidget = mSelectFields.GetList();
|
||||
|
||||
QStringList items;
|
||||
items << "ST0" << "ST1" << "ST2" << "ST3" << "ST4"
|
||||
<< "ST5" << "ST6" << "ST7";
|
||||
|
||||
mQListWidget->addItems(items);
|
||||
|
||||
mSelectFields.setWindowTitle("Edit x87SW_TOP");
|
||||
if(mSelectFields.exec() != QDialog::Accepted)
|
||||
return;
|
||||
|
||||
if(mQListWidget->selectedItems().count() != 1)
|
||||
return;
|
||||
|
||||
uint_t value = mQListWidget->currentRow();
|
||||
setRegister(mSelected, (uint_t)value);
|
||||
}
|
||||
else
|
||||
{
|
||||
bool errorinput = false;
|
||||
LineEditDialog mLineEdit(this);
|
||||
|
||||
mLineEdit.setText(GetRegStringValueFromValue(mSelected, registerValue(&wRegDumpStruct, mSelected)));
|
||||
mLineEdit.setWindowTitle("Edit FPU register");
|
||||
mLineEdit.setWindowIcon(QIcon(":/icons/images/log.png"));
|
||||
mLineEdit.setCursorPosition(0);
|
||||
|
||||
do
|
||||
{
|
||||
mLineEdit.setCursorPosition(GetSizeRegister(mSelected) * 2);
|
||||
errorinput = true;
|
||||
errorinput = false;
|
||||
if(mLineEdit.exec() != QDialog::Accepted)
|
||||
return; //pressed cancel
|
||||
|
||||
QMessageBox msg(QMessageBox::Warning, "ERROR SIZE INPUT", "ERROR SIZE INPUT MUST BE: " + QString::number(GetSizeRegister(mSelected) * 2));
|
||||
msg.setWindowIcon(QIcon(":/icons/images/compile-warning.png"));
|
||||
msg.setParent(this, Qt::Dialog);
|
||||
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
msg.exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
bool ok = false;
|
||||
uint_t fpuvalue;
|
||||
|
||||
if(mUSHORTDISPLAY.contains(mSelected))
|
||||
fpuvalue = (uint_t) mLineEdit.editText.toUShort(&ok, 16);
|
||||
else if(mDWORDDISPLAY.contains(mSelected))
|
||||
fpuvalue = mLineEdit.editText.toUInt(&ok, 16);
|
||||
|
||||
if(!ok)
|
||||
if(mLineEdit.editText.size() != GetSizeRegister(mSelected) * 2)
|
||||
{
|
||||
mLineEdit.setCursorPosition(GetSizeRegister(mSelected) * 2);
|
||||
errorinput = true;
|
||||
|
||||
QMessageBox msg(QMessageBox::Warning, "ERROR CONVERTING TO HEX", "ERROR CONVERTING TO HEXADECIMAL");
|
||||
QMessageBox msg(QMessageBox::Warning, "ERROR SIZE INPUT", "ERROR SIZE INPUT MUST BE: " + QString::number(GetSizeRegister(mSelected) * 2));
|
||||
msg.setWindowIcon(QIcon(":/icons/images/compile-warning.png"));
|
||||
msg.setParent(this, Qt::Dialog);
|
||||
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
msg.exec();
|
||||
}
|
||||
else
|
||||
setRegister(mSelected, fpuvalue);
|
||||
}
|
||||
{
|
||||
bool ok = false;
|
||||
uint_t fpuvalue;
|
||||
|
||||
if(mUSHORTDISPLAY.contains(mSelected))
|
||||
fpuvalue = (uint_t) mLineEdit.editText.toUShort(&ok, 16);
|
||||
else if(mDWORDDISPLAY.contains(mSelected))
|
||||
fpuvalue = mLineEdit.editText.toUInt(&ok, 16);
|
||||
|
||||
if(!ok)
|
||||
{
|
||||
errorinput = true;
|
||||
|
||||
QMessageBox msg(QMessageBox::Warning, "ERROR CONVERTING TO HEX", "ERROR CONVERTING TO HEXADECIMAL");
|
||||
msg.setWindowIcon(QIcon(":/icons/images/compile-warning.png"));
|
||||
msg.setParent(this, Qt::Dialog);
|
||||
msg.setWindowFlags(msg.windowFlags() & (~Qt::WindowContextHelpButtonHint));
|
||||
msg.exec();
|
||||
}
|
||||
else
|
||||
setRegister(mSelected, fpuvalue);
|
||||
}
|
||||
|
||||
}
|
||||
while(errorinput);
|
||||
}
|
||||
while(errorinput);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -124,6 +124,7 @@ protected slots:
|
|||
SIZE_T GetSizeRegister(const REGISTER_NAME reg_name);
|
||||
QString GetRegStringValueFromValue(REGISTER_NAME reg , char* value);
|
||||
QString GetTagWordStateString(unsigned short);
|
||||
unsigned int GetTagWordValueFromString(QString string);
|
||||
|
||||
private:
|
||||
int mVScrollOffset;
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
#include "selectfields.h"
|
||||
#include "ui_selectfields.h"
|
||||
|
||||
SelectFields::SelectFields(QWidget* parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::SelectFields)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
#if QT_VERSION < QT_VERSION_CHECK(5,0,0)
|
||||
setWindowFlags(Qt::Dialog | Qt::WindowSystemMenuHint | Qt::WindowTitleHint | Qt::MSWindowsFixedSizeDialogHint);
|
||||
#endif
|
||||
setModal(true);
|
||||
}
|
||||
|
||||
QListWidget* SelectFields::GetList(void)
|
||||
{
|
||||
return ui->listWidget;
|
||||
}
|
||||
|
||||
SelectFields::~SelectFields()
|
||||
{
|
||||
delete ui;
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
#ifndef SELECTFIELDS_H
|
||||
#define SELECTFIELDS_H
|
||||
|
||||
#include <QDialog>
|
||||
#include <QListWidget>
|
||||
|
||||
namespace Ui
|
||||
{
|
||||
class SelectFields;
|
||||
}
|
||||
|
||||
class SelectFields : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SelectFields(QWidget* parent = 0);
|
||||
QListWidget* GetList(void);
|
||||
~SelectFields();
|
||||
|
||||
private:
|
||||
Ui::SelectFields* ui;
|
||||
};
|
||||
|
||||
#endif // SELECTFIELDS_H
|
|
@ -0,0 +1,79 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SelectFields</class>
|
||||
<widget class="QDialog" name="SelectFields">
|
||||
<property name="windowModality">
|
||||
<enum>Qt::NonModal</enum>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>213</width>
|
||||
<height>181</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="../../resource.qrc">
|
||||
<normaloff>:/icons/images/log.png</normaloff>:/icons/images/log.png</iconset>
|
||||
</property>
|
||||
<property name="modal">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QListWidget" name="listWidget"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="../../resource.qrc"/>
|
||||
</resources>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>SelectFields</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>248</x>
|
||||
<y>254</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>SelectFields</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>316</x>
|
||||
<y>260</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>274</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
|
@ -83,7 +83,8 @@ SOURCES += \
|
|||
Src/BasicView/ShortcutEdit.cpp \
|
||||
Src/Gui/CalculatorDialog.cpp \
|
||||
Src/Gui/AttachDialog.cpp \
|
||||
Src/Gui/PageMemoryRights.cpp
|
||||
Src/Gui/PageMemoryRights.cpp \
|
||||
Src/Gui/SelectFields.cpp
|
||||
|
||||
|
||||
HEADERS += \
|
||||
|
@ -145,7 +146,8 @@ HEADERS += \
|
|||
Src/BasicView/ShortcutEdit.h \
|
||||
Src/Gui/CalculatorDialog.h \
|
||||
Src/Gui/AttachDialog.h \
|
||||
Src/Gui/PageMemoryRights.h
|
||||
Src/Gui/PageMemoryRights.h \
|
||||
Src/Gui/SelectFields.h
|
||||
|
||||
|
||||
INCLUDEPATH += \
|
||||
|
@ -179,7 +181,8 @@ FORMS += \
|
|||
Src/Gui/ShortcutsDialog.ui \
|
||||
Src/Gui/CalculatorDialog.ui \
|
||||
Src/Gui/AttachDialog.ui \
|
||||
Src/Gui/PageMemoryRights.ui
|
||||
Src/Gui/PageMemoryRights.ui \
|
||||
Src/Gui/SelectFields.ui
|
||||
|
||||
INCLUDEPATH += $$PWD/Src/Bridge
|
||||
|
||||
|
|
Loading…
Reference in New Issue