From 890f007bc57df2d29b0f9286e6d93d0b1e0b2acb Mon Sep 17 00:00:00 2001 From: Martin Schreiber Date: Thu, 21 Nov 2019 10:15:15 +0100 Subject: [PATCH 01/86] utilize user-specific temp directories --- common.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/common.cpp b/common.cpp index 8e4f6485..7df9260c 100644 --- a/common.cpp +++ b/common.cpp @@ -86,10 +86,18 @@ QString Common::pathInTemp(QString path) if (lastSymbol == QChar('/') || lastSymbol == QChar('\\')) { temp.chop(1); } - if (! QFile::exists(temp + "/SASM")) { - QDir().mkpath(temp + "/SASM"); + + // Generate temporary directory including username + QString name = qgetenv("USER"); + if (name.isEmpty()) + name = qgetenv("USERNAME"); + + QString tempPath = temp+"/SASM"+name; + + if (! QFile::exists(tempPath)) { + QDir().mkpath(tempPath); } - QString tempPath = temp + "/SASM"; + if (!path.isEmpty()) { tempPath += "/" + path; } From b47d9aae81451362f183026d235d686e2371cf20 Mon Sep 17 00:00:00 2001 From: Martin Schreiber Date: Tue, 26 Nov 2019 13:07:16 +0100 Subject: [PATCH 02/86] Added GDB Debugging features --- .gitignore | 4 + debugger.cpp | 96 +++- debugger.h | 24 +- mainwindow.cpp | 42 +- mainwindow.h | 2 + moc_predefs.h | 390 ++++++++++++++ settings.ui | 63 ++- ui_settings.h | 1378 ++++++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 1953 insertions(+), 46 deletions(-) create mode 100644 moc_predefs.h create mode 100644 ui_settings.h diff --git a/.gitignore b/.gitignore index bcf4163d..157e7e91 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,7 @@ Thumbs.db doc/* .qmake.stash sasm.app + +*.swp +*.o +sasm diff --git a/debugger.cpp b/debugger.cpp index f9f6c259..5824fa8e 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -53,7 +53,7 @@ namespace { } -Debugger::Debugger(QTextEdit *tEdit, const QString &path, QString tmp, Assembler *assembler, QWidget *parent) +Debugger::Debugger(QTextEdit *tEdit, const QString &i_path, const QString &tmp, Assembler *i_assembler, const QString &i_gdbpath, QWidget *parent, bool i_verbose) : QObject(parent) { QSettings settings("SASM Project", "SASM"); @@ -61,9 +61,16 @@ Debugger::Debugger(QTextEdit *tEdit, const QString &path, QString tmp, Assembler pid = 0; firstAction = true; textEdit = tEdit; + path = i_path; tmpPath = tmp; registersOk = true; - this->assembler = assembler; + gdbPath = i_gdbpath; + assembler = i_assembler; + verbose = i_verbose; +} + +bool Debugger::run() +{ #ifdef Q_OS_WIN32 QString gdb; QString objdump; @@ -85,7 +92,7 @@ Debugger::Debugger(QTextEdit *tEdit, const QString &path, QString tmp, Assembler exitMessage = "__fu0__set_invalid_parameter_handler"; } #else - QString gdb = "gdb"; + QString gdb = gdbPath; QString objdump = "objdump"; exitMessage = "libc_start_main"; #endif @@ -108,10 +115,11 @@ Debugger::Debugger(QTextEdit *tEdit, const QString &path, QString tmp, Assembler objdumpResult = objdumpResult.mid(index + startAddress.length()); entryPoint = objdumpResult.toLongLong(0, 16); - QStringList arguments; arguments << path; + printLog(tr("Starting Debugger: ")+gdb+" "+arguments.join(" ")+"\n", Qt::darkGreen); + process = new QProcess; process->start(gdb, arguments); @@ -121,6 +129,27 @@ Debugger::Debugger(QTextEdit *tEdit, const QString &path, QString tmp, Assembler bufferTimer = new QTimer; QObject::connect(bufferTimer, SIGNAL(timeout()), this, SLOT(processOutput()), Qt::QueuedConnection); bufferTimer->start(10); + + process->waitForStarted(); + if (process->state() == QProcess::NotRunning) + { + // read output for debug information + readOutputToBuffer(); + + printLog(tr("Failed to start debugger!"), Qt::red); + if (buffer != "") + printLog(buffer, Qt::red); + + if (errorBuffer != "") + printLog(errorBuffer, Qt::red); + + delete process; + process = 0; + + return false; + } + + return true; } void Debugger::emitStarted() @@ -133,6 +162,7 @@ void Debugger::readOutputToBuffer() { if (!process) return; + QByteArray error = process->readAllStandardError(); errorBuffer += QString::fromLocal8Bit(error.constData(), error.size()); QByteArray output = process->readAllStandardOutput(); @@ -142,9 +172,16 @@ void Debugger::readOutputToBuffer() void Debugger::processOutput() { bufferTimer->stop(); + int index = buffer.indexOf(QString("(gdb)")); int linefeedIndex = errorBuffer.indexOf("\n"); if (index != -1) { //if whole message ready to processing (end of whole message is "(gdb)") + if (verbose) + { + printLog(buffer+"\n", Qt::red); + printLog(errorBuffer+"\n", Qt::red); + } + QString output = buffer.left(index); QString error = errorBuffer.left(linefeedIndex); buffer.remove(0, index + 5); //remove processed message @@ -174,13 +211,22 @@ void Debugger::processMessage(QString output, QString error) Reading symbols from C:\Users\Dmitri\Dropbox\Projects\SASMstatic\release\Program\SASMprog.exe... done. (gdb)*/ + + if (output.indexOf(QString(") 8.1.")) != -1) { + actionTypeQueue.enqueue(anyAction); + processAction(tr("GDB 8.1 not supported due to buggy implementation (b main [newline] run not producing a break). Please use a different version.")); + QObject::disconnect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutputToBuffer())); + emit finished(); + return; + } + c++; doInput(QString("disas main\n"), none); return; } if (c == 1) { - if (error.indexOf("No symbol",0,Qt::CaseInsensitive)!=-1) { + if (error.indexOf("No symbol", 0, Qt::CaseInsensitive)!=-1) { dbgSymbols = false; } else { dbgSymbols = true; @@ -204,7 +250,7 @@ void Debugger::processMessage(QString output, QString error) //take offset in hexadecimal representation (10 symbols) from string and convert it to int c++; processLst(); //count accordance - run(); //perform Debugger::run(), that run program and open I/O files + gdb_cmd_run(); //perform Debugger::run(), that run program and open I/O files return; } @@ -229,7 +275,7 @@ void Debugger::processMessage(QString output, QString error) offset = entryPoint; //changes in processLst() c++; processLst(); //count accordance - run(); //perform Debugger::run(), that run program and open I/O files + gdb_cmd_run(); //perform Debugger::run(), that run program and open I/O files return; } @@ -277,6 +323,7 @@ void Debugger::processMessage(QString output, QString error) void Debugger::processAction(QString output, QString error) { bool backtrace = (output.indexOf(QRegExp("#\\d+ 0x[0-9a-fA-F]{8,16} in .* ()")) != -1); + if (output.indexOf(exitMessage) != -1 && !backtrace) { doInput("c\n", none); return; @@ -520,15 +567,15 @@ bool Debugger::isStopped() void Debugger::pause() { - if (pid == 0) - return; + if (pid == 0) + return; actionTypeQueue.clear(); #ifdef Q_OS_WIN32 HANDLE proc = OpenProcess(PROCESS_ALL_ACCESS, FALSE, (DWORD)pid); - if (proc != NULL) { + if (proc != NULL) { DebugBreakProcess(proc); CloseHandle(proc); - } + } #else kill(pid, SIGINT); #endif @@ -536,6 +583,9 @@ void Debugger::pause() void Debugger::doInput(QString command, DebugActionType actionType) { + if (verbose) + printLog("CMD: "+command+"\n", Qt::darkYellow); + if (actionType != none) actionTypeQueue.enqueue(actionType); //put \n after commands! @@ -591,7 +641,7 @@ void Debugger::processLst() } } -void Debugger::run() +void Debugger::gdb_cmd_run() { //set breakpoint on main, run program amd open output and input files //put \n after commands! @@ -647,16 +697,24 @@ void Debugger::changeBreakpoint(quint64 lineNumber, bool isAdded) Debugger::~Debugger() { emit highlightLine(-1); - if (process->state() == QProcess::Running) { - doInput("quit\n", none); - process->waitForFinished(1000); - if (process->state() == QProcess::Running) { //if still running + if (process) + { + if (process->state() == QProcess::Running) { doInput("quit\n", none); - process->terminate(); + process->waitForFinished(1000); + if (process->state() == QProcess::Running) { //if still running + doInput("quit\n", none); + process->terminate(); + } } } - delete process; - process = 0; + + if (process != 0) + { + delete process; + process = 0; + } + lines.clear(); delete bufferTimer; } diff --git a/debugger.h b/debugger.h index 05ef1bda..f53b6912 100644 --- a/debugger.h +++ b/debugger.h @@ -81,7 +81,7 @@ class Debugger : public QObject Q_OBJECT public: - Debugger(QTextEdit *tEdit, const QString &path, QString tmp, Assembler *assembler, QWidget *parent = 0); + Debugger(QTextEdit *tEdit, const QString &path, const QString &tmp, Assembler *assembler, const QString &gdbpath, QWidget *parent = 0, bool verbose = true); ~Debugger(); void setWatchesCount(int count); @@ -101,9 +101,20 @@ class Debugger : public QObject bool isStopped(); void pause(); + //! Global gdb output buffer + QString buffer; + + //! Global gdb error buffer + QString errorBuffer; + + // start debugger + bool run(); + private: void processLst(); - void run(); + void gdb_cmd_run(); + + bool verbose; QProcess *process; QTextEdit *textEdit; @@ -111,6 +122,7 @@ class Debugger : public QObject //! Offset between program code in memory and in file quint64 offset; + //! Accordance between program lines in memory and in file QVector lines; //! Counter for sequential performing of actions @@ -125,13 +137,11 @@ class Debugger : public QObject //! Message on exit which shows when "continue" command used QRegExp cExitMessage; - QString tmpPath; - //! Global gdb output buffer - QString buffer; + QString path; + QString tmpPath; + QString gdbPath; - //! Global gdb error buffer - QString errorBuffer; //! Timer for checking output and sending ready output to processing with Debugger::processOutput() function QTimer *bufferTimer; diff --git a/mainwindow.cpp b/mainwindow.cpp index 010733f0..948c839a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -39,6 +39,7 @@ ****************************************************************************/ #include "mainwindow.h" +#include /** * @file mainwindow.cpp @@ -850,8 +851,7 @@ void MainWindow::buildProgram(bool debugMode) QStringList assemblerArguments = assemblerOptions.split(QChar(' ')); assemblerArguments.replaceInStrings("$SOURCE$", Common::pathInTemp("program.asm")); assemblerArguments.replaceInStrings("$LSTOUTPUT$", Common::pathInTemp("program.lst")); - assemblerArguments.replaceInStrings("$PROGRAM.OBJ$", - Common::pathInTemp(settings.value("objectfilename", "program.o").toString())); + assemblerArguments.replaceInStrings("$PROGRAM.OBJ$", Common::pathInTemp(settings.value("objectfilename", "program.o").toString())); assemblerArguments.replaceInStrings("$PROGRAM$", Common::pathInTemp("SASMprog.exe")); assemblerArguments.replaceInStrings("$MACRO.OBJ$", stdioMacros); QProcess assemblerProcess; @@ -1135,7 +1135,24 @@ void MainWindow::debug() printLogWithTime(tr("Debugging started...") + '\n', Qt::darkGreen); QString path = Common::pathInTemp("SASMprog.exe"); CodeEditor *code = ((Tab *) tabs->currentWidget())->code; - debugger = new Debugger(compilerOut, path, Common::pathInTemp(QString()), assembler); + + QString gdbpath = settings.value("gdbpath", "gdb").toString(); + + debugger = new Debugger(compilerOut, path, Common::pathInTemp(QString()), assembler, gdbpath, 0, settings.value("gdbverbose", false).toBool()); + + // connect print signals for output in Debugger + connect(debugger, SIGNAL(printLog(QString,QColor)), this, SLOT(printLog(QString,QColor))); + connect(debugger, SIGNAL(printOutput(QString)), this, SLOT(printOutput(QString))); + + bool retval = debugger->run(); + + if (!retval) + { + delete debugger; + debugger = 0; + return; + } + connect(debugger, SIGNAL(highlightLine(int)), code, SLOT(updateDebugLine(int))); connect(debugger, SIGNAL(finished()), this, SLOT(debugExit()), Qt::QueuedConnection); connect(debugger, SIGNAL(started()), this, SLOT(enableDebugActions())); @@ -1143,11 +1160,10 @@ void MainWindow::debug() connect(code, SIGNAL(breakpointsChanged(quint64,bool)), debugger, SLOT(changeBreakpoint(quint64,bool))); connect(code, SIGNAL(addWatchSignal(const RuQPlainTextEdit::Watch &)), this, SLOT(setShowMemoryToChecked(RuQPlainTextEdit::Watch))); - connect(debugger, SIGNAL(printLog(QString,QColor)), this, SLOT(printLog(QString,QColor))); - connect(debugger, SIGNAL(printOutput(QString)), this, SLOT(printOutput(QString))); connect(debugger, SIGNAL(inMacro()), this, SLOT(debugNextNi()), Qt::QueuedConnection); connect(debugger, SIGNAL(wasStopped()), this, SLOT(changeDebugActionToStart())); connect(debugger, SIGNAL(needToContinue()), this, SLOT(debug())); + code->setDebugEnabled(); } //Pause or continue debugger @@ -1813,8 +1829,12 @@ void MainWindow::initAssemblerSettings(bool firstOpening) settingsUi.objectFileNameEdit->setText(settings.value("objectfilename", "program.o").toString()); + settingsUi.gdbPathEdit->setText(settings.value("gdbpath", "gdb").toString()); + settingsUi.disableLinkingCheckbox->setChecked(settings.value("disablelinking", false).toBool()); + settingsUi.gdbVerboseCheckBox->setChecked(settings.value("gdbverbose", false).toBool()); + settingsUi.runInCurrentDirectoryCheckbox->setChecked(settings.value("currentdir", false).toBool()); QString assemblerPath = assembler->getAssemblerPath(); @@ -1898,6 +1918,7 @@ void MainWindow::changeMode(bool x86) settings.setValue("mode", QString("x86")); else settings.setValue("mode", QString("x64")); + recreateAssembler(); } @@ -1907,6 +1928,7 @@ void MainWindow::recreateAssembler(bool start) delete assembler; assembler = 0; } + bool x86 = true; if (settings.value("mode", QString("x86")).toString() != "x86") x86 = false; @@ -1951,14 +1973,18 @@ void MainWindow::recreateAssembler(bool start) settingsUi.linkingOptionsEdit->setText(assembler->getLinkerOptions()); settingsUi.objectFileNameEdit->setText("program.o"); settingsUi.disableLinkingCheckbox->setChecked(false); + settingsUi.gdbVerboseCheckBox->setChecked(false); settingsUi.runInCurrentDirectoryCheckbox->setChecked(false); settingsUi.assemblerPathEdit->setText(assembler->getAssemblerPath()); + settingsUi.gdbPathEdit->setText("gdb"); settingsUi.linkerPathEdit->setText(assembler->getLinkerPath()); settings.setValue("assemblyoptions", assembler->getAssemblerOptions()); settings.setValue("linkingoptions", assembler->getLinkerOptions()); settings.setValue("objectfilename", "program.o"); settings.setValue("disablelinking", false); settings.setValue("currentdir", false); + settings.setValue("gdbverbose", false); + settings.setValue("gdbpath", "gdb"); settings.setValue("assemblerpath", assembler->getAssemblerPath()); settings.setValue("linkerpath", assembler->getLinkerPath()); changeStartText(); @@ -1980,6 +2006,8 @@ void MainWindow::backupSettings() backupAssemblerPath = settings.value("assemblerpath", assembler->getAssemblerPath()).toString(); backupLinkerOptions = settings.value("linkingoptions", assembler->getLinkerOptions()).toString(); backupObjectFileName = settings.value("objectfilename", "program.o").toString(); + backupGDBPath = settings.value("gdbpath", "gdb").toString(); + backupGDBVerbose = settings.value("gdbverbose", false).toBool(); backupDisableLinking = settings.value("disablelinking", false).toBool(); backupCurrentDir = settings.value("currentdir", false).toBool(); backupStartText = settings.value("starttext", assembler->getStartText()).toString(); @@ -1996,6 +2024,8 @@ void MainWindow::restoreSettingsAndExit() settings.setValue("linkingoptions", backupLinkerOptions); settings.setValue("objectfilename", backupObjectFileName); settings.setValue("disablelinking", backupDisableLinking); + settings.setValue("gdbpath", backupGDBPath); + settings.setValue("gdbverbose", backupGDBVerbose); settings.setValue("currentdir", backupCurrentDir); settings.setValue("starttext", backupStartText); settings.setValue("linkerpath", backupLinkerPath); @@ -2040,8 +2070,10 @@ void MainWindow::saveSettings() settings.setValue("linkingoptions", settingsUi.linkingOptionsEdit->text()); settings.setValue("objectfilename", settingsUi.objectFileNameEdit->text()); settings.setValue("disablelinking", settingsUi.disableLinkingCheckbox->isChecked()); + settings.setValue("gdbverbose", settingsUi.gdbVerboseCheckBox->isChecked()); settings.setValue("currentdir", settingsUi.runInCurrentDirectoryCheckbox->isChecked()); settings.setValue("assemblerpath", settingsUi.assemblerPathEdit->text()); + settings.setValue("gdbpath", settingsUi.gdbPathEdit->text()); settings.setValue("linkerpath", settingsUi.linkerPathEdit->text()); settings.setValue("starttext", settingsStartTextEditor->document()->toPlainText()); diff --git a/mainwindow.h b/mainwindow.h index 316b699c..aab9a582 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -209,6 +209,8 @@ class MainWindow : public QMainWindow QString backupAssemblerOptions; QString backupLinkerOptions; QString backupObjectFileName; + QString backupGDBPath; + QString backupGDBVerbose; bool backupDisableLinking; bool backupCurrentDir; QString backupAssemblerPath; diff --git a/moc_predefs.h b/moc_predefs.h new file mode 100644 index 00000000..b5acf688 --- /dev/null +++ b/moc_predefs.h @@ -0,0 +1,390 @@ +#define __SSP_STRONG__ 3 +#define __DBL_MIN_EXP__ (-1021) +#define __FLT32X_MAX_EXP__ 1024 +#define __cpp_attributes 200809 +#define __UINT_LEAST16_MAX__ 0xffff +#define __ATOMIC_ACQUIRE 2 +#define __FLT128_MAX_10_EXP__ 4932 +#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F +#define __GCC_IEC_559_COMPLEX 2 +#define __cpp_aggregate_nsdmi 201304 +#define __UINT_LEAST8_TYPE__ unsigned char +#define __SIZEOF_FLOAT80__ 16 +#define __INTMAX_C(c) c ## L +#define __CHAR_BIT__ 8 +#define __UINT8_MAX__ 0xff +#define __WINT_MAX__ 0xffffffffU +#define __FLT32_MIN_EXP__ (-125) +#define __cpp_static_assert 200410 +#define __ORDER_LITTLE_ENDIAN__ 1234 +#define __SIZE_MAX__ 0xffffffffffffffffUL +#define __WCHAR_MAX__ 0x7fffffff +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 +#define __GCC_IEC_559 2 +#define __FLT32X_DECIMAL_DIG__ 17 +#define __FLT_EVAL_METHOD__ 0 +#define __unix__ 1 +#define __cpp_binary_literals 201304 +#define __FLT64_DECIMAL_DIG__ 17 +#define __CET__ 3 +#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +#define __x86_64 1 +#define __cpp_variadic_templates 200704 +#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL +#define __SIG_ATOMIC_TYPE__ int +#define __DBL_MIN_10_EXP__ (-307) +#define __FINITE_MATH_ONLY__ 0 +#define __cpp_variable_templates 201304 +#define __GNUC_PATCHLEVEL__ 1 +#define __FLT32_HAS_DENORM__ 1 +#define __UINT_FAST8_MAX__ 0xff +#define __cpp_rvalue_reference 200610 +#define __has_include(STR) __has_include__(STR) +#define __DEC64_MAX_EXP__ 385 +#define __INT8_C(c) c +#define __INT_LEAST8_WIDTH__ 8 +#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL +#define __SHRT_MAX__ 0x7fff +#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L +#define __FLT64X_MAX_10_EXP__ 4932 +#define __UINT_LEAST8_MAX__ 0xff +#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 +#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 +#define __UINTMAX_TYPE__ long unsigned int +#define __linux 1 +#define __DEC32_EPSILON__ 1E-6DF +#define __FLT_EVAL_METHOD_TS_18661_3__ 0 +#define __unix 1 +#define __UINT32_MAX__ 0xffffffffU +#define __GXX_EXPERIMENTAL_CXX0X__ 1 +#define __LDBL_MAX_EXP__ 16384 +#define __FLT128_MIN_EXP__ (-16381) +#define __WINT_MIN__ 0U +#define __linux__ 1 +#define __FLT128_MIN_10_EXP__ (-4931) +#define __INT_LEAST16_WIDTH__ 16 +#define __SCHAR_MAX__ 0x7f +#define __FLT128_MANT_DIG__ 113 +#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) +#define __INT64_C(c) c ## L +#define __DBL_DIG__ 15 +#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 +#define __FLT64X_MANT_DIG__ 64 +#define __SIZEOF_INT__ 4 +#define __SIZEOF_POINTER__ 8 +#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +#define __USER_LABEL_PREFIX__ +#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x +#define __STDC_HOSTED__ 1 +#define __LDBL_HAS_INFINITY__ 1 +#define __FLT32_DIG__ 6 +#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F +#define __GXX_WEAK__ 1 +#define __SHRT_WIDTH__ 16 +#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L +#define __DEC32_MAX__ 9.999999E96DF +#define __cpp_threadsafe_static_init 200806 +#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x +#define __FLT32X_HAS_INFINITY__ 1 +#define __INT32_MAX__ 0x7fffffff +#define __INT_WIDTH__ 32 +#define __SIZEOF_LONG__ 8 +#define __STDC_IEC_559__ 1 +#define __STDC_ISO_10646__ 201706L +#define __UINT16_C(c) c +#define __PTRDIFF_WIDTH__ 64 +#define __DECIMAL_DIG__ 21 +#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 +#define __gnu_linux__ 1 +#define __INTMAX_WIDTH__ 64 +#define __FLT64_MIN_EXP__ (-1021) +#define __has_include_next(STR) __has_include_next__(STR) +#define __FLT64X_MIN_10_EXP__ (-4931) +#define __LDBL_HAS_QUIET_NAN__ 1 +#define __FLT64_MANT_DIG__ 53 +#define __GNUC__ 9 +#define __GXX_RTTI 1 +#define __pie__ 2 +#define __MMX__ 1 +#define __cpp_delegating_constructors 200604 +#define __FLT_HAS_DENORM__ 1 +#define __SIZEOF_LONG_DOUBLE__ 16 +#define __BIGGEST_ALIGNMENT__ 16 +#define __STDC_UTF_16__ 1 +#define __FLT64_MAX_10_EXP__ 308 +#define __FLT32_HAS_INFINITY__ 1 +#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) +#define __cpp_raw_strings 200710 +#define __INT_FAST32_MAX__ 0x7fffffffffffffffL +#define __DBL_HAS_INFINITY__ 1 +#define __HAVE_SPECULATION_SAFE_VALUE 1 +#define __DEC32_MIN_EXP__ (-94) +#define __INTPTR_WIDTH__ 64 +#define __FLT32X_HAS_DENORM__ 1 +#define __INT_FAST16_TYPE__ long int +#define __LDBL_HAS_DENORM__ 1 +#define __cplusplus 201402L +#define __cpp_ref_qualifiers 200710 +#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +#define __INT_LEAST32_MAX__ 0x7fffffff +#define __DEC32_MIN__ 1E-95DF +#define __DEPRECATED 1 +#define __cpp_rvalue_references 200610 +#define __DBL_MAX_EXP__ 1024 +#define __WCHAR_WIDTH__ 32 +#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 +#define __DEC128_EPSILON__ 1E-33DL +#define __SSE2_MATH__ 1 +#define __ATOMIC_HLE_RELEASE 131072 +#define __PTRDIFF_MAX__ 0x7fffffffffffffffL +#define __amd64 1 +#define __ATOMIC_HLE_ACQUIRE 65536 +#define __FLT32_HAS_QUIET_NAN__ 1 +#define __GNUG__ 9 +#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL +#define __SIZEOF_SIZE_T__ 8 +#define __cpp_nsdmi 200809 +#define __FLT64X_MIN_EXP__ (-16381) +#define __SIZEOF_WINT_T__ 4 +#define __LONG_LONG_WIDTH__ 64 +#define __cpp_initializer_lists 200806 +#define __FLT32_MAX_EXP__ 128 +#define __cpp_hex_float 201603 +#define __GCC_HAVE_DWARF2_CFI_ASM 1 +#define __GXX_ABI_VERSION 1013 +#define __FLT128_HAS_INFINITY__ 1 +#define __FLT_MIN_EXP__ (-125) +#define __cpp_lambdas 200907 +#define __FLT64X_HAS_QUIET_NAN__ 1 +#define __INT_FAST64_TYPE__ long int +#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 +#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) +#define __PIE__ 2 +#define __LP64__ 1 +#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x +#define __DECIMAL_BID_FORMAT__ 1 +#define __FLT64_MIN_10_EXP__ (-307) +#define __FLT64X_DECIMAL_DIG__ 21 +#define __DEC128_MIN__ 1E-6143DL +#define __REGISTER_PREFIX__ +#define __UINT16_MAX__ 0xffff +#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 +#define __UINT8_TYPE__ unsigned char +#define __NO_INLINE__ 1 +#define __FLT_MANT_DIG__ 24 +#define __LDBL_DECIMAL_DIG__ 21 +#define __VERSION__ "9.2.1 20191008" +#define __UINT64_C(c) c ## UL +#define __cpp_unicode_characters 200704 +#define _STDC_PREDEF_H 1 +#define __cpp_decltype_auto 201304 +#define __GCC_ATOMIC_INT_LOCK_FREE 2 +#define __FLT128_MAX_EXP__ 16384 +#define __FLT32_MANT_DIG__ 24 +#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __STDC_IEC_559_COMPLEX__ 1 +#define __FLT128_HAS_DENORM__ 1 +#define __FLT128_DIG__ 33 +#define __SCHAR_WIDTH__ 8 +#define __INT32_C(c) c +#define __DEC64_EPSILON__ 1E-15DD +#define __ORDER_PDP_ENDIAN__ 3412 +#define __DEC128_MIN_EXP__ (-6142) +#define __FLT32_MAX_10_EXP__ 38 +#define __INT_FAST32_TYPE__ long int +#define __UINT_LEAST16_TYPE__ short unsigned int +#define __FLT64X_HAS_INFINITY__ 1 +#define unix 1 +#define __DBL_HAS_DENORM__ 1 +#define __INT16_MAX__ 0x7fff +#define __cpp_rtti 199711 +#define __SIZE_TYPE__ long unsigned int +#define __UINT64_MAX__ 0xffffffffffffffffUL +#define __FLT64X_DIG__ 18 +#define __INT8_TYPE__ signed char +#define __cpp_digit_separators 201309 +#define __ELF__ 1 +#define __GCC_ASM_FLAG_OUTPUTS__ 1 +#define __FLT_RADIX__ 2 +#define __INT_LEAST16_TYPE__ short int +#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L +#define __UINTMAX_C(c) c ## UL +#define __GLIBCXX_BITSIZE_INT_N_0 128 +#define __k8 1 +#define __SIG_ATOMIC_MAX__ 0x7fffffff +#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +#define __SIZEOF_PTRDIFF_T__ 8 +#define __FLT32X_MANT_DIG__ 53 +#define __x86_64__ 1 +#define __FLT32X_MIN_EXP__ (-1021) +#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +#define __INT_FAST16_MAX__ 0x7fffffffffffffffL +#define __FLT64_DIG__ 15 +#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL +#define __UINT_LEAST64_TYPE__ long unsigned int +#define __FLT_HAS_QUIET_NAN__ 1 +#define __FLT_MAX_10_EXP__ 38 +#define __LONG_MAX__ 0x7fffffffffffffffL +#define __FLT64X_HAS_DENORM__ 1 +#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +#define __FLT_HAS_INFINITY__ 1 +#define __cpp_unicode_literals 200710 +#define __UINT_FAST16_TYPE__ long unsigned int +#define __DEC64_MAX__ 9.999999999999999E384DD +#define __INT_FAST32_WIDTH__ 64 +#define __CHAR16_TYPE__ short unsigned int +#define __PRAGMA_REDEFINE_EXTNAME 1 +#define __SIZE_WIDTH__ 64 +#define __SEG_FS 1 +#define __INT_LEAST16_MAX__ 0x7fff +#define __DEC64_MANT_DIG__ 16 +#define __INT64_MAX__ 0x7fffffffffffffffL +#define __UINT_LEAST32_MAX__ 0xffffffffU +#define __SEG_GS 1 +#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 +#define __GCC_ATOMIC_LONG_LOCK_FREE 2 +#define __SIG_ATOMIC_WIDTH__ 32 +#define __INT_LEAST64_TYPE__ long int +#define __INT16_TYPE__ short int +#define __INT_LEAST8_TYPE__ signed char +#define __DEC32_MAX_EXP__ 97 +#define __INT_FAST8_MAX__ 0x7f +#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 +#define __INTPTR_MAX__ 0x7fffffffffffffffL +#define __cpp_sized_deallocation 201309 +#define linux 1 +#define __cpp_range_based_for 200907 +#define __FLT64_HAS_QUIET_NAN__ 1 +#define __FLT32_MIN_10_EXP__ (-37) +#define __SSE2__ 1 +#define __EXCEPTIONS 1 +#define __LDBL_MANT_DIG__ 64 +#define __DBL_HAS_QUIET_NAN__ 1 +#define __FLT64_HAS_INFINITY__ 1 +#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x +#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +#define __code_model_small__ 1 +#define __cpp_return_type_deduction 201304 +#define __k8__ 1 +#define __INTPTR_TYPE__ long int +#define __UINT16_TYPE__ short unsigned int +#define __WCHAR_TYPE__ int +#define __SIZEOF_FLOAT__ 4 +#define __pic__ 2 +#define __UINTPTR_MAX__ 0xffffffffffffffffUL +#define __INT_FAST64_WIDTH__ 64 +#define __DEC64_MIN_EXP__ (-382) +#define __cpp_decltype 200707 +#define __FLT32_DECIMAL_DIG__ 9 +#define __INT_FAST64_MAX__ 0x7fffffffffffffffL +#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +#define __FLT_DIG__ 6 +#define __FLT64X_MAX_EXP__ 16384 +#define __UINT_FAST64_TYPE__ long unsigned int +#define __INT_MAX__ 0x7fffffff +#define __amd64__ 1 +#define __INT64_TYPE__ long int +#define __FLT_MAX_EXP__ 128 +#define __ORDER_BIG_ENDIAN__ 4321 +#define __DBL_MANT_DIG__ 53 +#define __cpp_inheriting_constructors 201511 +#define __SIZEOF_FLOAT128__ 16 +#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL +#define __DEC64_MIN__ 1E-383DD +#define __WINT_TYPE__ unsigned int +#define __UINT_LEAST32_TYPE__ unsigned int +#define __SIZEOF_SHORT__ 2 +#define __SSE__ 1 +#define __LDBL_MIN_EXP__ (-16381) +#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 +#define __WINT_WIDTH__ 32 +#define __INT_LEAST8_MAX__ 0x7f +#define __FLT32X_MAX_10_EXP__ 308 +#define __SIZEOF_INT128__ 16 +#define __LDBL_MAX_10_EXP__ 4932 +#define __ATOMIC_RELAXED 0 +#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) +#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 +#define _LP64 1 +#define __UINT8_C(c) c +#define __FLT64_MAX_EXP__ 1024 +#define __INT_LEAST32_TYPE__ int +#define __SIZEOF_WCHAR_T__ 4 +#define __FLT128_HAS_QUIET_NAN__ 1 +#define __INT_FAST8_TYPE__ signed char +#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x +#define __GNUC_STDC_INLINE__ 1 +#define __FLT64_HAS_DENORM__ 1 +#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 +#define __DBL_DECIMAL_DIG__ 17 +#define __STDC_UTF_32__ 1 +#define __INT_FAST8_WIDTH__ 8 +#define __FXSR__ 1 +#define __DEC_EVAL_METHOD__ 2 +#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x +#define __cpp_runtime_arrays 198712 +#define __UINT64_TYPE__ long unsigned int +#define __UINT32_C(c) c ## U +#define __INTMAX_MAX__ 0x7fffffffffffffffL +#define __cpp_alias_templates 200704 +#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F +#define __INT8_MAX__ 0x7f +#define __LONG_WIDTH__ 64 +#define __PIC__ 2 +#define __UINT_FAST32_TYPE__ long unsigned int +#define __CHAR32_TYPE__ unsigned int +#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F +#define __cpp_constexpr 201304 +#define __INT32_TYPE__ int +#define __SIZEOF_DOUBLE__ 8 +#define __cpp_exceptions 199711 +#define __FLT_MIN_10_EXP__ (-37) +#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 +#define __INT_LEAST32_WIDTH__ 32 +#define __INTMAX_TYPE__ long int +#define __DEC128_MAX_EXP__ 6145 +#define __FLT32X_HAS_QUIET_NAN__ 1 +#define __ATOMIC_CONSUME 1 +#define __GNUC_MINOR__ 2 +#define __GLIBCXX_TYPE_INT_N_0 __int128 +#define __INT_FAST16_WIDTH__ 64 +#define __UINTMAX_MAX__ 0xffffffffffffffffUL +#define __DEC32_MANT_DIG__ 7 +#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x +#define __DBL_MAX_10_EXP__ 308 +#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L +#define __INT16_C(c) c +#define __cpp_generic_lambdas 201304 +#define __STDC__ 1 +#define __FLT32X_DIG__ 15 +#define __PTRDIFF_TYPE__ long int +#define __ATOMIC_SEQ_CST 5 +#define __UINT32_TYPE__ unsigned int +#define __FLT32X_MIN_10_EXP__ (-307) +#define __UINTPTR_TYPE__ long unsigned int +#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +#define __DEC128_MANT_DIG__ 34 +#define __LDBL_MIN_10_EXP__ (-4931) +#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 +#define __SSE_MATH__ 1 +#define __SIZEOF_LONG_LONG__ 8 +#define __cpp_user_defined_literals 200809 +#define __FLT128_DECIMAL_DIG__ 36 +#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 +#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x +#define __LDBL_DIG__ 18 +#define __FLT_DECIMAL_DIG__ 9 +#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL +#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 +#define __INT_LEAST64_WIDTH__ 64 +#define __UINT_FAST8_TYPE__ unsigned char +#define _GNU_SOURCE 1 +#define __cpp_init_captures 201304 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_RELEASE 3 diff --git a/settings.ui b/settings.ui index 3775b2c3..0eb8d371 100644 --- a/settings.ui +++ b/settings.ui @@ -6,8 +6,8 @@ 0 0 - 743 - 494 + 1439 + 947 @@ -41,7 +41,7 @@ Qt::LeftToRight - 0 + 2 Qt::ElideNone @@ -1952,6 +1952,15 @@ QFormLayout::AllNonFixedFieldsGrow + + 12 + + + 12 + + + 0 + @@ -2119,15 +2128,25 @@ - - + + - Disable linking: + GDB path (Unix only): - - + + + + + + + Build in current directory: + + + + + true @@ -2136,15 +2155,15 @@ - - + + - Build in current directory: + Disable linking: - - + + true @@ -2153,6 +2172,20 @@ + + + + GDB verbose output: + + + + + + + + + + @@ -2188,8 +2221,8 @@ - - + + diff --git a/ui_settings.h b/ui_settings.h new file mode 100644 index 00000000..18d4c542 --- /dev/null +++ b/ui_settings.h @@ -0,0 +1,1378 @@ +/******************************************************************************** +** Form generated from reading UI file 'settings.ui' +** +** Created by: Qt User Interface Compiler version 5.12.4 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_SETTINGS_H +#define UI_SETTINGS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_SettingsWindow +{ +public: + QVBoxLayout *verticalLayout; + QLabel *settingsLabel; + QTabWidget *tabWidget; + QWidget *commonTab; + QVBoxLayout *verticalLayout_4; + QGroupBox *commonSettingsBox; + QVBoxLayout *verticalLayout_3; + QHBoxLayout *horizontalLayout_2; + QLabel *startWindowLabel; + QComboBox *startWindow; + QSpacerItem *horizontalSpacer_2; + QHBoxLayout *horizontalLayout_4; + QLabel *languageLabel; + QComboBox *language; + QSpacerItem *horizontalSpacer_4; + QLabel *label_4; + QHBoxLayout *horizontalLayout_8; + QLabel *registersLabel_2; + QRadioButton *registersYesRadioButton; + QRadioButton *registersNoRadioButton; + QSpacerItem *horizontalSpacer_9; + QHBoxLayout *horizontalLayout_7; + QLabel *insertDebugStringLabel; + QCheckBox *insertDebugStringCheckBox; + QSpacerItem *horizontalSpacer_10; + QGroupBox *codeSettingsBox; + QVBoxLayout *verticalLayout_2; + QHBoxLayout *horizontalLayout_5; + QLabel *fontLabel; + QFontComboBox *fontComboBox; + QLabel *fontSizeLabel; + QSpinBox *fontSizeSpinBox; + QSpacerItem *horizontalSpacer_5; + QLabel *label; + QLabel *label_2; + QWidget *startTextWidget; + QSpacerItem *verticalSpacer_5; + QHBoxLayout *horizontalLayout; + QToolButton *resetAllButton; + QSpacerItem *horizontalSpacer_3; + QSpacerItem *verticalSpacer; + QWidget *colorsTab; + QGridLayout *gridLayout; + QGroupBox *groupBox; + QGridLayout *gridLayout_2; + QCheckBox *iomacroBoldCheckBox; + QLabel *systemLabel; + QPushButton *quotationColorButton; + QPushButton *systemColorButton; + QCheckBox *numbersItalicCheckBox; + QLabel *label_6; + QCheckBox *numbersBoldCheckBox; + QLabel *label_7; + QLabel *label_3; + QCheckBox *systemItalicCheckBox; + QPushButton *commentsColorButton_2; + QPushButton *keywordsColorButton; + QCheckBox *commentsBoldCheckBox; + QPushButton *keywordsColorButton_2; + QPushButton *iomacroColorButton_2; + QCheckBox *memoryItalicCheckBox; + QLabel *keywordsLabel; + QLabel *label_5; + QPushButton *labelsColorButton; + QLabel *numbersLabel; + QPushButton *quotationColorButton_2; + QLabel *labelsLabel; + QLabel *commentsLabel; + QPushButton *memoryColorButton; + QPushButton *systemColorButton_2; + QLabel *iomacroLabel_2; + QPushButton *labelsColorButton_2; + QCheckBox *registersBoldCheckBox; + QCheckBox *quotationBoldCheckBox; + QPushButton *iomacroColorButton; + QCheckBox *iomacroItalicCheckBox; + QPushButton *registersColorButton_2; + QCheckBox *keywordsBoldCheckBox; + QCheckBox *memoryBoldCheckBox; + QPushButton *numbersColorButton; + QCheckBox *quotationItalicCheckBox; + QPushButton *commentsColorButton; + QCheckBox *labelsItalicCheckBox; + QLabel *memoryLabel; + QLabel *iomacroLabel; + QCheckBox *keywordsItalicCheckBox; + QSpacerItem *verticalSpacer_3; + QLabel *registersLabel; + QCheckBox *commentsItalicCheckBox; + QCheckBox *labelsBoldCheckBox; + QCheckBox *registersItalicCheckBox; + QCheckBox *systemBoldCheckBox; + QPushButton *memoryColorButton_2; + QPushButton *registersColorButton; + QPushButton *numbersColorButton_2; + QSpacerItem *horizontalSpacer_7; + QGroupBox *groupBox_2; + QVBoxLayout *verticalLayout_5; + QGridLayout *gridLayout_4; + QLabel *fontLabel_2; + QPushButton *fontColorButton; + QCheckBox *currentLineCheckBox; + QPushButton *debugLineColorButton; + QLabel *currentLineLabel; + QLabel *debugLineLabel; + QPushButton *currentLineColorButton; + QLabel *backgroundLabel; + QPushButton *backgroundColorButton; + QLabel *lineNumberPanelLabel; + QPushButton *lineNumberPanelColorButton; + QLabel *lineNumberFontLabel; + QPushButton *lineNumberFontColorButton; + QLabel *label_8; + QSpacerItem *horizontalSpacer_6; + QSpacerItem *verticalSpacer_4; + QWidget *buildTab; + QVBoxLayout *verticalLayout_6; + QFormLayout *formLayout; + QLabel *modeLabel; + QHBoxLayout *horizontalLayout_3; + QRadioButton *x86RadioButton; + QRadioButton *x64RadioButton; + QSpacerItem *horizontalSpacer; + QLabel *assemblerLabel; + QHBoxLayout *horizontalLayout_6; + QRadioButton *nasmRadioButton; + QRadioButton *gasRadioButton; + QRadioButton *fasmRadioButton; + QRadioButton *masmRadioButton; + QSpacerItem *horizontalSpacer_8; + QLabel *assemblyLabel; + QLineEdit *assemblyOptionsEdit; + QLabel *linkingLabel; + QLineEdit *linkingOptionsEdit; + QLabel *assemblerPathLabel; + QLineEdit *assemblerPathEdit; + QLabel *linkerPathLabel; + QLineEdit *linkerPathEdit; + QLabel *objectFileNameLabel; + QLineEdit *objectFileNameEdit; + QLabel *gdbPathLabel; + QLineEdit *gdbPathEdit; + QLabel *assemblerWorkingDirectoryLabel; + QCheckBox *runInCurrentDirectoryCheckbox; + QLabel *disableLinkingLabel; + QCheckBox *disableLinkingCheckbox; + QLabel *gdbVerboseLabel; + QCheckBox *gdbVerboseCheckBox; + QLabel *infoLabel; + QDialogButtonBox *buttonBox; + QButtonGroup *buttonGroup; + QButtonGroup *buttonGroup_3; + QButtonGroup *buttonGroup_2; + + void setupUi(QWidget *SettingsWindow) + { + if (SettingsWindow->objectName().isEmpty()) + SettingsWindow->setObjectName(QString::fromUtf8("SettingsWindow")); + SettingsWindow->resize(1439, 947); + verticalLayout = new QVBoxLayout(SettingsWindow); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + settingsLabel = new QLabel(SettingsWindow); + settingsLabel->setObjectName(QString::fromUtf8("settingsLabel")); + QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(settingsLabel->sizePolicy().hasHeightForWidth()); + settingsLabel->setSizePolicy(sizePolicy); + QFont font; + font.setPointSize(16); + settingsLabel->setFont(font); + settingsLabel->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + verticalLayout->addWidget(settingsLabel); + + tabWidget = new QTabWidget(SettingsWindow); + tabWidget->setObjectName(QString::fromUtf8("tabWidget")); + tabWidget->setLayoutDirection(Qt::LeftToRight); + tabWidget->setElideMode(Qt::ElideNone); + commonTab = new QWidget(); + commonTab->setObjectName(QString::fromUtf8("commonTab")); + verticalLayout_4 = new QVBoxLayout(commonTab); + verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); + commonSettingsBox = new QGroupBox(commonTab); + commonSettingsBox->setObjectName(QString::fromUtf8("commonSettingsBox")); + sizePolicy.setHeightForWidth(commonSettingsBox->sizePolicy().hasHeightForWidth()); + commonSettingsBox->setSizePolicy(sizePolicy); + commonSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + verticalLayout_3 = new QVBoxLayout(commonSettingsBox); + verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); + horizontalLayout_2 = new QHBoxLayout(); + horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + startWindowLabel = new QLabel(commonSettingsBox); + startWindowLabel->setObjectName(QString::fromUtf8("startWindowLabel")); + QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(startWindowLabel->sizePolicy().hasHeightForWidth()); + startWindowLabel->setSizePolicy(sizePolicy1); + + horizontalLayout_2->addWidget(startWindowLabel); + + startWindow = new QComboBox(commonSettingsBox); + startWindow->addItem(QString()); + startWindow->addItem(QString()); + startWindow->setObjectName(QString::fromUtf8("startWindow")); + QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Fixed); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(startWindow->sizePolicy().hasHeightForWidth()); + startWindow->setSizePolicy(sizePolicy2); + startWindow->setMinimumSize(QSize(266, 0)); + + horizontalLayout_2->addWidget(startWindow); + + horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_2->addItem(horizontalSpacer_2); + + + verticalLayout_3->addLayout(horizontalLayout_2); + + horizontalLayout_4 = new QHBoxLayout(); + horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + languageLabel = new QLabel(commonSettingsBox); + languageLabel->setObjectName(QString::fromUtf8("languageLabel")); + + horizontalLayout_4->addWidget(languageLabel); + + language = new QComboBox(commonSettingsBox); + language->addItem(QString::fromUtf8("\320\240\321\203\321\201\321\201\320\272\320\270\320\271")); + language->addItem(QString::fromUtf8("English")); + language->addItem(QString::fromUtf8("T\303\274rk")); + language->addItem(QString::fromUtf8("\344\270\255\345\233\275")); + language->addItem(QString::fromUtf8("Deutsch")); + language->addItem(QString::fromUtf8("Italiano")); + language->addItem(QString()); + language->addItem(QString()); + language->addItem(QString()); + language->setObjectName(QString::fromUtf8("language")); + + horizontalLayout_4->addWidget(language); + + horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_4->addItem(horizontalSpacer_4); + + + verticalLayout_3->addLayout(horizontalLayout_4); + + label_4 = new QLabel(commonSettingsBox); + label_4->setObjectName(QString::fromUtf8("label_4")); + + verticalLayout_3->addWidget(label_4); + + horizontalLayout_8 = new QHBoxLayout(); + horizontalLayout_8->setObjectName(QString::fromUtf8("horizontalLayout_8")); + registersLabel_2 = new QLabel(commonSettingsBox); + registersLabel_2->setObjectName(QString::fromUtf8("registersLabel_2")); + + horizontalLayout_8->addWidget(registersLabel_2); + + registersYesRadioButton = new QRadioButton(commonSettingsBox); + buttonGroup_3 = new QButtonGroup(SettingsWindow); + buttonGroup_3->setObjectName(QString::fromUtf8("buttonGroup_3")); + buttonGroup_3->addButton(registersYesRadioButton); + registersYesRadioButton->setObjectName(QString::fromUtf8("registersYesRadioButton")); + registersYesRadioButton->setChecked(false); + + horizontalLayout_8->addWidget(registersYesRadioButton); + + registersNoRadioButton = new QRadioButton(commonSettingsBox); + buttonGroup_3->addButton(registersNoRadioButton); + registersNoRadioButton->setObjectName(QString::fromUtf8("registersNoRadioButton")); + registersNoRadioButton->setChecked(true); + + horizontalLayout_8->addWidget(registersNoRadioButton); + + horizontalSpacer_9 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_8->addItem(horizontalSpacer_9); + + + verticalLayout_3->addLayout(horizontalLayout_8); + + horizontalLayout_7 = new QHBoxLayout(); + horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7")); + insertDebugStringLabel = new QLabel(commonSettingsBox); + insertDebugStringLabel->setObjectName(QString::fromUtf8("insertDebugStringLabel")); + + horizontalLayout_7->addWidget(insertDebugStringLabel); + + insertDebugStringCheckBox = new QCheckBox(commonSettingsBox); + insertDebugStringCheckBox->setObjectName(QString::fromUtf8("insertDebugStringCheckBox")); + insertDebugStringCheckBox->setChecked(true); + + horizontalLayout_7->addWidget(insertDebugStringCheckBox); + + horizontalSpacer_10 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_7->addItem(horizontalSpacer_10); + + + verticalLayout_3->addLayout(horizontalLayout_7); + + + verticalLayout_4->addWidget(commonSettingsBox); + + codeSettingsBox = new QGroupBox(commonTab); + codeSettingsBox->setObjectName(QString::fromUtf8("codeSettingsBox")); + sizePolicy.setHeightForWidth(codeSettingsBox->sizePolicy().hasHeightForWidth()); + codeSettingsBox->setSizePolicy(sizePolicy); + codeSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + verticalLayout_2 = new QVBoxLayout(codeSettingsBox); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + horizontalLayout_5 = new QHBoxLayout(); + horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5")); + fontLabel = new QLabel(codeSettingsBox); + fontLabel->setObjectName(QString::fromUtf8("fontLabel")); + + horizontalLayout_5->addWidget(fontLabel); + + fontComboBox = new QFontComboBox(codeSettingsBox); + fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); + fontComboBox->setWritingSystem(QFontDatabase::Latin); + fontComboBox->setFontFilters(QFontComboBox::AllFonts); + QFont font1; + font1.setFamily(QString::fromUtf8("Arial")); + font1.setPointSize(12); + fontComboBox->setCurrentFont(font1); + + horizontalLayout_5->addWidget(fontComboBox); + + fontSizeLabel = new QLabel(codeSettingsBox); + fontSizeLabel->setObjectName(QString::fromUtf8("fontSizeLabel")); + + horizontalLayout_5->addWidget(fontSizeLabel); + + fontSizeSpinBox = new QSpinBox(codeSettingsBox); + fontSizeSpinBox->setObjectName(QString::fromUtf8("fontSizeSpinBox")); + fontSizeSpinBox->setMinimum(5); + fontSizeSpinBox->setMaximum(72); + fontSizeSpinBox->setValue(12); + + horizontalLayout_5->addWidget(fontSizeSpinBox); + + horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_5->addItem(horizontalSpacer_5); + + + verticalLayout_2->addLayout(horizontalLayout_5); + + label = new QLabel(codeSettingsBox); + label->setObjectName(QString::fromUtf8("label")); + label->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + verticalLayout_2->addWidget(label); + + label_2 = new QLabel(codeSettingsBox); + label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + verticalLayout_2->addWidget(label_2); + + startTextWidget = new QWidget(codeSettingsBox); + startTextWidget->setObjectName(QString::fromUtf8("startTextWidget")); + + verticalLayout_2->addWidget(startTextWidget); + + verticalSpacer_5 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + + verticalLayout_2->addItem(verticalSpacer_5); + + + verticalLayout_4->addWidget(codeSettingsBox); + + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + resetAllButton = new QToolButton(commonTab); + resetAllButton->setObjectName(QString::fromUtf8("resetAllButton")); + resetAllButton->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + horizontalLayout->addWidget(resetAllButton); + + horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_3); + + + verticalLayout_4->addLayout(horizontalLayout); + + verticalSpacer = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + + verticalLayout_4->addItem(verticalSpacer); + + tabWidget->addTab(commonTab, QString()); + colorsTab = new QWidget(); + colorsTab->setObjectName(QString::fromUtf8("colorsTab")); + gridLayout = new QGridLayout(colorsTab); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + groupBox = new QGroupBox(colorsTab); + groupBox->setObjectName(QString::fromUtf8("groupBox")); + gridLayout_2 = new QGridLayout(groupBox); + gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + iomacroBoldCheckBox = new QCheckBox(groupBox); + iomacroBoldCheckBox->setObjectName(QString::fromUtf8("iomacroBoldCheckBox")); + QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Minimum); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(0); + sizePolicy3.setHeightForWidth(iomacroBoldCheckBox->sizePolicy().hasHeightForWidth()); + iomacroBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(iomacroBoldCheckBox, 8, 3, 1, 1); + + systemLabel = new QLabel(groupBox); + systemLabel->setObjectName(QString::fromUtf8("systemLabel")); + + gridLayout_2->addWidget(systemLabel, 7, 0, 1, 1); + + quotationColorButton = new QPushButton(groupBox); + quotationColorButton->setObjectName(QString::fromUtf8("quotationColorButton")); + sizePolicy1.setHeightForWidth(quotationColorButton->sizePolicy().hasHeightForWidth()); + quotationColorButton->setSizePolicy(sizePolicy1); + quotationColorButton->setMinimumSize(QSize(23, 23)); + quotationColorButton->setMaximumSize(QSize(23, 23)); + quotationColorButton->setBaseSize(QSize(0, 0)); + quotationColorButton->setFocusPolicy(Qt::NoFocus); + quotationColorButton->setAutoDefault(false); + quotationColorButton->setFlat(false); + + gridLayout_2->addWidget(quotationColorButton, 9, 1, 1, 1); + + systemColorButton = new QPushButton(groupBox); + systemColorButton->setObjectName(QString::fromUtf8("systemColorButton")); + sizePolicy1.setHeightForWidth(systemColorButton->sizePolicy().hasHeightForWidth()); + systemColorButton->setSizePolicy(sizePolicy1); + systemColorButton->setMinimumSize(QSize(23, 23)); + systemColorButton->setMaximumSize(QSize(23, 23)); + systemColorButton->setBaseSize(QSize(0, 0)); + systemColorButton->setFocusPolicy(Qt::NoFocus); + systemColorButton->setAutoDefault(false); + systemColorButton->setFlat(false); + + gridLayout_2->addWidget(systemColorButton, 7, 1, 1, 1); + + numbersItalicCheckBox = new QCheckBox(groupBox); + numbersItalicCheckBox->setObjectName(QString::fromUtf8("numbersItalicCheckBox")); + sizePolicy3.setHeightForWidth(numbersItalicCheckBox->sizePolicy().hasHeightForWidth()); + numbersItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(numbersItalicCheckBox, 3, 4, 1, 1); + + label_6 = new QLabel(groupBox); + label_6->setObjectName(QString::fromUtf8("label_6")); + + gridLayout_2->addWidget(label_6, 0, 3, 1, 1); + + numbersBoldCheckBox = new QCheckBox(groupBox); + numbersBoldCheckBox->setObjectName(QString::fromUtf8("numbersBoldCheckBox")); + sizePolicy3.setHeightForWidth(numbersBoldCheckBox->sizePolicy().hasHeightForWidth()); + numbersBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(numbersBoldCheckBox, 3, 3, 1, 1); + + label_7 = new QLabel(groupBox); + label_7->setObjectName(QString::fromUtf8("label_7")); + + gridLayout_2->addWidget(label_7, 0, 4, 1, 1); + + label_3 = new QLabel(groupBox); + label_3->setObjectName(QString::fromUtf8("label_3")); + + gridLayout_2->addWidget(label_3, 0, 1, 1, 1); + + systemItalicCheckBox = new QCheckBox(groupBox); + systemItalicCheckBox->setObjectName(QString::fromUtf8("systemItalicCheckBox")); + sizePolicy3.setHeightForWidth(systemItalicCheckBox->sizePolicy().hasHeightForWidth()); + systemItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(systemItalicCheckBox, 7, 4, 1, 1); + + commentsColorButton_2 = new QPushButton(groupBox); + commentsColorButton_2->setObjectName(QString::fromUtf8("commentsColorButton_2")); + sizePolicy1.setHeightForWidth(commentsColorButton_2->sizePolicy().hasHeightForWidth()); + commentsColorButton_2->setSizePolicy(sizePolicy1); + commentsColorButton_2->setMinimumSize(QSize(23, 23)); + commentsColorButton_2->setMaximumSize(QSize(23, 23)); + commentsColorButton_2->setBaseSize(QSize(0, 0)); + commentsColorButton_2->setFocusPolicy(Qt::NoFocus); + commentsColorButton_2->setAutoDefault(false); + commentsColorButton_2->setFlat(false); + + gridLayout_2->addWidget(commentsColorButton_2, 6, 2, 1, 1); + + keywordsColorButton = new QPushButton(groupBox); + keywordsColorButton->setObjectName(QString::fromUtf8("keywordsColorButton")); + sizePolicy1.setHeightForWidth(keywordsColorButton->sizePolicy().hasHeightForWidth()); + keywordsColorButton->setSizePolicy(sizePolicy1); + keywordsColorButton->setMinimumSize(QSize(23, 23)); + keywordsColorButton->setMaximumSize(QSize(23, 23)); + keywordsColorButton->setBaseSize(QSize(0, 0)); + keywordsColorButton->setFocusPolicy(Qt::NoFocus); + keywordsColorButton->setAutoDefault(false); + keywordsColorButton->setFlat(false); + + gridLayout_2->addWidget(keywordsColorButton, 1, 1, 1, 1); + + commentsBoldCheckBox = new QCheckBox(groupBox); + commentsBoldCheckBox->setObjectName(QString::fromUtf8("commentsBoldCheckBox")); + sizePolicy3.setHeightForWidth(commentsBoldCheckBox->sizePolicy().hasHeightForWidth()); + commentsBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(commentsBoldCheckBox, 6, 3, 1, 1); + + keywordsColorButton_2 = new QPushButton(groupBox); + keywordsColorButton_2->setObjectName(QString::fromUtf8("keywordsColorButton_2")); + sizePolicy1.setHeightForWidth(keywordsColorButton_2->sizePolicy().hasHeightForWidth()); + keywordsColorButton_2->setSizePolicy(sizePolicy1); + keywordsColorButton_2->setMinimumSize(QSize(23, 23)); + keywordsColorButton_2->setMaximumSize(QSize(23, 23)); + keywordsColorButton_2->setBaseSize(QSize(0, 0)); + keywordsColorButton_2->setFocusPolicy(Qt::NoFocus); + keywordsColorButton_2->setAutoDefault(false); + keywordsColorButton_2->setFlat(false); + + gridLayout_2->addWidget(keywordsColorButton_2, 1, 2, 1, 1); + + iomacroColorButton_2 = new QPushButton(groupBox); + iomacroColorButton_2->setObjectName(QString::fromUtf8("iomacroColorButton_2")); + sizePolicy1.setHeightForWidth(iomacroColorButton_2->sizePolicy().hasHeightForWidth()); + iomacroColorButton_2->setSizePolicy(sizePolicy1); + iomacroColorButton_2->setMinimumSize(QSize(23, 23)); + iomacroColorButton_2->setMaximumSize(QSize(23, 23)); + iomacroColorButton_2->setBaseSize(QSize(0, 0)); + iomacroColorButton_2->setFocusPolicy(Qt::NoFocus); + iomacroColorButton_2->setAutoDefault(false); + iomacroColorButton_2->setFlat(false); + + gridLayout_2->addWidget(iomacroColorButton_2, 8, 2, 1, 1); + + memoryItalicCheckBox = new QCheckBox(groupBox); + memoryItalicCheckBox->setObjectName(QString::fromUtf8("memoryItalicCheckBox")); + sizePolicy3.setHeightForWidth(memoryItalicCheckBox->sizePolicy().hasHeightForWidth()); + memoryItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(memoryItalicCheckBox, 4, 4, 1, 1); + + keywordsLabel = new QLabel(groupBox); + keywordsLabel->setObjectName(QString::fromUtf8("keywordsLabel")); + + gridLayout_2->addWidget(keywordsLabel, 1, 0, 1, 1); + + label_5 = new QLabel(groupBox); + label_5->setObjectName(QString::fromUtf8("label_5")); + + gridLayout_2->addWidget(label_5, 0, 2, 1, 1); + + labelsColorButton = new QPushButton(groupBox); + labelsColorButton->setObjectName(QString::fromUtf8("labelsColorButton")); + sizePolicy1.setHeightForWidth(labelsColorButton->sizePolicy().hasHeightForWidth()); + labelsColorButton->setSizePolicy(sizePolicy1); + labelsColorButton->setMinimumSize(QSize(23, 23)); + labelsColorButton->setMaximumSize(QSize(23, 23)); + labelsColorButton->setBaseSize(QSize(0, 0)); + labelsColorButton->setFocusPolicy(Qt::NoFocus); + labelsColorButton->setAutoDefault(false); + labelsColorButton->setFlat(false); + + gridLayout_2->addWidget(labelsColorButton, 5, 1, 1, 1); + + numbersLabel = new QLabel(groupBox); + numbersLabel->setObjectName(QString::fromUtf8("numbersLabel")); + + gridLayout_2->addWidget(numbersLabel, 3, 0, 1, 1); + + quotationColorButton_2 = new QPushButton(groupBox); + quotationColorButton_2->setObjectName(QString::fromUtf8("quotationColorButton_2")); + sizePolicy1.setHeightForWidth(quotationColorButton_2->sizePolicy().hasHeightForWidth()); + quotationColorButton_2->setSizePolicy(sizePolicy1); + quotationColorButton_2->setMinimumSize(QSize(23, 23)); + quotationColorButton_2->setMaximumSize(QSize(23, 23)); + quotationColorButton_2->setBaseSize(QSize(0, 0)); + quotationColorButton_2->setFocusPolicy(Qt::NoFocus); + quotationColorButton_2->setAutoDefault(false); + quotationColorButton_2->setFlat(false); + + gridLayout_2->addWidget(quotationColorButton_2, 9, 2, 1, 1); + + labelsLabel = new QLabel(groupBox); + labelsLabel->setObjectName(QString::fromUtf8("labelsLabel")); + + gridLayout_2->addWidget(labelsLabel, 5, 0, 1, 1); + + commentsLabel = new QLabel(groupBox); + commentsLabel->setObjectName(QString::fromUtf8("commentsLabel")); + + gridLayout_2->addWidget(commentsLabel, 6, 0, 1, 1); + + memoryColorButton = new QPushButton(groupBox); + memoryColorButton->setObjectName(QString::fromUtf8("memoryColorButton")); + sizePolicy1.setHeightForWidth(memoryColorButton->sizePolicy().hasHeightForWidth()); + memoryColorButton->setSizePolicy(sizePolicy1); + memoryColorButton->setMinimumSize(QSize(23, 23)); + memoryColorButton->setMaximumSize(QSize(23, 23)); + memoryColorButton->setBaseSize(QSize(0, 0)); + memoryColorButton->setFocusPolicy(Qt::NoFocus); + memoryColorButton->setAutoDefault(false); + memoryColorButton->setFlat(false); + + gridLayout_2->addWidget(memoryColorButton, 4, 1, 1, 1); + + systemColorButton_2 = new QPushButton(groupBox); + systemColorButton_2->setObjectName(QString::fromUtf8("systemColorButton_2")); + sizePolicy1.setHeightForWidth(systemColorButton_2->sizePolicy().hasHeightForWidth()); + systemColorButton_2->setSizePolicy(sizePolicy1); + systemColorButton_2->setMinimumSize(QSize(23, 23)); + systemColorButton_2->setMaximumSize(QSize(23, 23)); + systemColorButton_2->setBaseSize(QSize(0, 0)); + systemColorButton_2->setFocusPolicy(Qt::NoFocus); + systemColorButton_2->setAutoDefault(false); + systemColorButton_2->setFlat(false); + + gridLayout_2->addWidget(systemColorButton_2, 7, 2, 1, 1); + + iomacroLabel_2 = new QLabel(groupBox); + iomacroLabel_2->setObjectName(QString::fromUtf8("iomacroLabel_2")); + + gridLayout_2->addWidget(iomacroLabel_2, 9, 0, 1, 1); + + labelsColorButton_2 = new QPushButton(groupBox); + labelsColorButton_2->setObjectName(QString::fromUtf8("labelsColorButton_2")); + sizePolicy1.setHeightForWidth(labelsColorButton_2->sizePolicy().hasHeightForWidth()); + labelsColorButton_2->setSizePolicy(sizePolicy1); + labelsColorButton_2->setMinimumSize(QSize(23, 23)); + labelsColorButton_2->setMaximumSize(QSize(23, 23)); + labelsColorButton_2->setBaseSize(QSize(0, 0)); + labelsColorButton_2->setFocusPolicy(Qt::NoFocus); + labelsColorButton_2->setAutoDefault(false); + labelsColorButton_2->setFlat(false); + + gridLayout_2->addWidget(labelsColorButton_2, 5, 2, 1, 1); + + registersBoldCheckBox = new QCheckBox(groupBox); + registersBoldCheckBox->setObjectName(QString::fromUtf8("registersBoldCheckBox")); + sizePolicy3.setHeightForWidth(registersBoldCheckBox->sizePolicy().hasHeightForWidth()); + registersBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(registersBoldCheckBox, 2, 3, 1, 1); + + quotationBoldCheckBox = new QCheckBox(groupBox); + quotationBoldCheckBox->setObjectName(QString::fromUtf8("quotationBoldCheckBox")); + sizePolicy3.setHeightForWidth(quotationBoldCheckBox->sizePolicy().hasHeightForWidth()); + quotationBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(quotationBoldCheckBox, 9, 3, 1, 1); + + iomacroColorButton = new QPushButton(groupBox); + iomacroColorButton->setObjectName(QString::fromUtf8("iomacroColorButton")); + sizePolicy1.setHeightForWidth(iomacroColorButton->sizePolicy().hasHeightForWidth()); + iomacroColorButton->setSizePolicy(sizePolicy1); + iomacroColorButton->setMinimumSize(QSize(23, 23)); + iomacroColorButton->setMaximumSize(QSize(23, 23)); + iomacroColorButton->setBaseSize(QSize(0, 0)); + iomacroColorButton->setFocusPolicy(Qt::NoFocus); + iomacroColorButton->setAutoDefault(false); + iomacroColorButton->setFlat(false); + + gridLayout_2->addWidget(iomacroColorButton, 8, 1, 1, 1); + + iomacroItalicCheckBox = new QCheckBox(groupBox); + iomacroItalicCheckBox->setObjectName(QString::fromUtf8("iomacroItalicCheckBox")); + sizePolicy3.setHeightForWidth(iomacroItalicCheckBox->sizePolicy().hasHeightForWidth()); + iomacroItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(iomacroItalicCheckBox, 8, 4, 1, 1); + + registersColorButton_2 = new QPushButton(groupBox); + registersColorButton_2->setObjectName(QString::fromUtf8("registersColorButton_2")); + sizePolicy1.setHeightForWidth(registersColorButton_2->sizePolicy().hasHeightForWidth()); + registersColorButton_2->setSizePolicy(sizePolicy1); + registersColorButton_2->setMinimumSize(QSize(23, 23)); + registersColorButton_2->setMaximumSize(QSize(23, 23)); + registersColorButton_2->setBaseSize(QSize(0, 0)); + registersColorButton_2->setFocusPolicy(Qt::NoFocus); + registersColorButton_2->setAutoDefault(false); + registersColorButton_2->setFlat(false); + + gridLayout_2->addWidget(registersColorButton_2, 2, 2, 1, 1); + + keywordsBoldCheckBox = new QCheckBox(groupBox); + keywordsBoldCheckBox->setObjectName(QString::fromUtf8("keywordsBoldCheckBox")); + sizePolicy3.setHeightForWidth(keywordsBoldCheckBox->sizePolicy().hasHeightForWidth()); + keywordsBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(keywordsBoldCheckBox, 1, 3, 1, 1); + + memoryBoldCheckBox = new QCheckBox(groupBox); + memoryBoldCheckBox->setObjectName(QString::fromUtf8("memoryBoldCheckBox")); + sizePolicy3.setHeightForWidth(memoryBoldCheckBox->sizePolicy().hasHeightForWidth()); + memoryBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(memoryBoldCheckBox, 4, 3, 1, 1); + + numbersColorButton = new QPushButton(groupBox); + numbersColorButton->setObjectName(QString::fromUtf8("numbersColorButton")); + sizePolicy1.setHeightForWidth(numbersColorButton->sizePolicy().hasHeightForWidth()); + numbersColorButton->setSizePolicy(sizePolicy1); + numbersColorButton->setMinimumSize(QSize(23, 23)); + numbersColorButton->setMaximumSize(QSize(23, 23)); + numbersColorButton->setBaseSize(QSize(0, 0)); + numbersColorButton->setFocusPolicy(Qt::NoFocus); + numbersColorButton->setAutoDefault(false); + numbersColorButton->setFlat(false); + + gridLayout_2->addWidget(numbersColorButton, 3, 1, 1, 1); + + quotationItalicCheckBox = new QCheckBox(groupBox); + quotationItalicCheckBox->setObjectName(QString::fromUtf8("quotationItalicCheckBox")); + sizePolicy3.setHeightForWidth(quotationItalicCheckBox->sizePolicy().hasHeightForWidth()); + quotationItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(quotationItalicCheckBox, 9, 4, 1, 1); + + commentsColorButton = new QPushButton(groupBox); + commentsColorButton->setObjectName(QString::fromUtf8("commentsColorButton")); + sizePolicy1.setHeightForWidth(commentsColorButton->sizePolicy().hasHeightForWidth()); + commentsColorButton->setSizePolicy(sizePolicy1); + commentsColorButton->setMinimumSize(QSize(23, 23)); + commentsColorButton->setMaximumSize(QSize(23, 23)); + commentsColorButton->setBaseSize(QSize(0, 0)); + commentsColorButton->setFocusPolicy(Qt::NoFocus); + commentsColorButton->setAutoDefault(false); + commentsColorButton->setFlat(false); + + gridLayout_2->addWidget(commentsColorButton, 6, 1, 1, 1); + + labelsItalicCheckBox = new QCheckBox(groupBox); + labelsItalicCheckBox->setObjectName(QString::fromUtf8("labelsItalicCheckBox")); + sizePolicy3.setHeightForWidth(labelsItalicCheckBox->sizePolicy().hasHeightForWidth()); + labelsItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(labelsItalicCheckBox, 5, 4, 1, 1); + + memoryLabel = new QLabel(groupBox); + memoryLabel->setObjectName(QString::fromUtf8("memoryLabel")); + + gridLayout_2->addWidget(memoryLabel, 4, 0, 1, 1); + + iomacroLabel = new QLabel(groupBox); + iomacroLabel->setObjectName(QString::fromUtf8("iomacroLabel")); + + gridLayout_2->addWidget(iomacroLabel, 8, 0, 1, 1); + + keywordsItalicCheckBox = new QCheckBox(groupBox); + keywordsItalicCheckBox->setObjectName(QString::fromUtf8("keywordsItalicCheckBox")); + sizePolicy3.setHeightForWidth(keywordsItalicCheckBox->sizePolicy().hasHeightForWidth()); + keywordsItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(keywordsItalicCheckBox, 1, 4, 1, 1); + + verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_2->addItem(verticalSpacer_3, 10, 1, 1, 1); + + registersLabel = new QLabel(groupBox); + registersLabel->setObjectName(QString::fromUtf8("registersLabel")); + + gridLayout_2->addWidget(registersLabel, 2, 0, 1, 1); + + commentsItalicCheckBox = new QCheckBox(groupBox); + commentsItalicCheckBox->setObjectName(QString::fromUtf8("commentsItalicCheckBox")); + sizePolicy3.setHeightForWidth(commentsItalicCheckBox->sizePolicy().hasHeightForWidth()); + commentsItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(commentsItalicCheckBox, 6, 4, 1, 1); + + labelsBoldCheckBox = new QCheckBox(groupBox); + labelsBoldCheckBox->setObjectName(QString::fromUtf8("labelsBoldCheckBox")); + sizePolicy3.setHeightForWidth(labelsBoldCheckBox->sizePolicy().hasHeightForWidth()); + labelsBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(labelsBoldCheckBox, 5, 3, 1, 1); + + registersItalicCheckBox = new QCheckBox(groupBox); + registersItalicCheckBox->setObjectName(QString::fromUtf8("registersItalicCheckBox")); + sizePolicy3.setHeightForWidth(registersItalicCheckBox->sizePolicy().hasHeightForWidth()); + registersItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(registersItalicCheckBox, 2, 4, 1, 1); + + systemBoldCheckBox = new QCheckBox(groupBox); + systemBoldCheckBox->setObjectName(QString::fromUtf8("systemBoldCheckBox")); + sizePolicy3.setHeightForWidth(systemBoldCheckBox->sizePolicy().hasHeightForWidth()); + systemBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(systemBoldCheckBox, 7, 3, 1, 1); + + memoryColorButton_2 = new QPushButton(groupBox); + memoryColorButton_2->setObjectName(QString::fromUtf8("memoryColorButton_2")); + sizePolicy1.setHeightForWidth(memoryColorButton_2->sizePolicy().hasHeightForWidth()); + memoryColorButton_2->setSizePolicy(sizePolicy1); + memoryColorButton_2->setMinimumSize(QSize(23, 23)); + memoryColorButton_2->setMaximumSize(QSize(23, 23)); + memoryColorButton_2->setBaseSize(QSize(0, 0)); + memoryColorButton_2->setFocusPolicy(Qt::NoFocus); + memoryColorButton_2->setAutoDefault(false); + memoryColorButton_2->setFlat(false); + + gridLayout_2->addWidget(memoryColorButton_2, 4, 2, 1, 1); + + registersColorButton = new QPushButton(groupBox); + registersColorButton->setObjectName(QString::fromUtf8("registersColorButton")); + sizePolicy1.setHeightForWidth(registersColorButton->sizePolicy().hasHeightForWidth()); + registersColorButton->setSizePolicy(sizePolicy1); + registersColorButton->setMinimumSize(QSize(23, 23)); + registersColorButton->setMaximumSize(QSize(23, 23)); + registersColorButton->setBaseSize(QSize(0, 0)); + registersColorButton->setFocusPolicy(Qt::NoFocus); + registersColorButton->setAutoDefault(false); + registersColorButton->setFlat(false); + + gridLayout_2->addWidget(registersColorButton, 2, 1, 1, 1); + + numbersColorButton_2 = new QPushButton(groupBox); + numbersColorButton_2->setObjectName(QString::fromUtf8("numbersColorButton_2")); + sizePolicy1.setHeightForWidth(numbersColorButton_2->sizePolicy().hasHeightForWidth()); + numbersColorButton_2->setSizePolicy(sizePolicy1); + numbersColorButton_2->setMinimumSize(QSize(23, 23)); + numbersColorButton_2->setMaximumSize(QSize(23, 23)); + numbersColorButton_2->setBaseSize(QSize(0, 0)); + numbersColorButton_2->setFocusPolicy(Qt::NoFocus); + numbersColorButton_2->setAutoDefault(false); + numbersColorButton_2->setFlat(false); + + gridLayout_2->addWidget(numbersColorButton_2, 3, 2, 1, 1); + + horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_2->addItem(horizontalSpacer_7, 5, 5, 1, 1); + + + gridLayout->addWidget(groupBox, 0, 2, 1, 1); + + groupBox_2 = new QGroupBox(colorsTab); + groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + verticalLayout_5 = new QVBoxLayout(groupBox_2); + verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5")); + gridLayout_4 = new QGridLayout(); + gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + fontLabel_2 = new QLabel(groupBox_2); + fontLabel_2->setObjectName(QString::fromUtf8("fontLabel_2")); + + gridLayout_4->addWidget(fontLabel_2, 4, 0, 1, 1); + + fontColorButton = new QPushButton(groupBox_2); + fontColorButton->setObjectName(QString::fromUtf8("fontColorButton")); + sizePolicy1.setHeightForWidth(fontColorButton->sizePolicy().hasHeightForWidth()); + fontColorButton->setSizePolicy(sizePolicy1); + fontColorButton->setMinimumSize(QSize(23, 23)); + fontColorButton->setMaximumSize(QSize(23, 23)); + fontColorButton->setBaseSize(QSize(0, 0)); + fontColorButton->setFocusPolicy(Qt::NoFocus); + fontColorButton->setAutoDefault(false); + fontColorButton->setFlat(false); + + gridLayout_4->addWidget(fontColorButton, 4, 1, 1, 1); + + currentLineCheckBox = new QCheckBox(groupBox_2); + currentLineCheckBox->setObjectName(QString::fromUtf8("currentLineCheckBox")); + + gridLayout_4->addWidget(currentLineCheckBox, 5, 2, 1, 1); + + debugLineColorButton = new QPushButton(groupBox_2); + debugLineColorButton->setObjectName(QString::fromUtf8("debugLineColorButton")); + sizePolicy1.setHeightForWidth(debugLineColorButton->sizePolicy().hasHeightForWidth()); + debugLineColorButton->setSizePolicy(sizePolicy1); + debugLineColorButton->setMinimumSize(QSize(23, 23)); + debugLineColorButton->setMaximumSize(QSize(23, 23)); + debugLineColorButton->setBaseSize(QSize(0, 0)); + debugLineColorButton->setFocusPolicy(Qt::NoFocus); + debugLineColorButton->setAutoDefault(false); + debugLineColorButton->setFlat(false); + + gridLayout_4->addWidget(debugLineColorButton, 6, 1, 1, 1); + + currentLineLabel = new QLabel(groupBox_2); + currentLineLabel->setObjectName(QString::fromUtf8("currentLineLabel")); + + gridLayout_4->addWidget(currentLineLabel, 5, 0, 1, 1); + + debugLineLabel = new QLabel(groupBox_2); + debugLineLabel->setObjectName(QString::fromUtf8("debugLineLabel")); + + gridLayout_4->addWidget(debugLineLabel, 6, 0, 1, 1); + + currentLineColorButton = new QPushButton(groupBox_2); + currentLineColorButton->setObjectName(QString::fromUtf8("currentLineColorButton")); + sizePolicy1.setHeightForWidth(currentLineColorButton->sizePolicy().hasHeightForWidth()); + currentLineColorButton->setSizePolicy(sizePolicy1); + currentLineColorButton->setMinimumSize(QSize(23, 23)); + currentLineColorButton->setMaximumSize(QSize(23, 23)); + currentLineColorButton->setBaseSize(QSize(0, 0)); + currentLineColorButton->setFocusPolicy(Qt::NoFocus); + currentLineColorButton->setAutoDefault(false); + currentLineColorButton->setFlat(false); + + gridLayout_4->addWidget(currentLineColorButton, 5, 1, 1, 1); + + backgroundLabel = new QLabel(groupBox_2); + backgroundLabel->setObjectName(QString::fromUtf8("backgroundLabel")); + + gridLayout_4->addWidget(backgroundLabel, 1, 0, 1, 1); + + backgroundColorButton = new QPushButton(groupBox_2); + backgroundColorButton->setObjectName(QString::fromUtf8("backgroundColorButton")); + sizePolicy1.setHeightForWidth(backgroundColorButton->sizePolicy().hasHeightForWidth()); + backgroundColorButton->setSizePolicy(sizePolicy1); + backgroundColorButton->setMinimumSize(QSize(23, 23)); + backgroundColorButton->setMaximumSize(QSize(23, 23)); + backgroundColorButton->setBaseSize(QSize(0, 0)); + backgroundColorButton->setFocusPolicy(Qt::NoFocus); + backgroundColorButton->setAutoDefault(false); + backgroundColorButton->setFlat(false); + + gridLayout_4->addWidget(backgroundColorButton, 1, 1, 1, 1); + + lineNumberPanelLabel = new QLabel(groupBox_2); + lineNumberPanelLabel->setObjectName(QString::fromUtf8("lineNumberPanelLabel")); + + gridLayout_4->addWidget(lineNumberPanelLabel, 2, 0, 1, 1); + + lineNumberPanelColorButton = new QPushButton(groupBox_2); + lineNumberPanelColorButton->setObjectName(QString::fromUtf8("lineNumberPanelColorButton")); + sizePolicy1.setHeightForWidth(lineNumberPanelColorButton->sizePolicy().hasHeightForWidth()); + lineNumberPanelColorButton->setSizePolicy(sizePolicy1); + lineNumberPanelColorButton->setMinimumSize(QSize(23, 23)); + lineNumberPanelColorButton->setMaximumSize(QSize(23, 23)); + lineNumberPanelColorButton->setBaseSize(QSize(0, 0)); + lineNumberPanelColorButton->setFocusPolicy(Qt::NoFocus); + lineNumberPanelColorButton->setAutoDefault(false); + lineNumberPanelColorButton->setFlat(false); + + gridLayout_4->addWidget(lineNumberPanelColorButton, 2, 1, 1, 1); + + lineNumberFontLabel = new QLabel(groupBox_2); + lineNumberFontLabel->setObjectName(QString::fromUtf8("lineNumberFontLabel")); + + gridLayout_4->addWidget(lineNumberFontLabel, 3, 0, 1, 1); + + lineNumberFontColorButton = new QPushButton(groupBox_2); + lineNumberFontColorButton->setObjectName(QString::fromUtf8("lineNumberFontColorButton")); + sizePolicy1.setHeightForWidth(lineNumberFontColorButton->sizePolicy().hasHeightForWidth()); + lineNumberFontColorButton->setSizePolicy(sizePolicy1); + lineNumberFontColorButton->setMinimumSize(QSize(23, 23)); + lineNumberFontColorButton->setMaximumSize(QSize(23, 23)); + lineNumberFontColorButton->setBaseSize(QSize(0, 0)); + lineNumberFontColorButton->setFocusPolicy(Qt::NoFocus); + lineNumberFontColorButton->setAutoDefault(false); + lineNumberFontColorButton->setFlat(false); + + gridLayout_4->addWidget(lineNumberFontColorButton, 3, 1, 1, 1); + + + verticalLayout_5->addLayout(gridLayout_4); + + label_8 = new QLabel(groupBox_2); + label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + verticalLayout_5->addWidget(label_8); + + horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + verticalLayout_5->addItem(horizontalSpacer_6); + + verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + verticalLayout_5->addItem(verticalSpacer_4); + + + gridLayout->addWidget(groupBox_2, 0, 0, 1, 1); + + tabWidget->addTab(colorsTab, QString()); + buildTab = new QWidget(); + buildTab->setObjectName(QString::fromUtf8("buildTab")); + verticalLayout_6 = new QVBoxLayout(buildTab); + verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6")); + formLayout = new QFormLayout(); + formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); + formLayout->setHorizontalSpacing(12); + formLayout->setVerticalSpacing(12); + formLayout->setContentsMargins(-1, -1, -1, 0); + modeLabel = new QLabel(buildTab); + modeLabel->setObjectName(QString::fromUtf8("modeLabel")); + + formLayout->setWidget(0, QFormLayout::LabelRole, modeLabel); + + horizontalLayout_3 = new QHBoxLayout(); + horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + x86RadioButton = new QRadioButton(buildTab); + buttonGroup_2 = new QButtonGroup(SettingsWindow); + buttonGroup_2->setObjectName(QString::fromUtf8("buttonGroup_2")); + buttonGroup_2->addButton(x86RadioButton); + x86RadioButton->setObjectName(QString::fromUtf8("x86RadioButton")); + x86RadioButton->setChecked(true); + + horizontalLayout_3->addWidget(x86RadioButton); + + x64RadioButton = new QRadioButton(buildTab); + buttonGroup_2->addButton(x64RadioButton); + x64RadioButton->setObjectName(QString::fromUtf8("x64RadioButton")); + x64RadioButton->setChecked(false); + + horizontalLayout_3->addWidget(x64RadioButton); + + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_3->addItem(horizontalSpacer); + + + formLayout->setLayout(0, QFormLayout::FieldRole, horizontalLayout_3); + + assemblerLabel = new QLabel(buildTab); + assemblerLabel->setObjectName(QString::fromUtf8("assemblerLabel")); + + formLayout->setWidget(1, QFormLayout::LabelRole, assemblerLabel); + + horizontalLayout_6 = new QHBoxLayout(); + horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6")); + nasmRadioButton = new QRadioButton(buildTab); + buttonGroup = new QButtonGroup(SettingsWindow); + buttonGroup->setObjectName(QString::fromUtf8("buttonGroup")); + buttonGroup->addButton(nasmRadioButton); + nasmRadioButton->setObjectName(QString::fromUtf8("nasmRadioButton")); + nasmRadioButton->setChecked(true); + + horizontalLayout_6->addWidget(nasmRadioButton); + + gasRadioButton = new QRadioButton(buildTab); + buttonGroup->addButton(gasRadioButton); + gasRadioButton->setObjectName(QString::fromUtf8("gasRadioButton")); + + horizontalLayout_6->addWidget(gasRadioButton); + + fasmRadioButton = new QRadioButton(buildTab); + buttonGroup->addButton(fasmRadioButton); + fasmRadioButton->setObjectName(QString::fromUtf8("fasmRadioButton")); + + horizontalLayout_6->addWidget(fasmRadioButton); + + masmRadioButton = new QRadioButton(buildTab); + buttonGroup->addButton(masmRadioButton); + masmRadioButton->setObjectName(QString::fromUtf8("masmRadioButton")); + + horizontalLayout_6->addWidget(masmRadioButton); + + horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_6->addItem(horizontalSpacer_8); + + + formLayout->setLayout(1, QFormLayout::FieldRole, horizontalLayout_6); + + assemblyLabel = new QLabel(buildTab); + assemblyLabel->setObjectName(QString::fromUtf8("assemblyLabel")); + + formLayout->setWidget(2, QFormLayout::LabelRole, assemblyLabel); + + assemblyOptionsEdit = new QLineEdit(buildTab); + assemblyOptionsEdit->setObjectName(QString::fromUtf8("assemblyOptionsEdit")); + + formLayout->setWidget(2, QFormLayout::FieldRole, assemblyOptionsEdit); + + linkingLabel = new QLabel(buildTab); + linkingLabel->setObjectName(QString::fromUtf8("linkingLabel")); + + formLayout->setWidget(3, QFormLayout::LabelRole, linkingLabel); + + linkingOptionsEdit = new QLineEdit(buildTab); + linkingOptionsEdit->setObjectName(QString::fromUtf8("linkingOptionsEdit")); + + formLayout->setWidget(3, QFormLayout::FieldRole, linkingOptionsEdit); + + assemblerPathLabel = new QLabel(buildTab); + assemblerPathLabel->setObjectName(QString::fromUtf8("assemblerPathLabel")); + + formLayout->setWidget(4, QFormLayout::LabelRole, assemblerPathLabel); + + assemblerPathEdit = new QLineEdit(buildTab); + assemblerPathEdit->setObjectName(QString::fromUtf8("assemblerPathEdit")); + + formLayout->setWidget(4, QFormLayout::FieldRole, assemblerPathEdit); + + linkerPathLabel = new QLabel(buildTab); + linkerPathLabel->setObjectName(QString::fromUtf8("linkerPathLabel")); + + formLayout->setWidget(5, QFormLayout::LabelRole, linkerPathLabel); + + linkerPathEdit = new QLineEdit(buildTab); + linkerPathEdit->setObjectName(QString::fromUtf8("linkerPathEdit")); + + formLayout->setWidget(5, QFormLayout::FieldRole, linkerPathEdit); + + objectFileNameLabel = new QLabel(buildTab); + objectFileNameLabel->setObjectName(QString::fromUtf8("objectFileNameLabel")); + + formLayout->setWidget(6, QFormLayout::LabelRole, objectFileNameLabel); + + objectFileNameEdit = new QLineEdit(buildTab); + objectFileNameEdit->setObjectName(QString::fromUtf8("objectFileNameEdit")); + + formLayout->setWidget(6, QFormLayout::FieldRole, objectFileNameEdit); + + gdbPathLabel = new QLabel(buildTab); + gdbPathLabel->setObjectName(QString::fromUtf8("gdbPathLabel")); + + formLayout->setWidget(7, QFormLayout::LabelRole, gdbPathLabel); + + gdbPathEdit = new QLineEdit(buildTab); + gdbPathEdit->setObjectName(QString::fromUtf8("gdbPathEdit")); + + formLayout->setWidget(7, QFormLayout::FieldRole, gdbPathEdit); + + assemblerWorkingDirectoryLabel = new QLabel(buildTab); + assemblerWorkingDirectoryLabel->setObjectName(QString::fromUtf8("assemblerWorkingDirectoryLabel")); + + formLayout->setWidget(11, QFormLayout::LabelRole, assemblerWorkingDirectoryLabel); + + runInCurrentDirectoryCheckbox = new QCheckBox(buildTab); + runInCurrentDirectoryCheckbox->setObjectName(QString::fromUtf8("runInCurrentDirectoryCheckbox")); + runInCurrentDirectoryCheckbox->setEnabled(true); + + formLayout->setWidget(11, QFormLayout::FieldRole, runInCurrentDirectoryCheckbox); + + disableLinkingLabel = new QLabel(buildTab); + disableLinkingLabel->setObjectName(QString::fromUtf8("disableLinkingLabel")); + + formLayout->setWidget(12, QFormLayout::LabelRole, disableLinkingLabel); + + disableLinkingCheckbox = new QCheckBox(buildTab); + disableLinkingCheckbox->setObjectName(QString::fromUtf8("disableLinkingCheckbox")); + disableLinkingCheckbox->setEnabled(true); + + formLayout->setWidget(12, QFormLayout::FieldRole, disableLinkingCheckbox); + + gdbVerboseLabel = new QLabel(buildTab); + gdbVerboseLabel->setObjectName(QString::fromUtf8("gdbVerboseLabel")); + + formLayout->setWidget(10, QFormLayout::LabelRole, gdbVerboseLabel); + + gdbVerboseCheckBox = new QCheckBox(buildTab); + gdbVerboseCheckBox->setObjectName(QString::fromUtf8("gdbVerboseCheckBox")); + + formLayout->setWidget(10, QFormLayout::FieldRole, gdbVerboseCheckBox); + + + verticalLayout_6->addLayout(formLayout); + + infoLabel = new QLabel(buildTab); + infoLabel->setObjectName(QString::fromUtf8("infoLabel")); + infoLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); + + verticalLayout_6->addWidget(infoLabel); + + tabWidget->addTab(buildTab, QString()); + + verticalLayout->addWidget(tabWidget); + + buttonBox = new QDialogButtonBox(SettingsWindow); + buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + + verticalLayout->addWidget(buttonBox); + + QWidget::setTabOrder(startWindow, fontSizeSpinBox); + QWidget::setTabOrder(fontSizeSpinBox, fontComboBox); + QWidget::setTabOrder(fontComboBox, resetAllButton); + QWidget::setTabOrder(resetAllButton, language); + + retranslateUi(SettingsWindow); + + tabWidget->setCurrentIndex(2); + quotationColorButton->setDefault(false); + systemColorButton->setDefault(false); + commentsColorButton_2->setDefault(false); + keywordsColorButton->setDefault(false); + keywordsColorButton_2->setDefault(false); + iomacroColorButton_2->setDefault(false); + labelsColorButton->setDefault(false); + quotationColorButton_2->setDefault(false); + memoryColorButton->setDefault(false); + systemColorButton_2->setDefault(false); + labelsColorButton_2->setDefault(false); + iomacroColorButton->setDefault(false); + registersColorButton_2->setDefault(false); + numbersColorButton->setDefault(false); + commentsColorButton->setDefault(false); + memoryColorButton_2->setDefault(false); + registersColorButton->setDefault(false); + numbersColorButton_2->setDefault(false); + fontColorButton->setDefault(false); + debugLineColorButton->setDefault(false); + currentLineColorButton->setDefault(false); + backgroundColorButton->setDefault(false); + lineNumberPanelColorButton->setDefault(false); + lineNumberFontColorButton->setDefault(false); + + + QMetaObject::connectSlotsByName(SettingsWindow); + } // setupUi + + void retranslateUi(QWidget *SettingsWindow) + { + SettingsWindow->setWindowTitle(QApplication::translate("SettingsWindow", "Settings", nullptr)); + settingsLabel->setText(QApplication::translate("SettingsWindow", "SASM Options", nullptr)); + commonSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); + startWindowLabel->setText(QApplication::translate("SettingsWindow", "On start:", nullptr)); + startWindow->setItemText(0, QApplication::translate("SettingsWindow", "Open get started window", nullptr)); + startWindow->setItemText(1, QApplication::translate("SettingsWindow", "Restore previous session", nullptr)); + + languageLabel->setText(QApplication::translate("SettingsWindow", "Language:", nullptr)); + language->setItemText(6, QApplication::translate("SettingsWindow", "Polski", nullptr)); + language->setItemText(7, QApplication::translate("SettingsWindow", "\327\242\327\221\327\250\327\231\327\252", nullptr)); + language->setItemText(8, QApplication::translate("SettingsWindow", "Espa\303\261ol", nullptr)); + + label_4->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + registersLabel_2->setText(QApplication::translate("SettingsWindow", "Show all registers in debug:", nullptr)); + registersYesRadioButton->setText(QApplication::translate("SettingsWindow", "Yes", nullptr)); + registersNoRadioButton->setText(QApplication::translate("SettingsWindow", "No, show only general purpose", nullptr)); + insertDebugStringLabel->setText(QApplication::translate("SettingsWindow", "Insert debug string:", nullptr)); + insertDebugStringCheckBox->setText(QString()); + codeSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Code editor", nullptr)); + fontLabel->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); + fontSizeLabel->setText(QApplication::translate("SettingsWindow", "Size:", nullptr)); + label->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + label_2->setText(QApplication::translate("SettingsWindow", "Default code editor text:", nullptr)); + resetAllButton->setText(QApplication::translate("SettingsWindow", "Reset all (need a restart)...", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(commonTab), QApplication::translate("SettingsWindow", "Common", nullptr)); + groupBox->setTitle(QApplication::translate("SettingsWindow", "Syntax highlighting", nullptr)); + iomacroBoldCheckBox->setText(QString()); + systemLabel->setText(QApplication::translate("SettingsWindow", "System:", nullptr)); + quotationColorButton->setText(QString()); + systemColorButton->setText(QString()); + numbersItalicCheckBox->setText(QString()); + label_6->setText(QApplication::translate("SettingsWindow", "Bold:", nullptr)); + numbersBoldCheckBox->setText(QString()); + label_7->setText(QApplication::translate("SettingsWindow", "Italic:", nullptr)); + label_3->setText(QApplication::translate("SettingsWindow", "Foreground:", nullptr)); + systemItalicCheckBox->setText(QString()); + commentsColorButton_2->setText(QString()); + keywordsColorButton->setText(QString()); + commentsBoldCheckBox->setText(QString()); + keywordsColorButton_2->setText(QString()); + iomacroColorButton_2->setText(QString()); + memoryItalicCheckBox->setText(QString()); + keywordsLabel->setText(QApplication::translate("SettingsWindow", "Keywords:", nullptr)); + label_5->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); + labelsColorButton->setText(QString()); + numbersLabel->setText(QApplication::translate("SettingsWindow", "Numbers:", nullptr)); + quotationColorButton_2->setText(QString()); + labelsLabel->setText(QApplication::translate("SettingsWindow", "Labels:", nullptr)); + commentsLabel->setText(QApplication::translate("SettingsWindow", "Comments:", nullptr)); + memoryColorButton->setText(QString()); + systemColorButton_2->setText(QString()); + iomacroLabel_2->setText(QApplication::translate("SettingsWindow", "Quotation:", nullptr)); + labelsColorButton_2->setText(QString()); + registersBoldCheckBox->setText(QString()); + quotationBoldCheckBox->setText(QString()); + iomacroColorButton->setText(QString()); + iomacroItalicCheckBox->setText(QString()); + registersColorButton_2->setText(QString()); + keywordsBoldCheckBox->setText(QString()); + memoryBoldCheckBox->setText(QString()); + numbersColorButton->setText(QString()); + quotationItalicCheckBox->setText(QString()); + commentsColorButton->setText(QString()); + labelsItalicCheckBox->setText(QString()); + memoryLabel->setText(QApplication::translate("SettingsWindow", "Memory:", nullptr)); + iomacroLabel->setText(QApplication::translate("SettingsWindow", "I/O macro:", nullptr)); + keywordsItalicCheckBox->setText(QString()); + registersLabel->setText(QApplication::translate("SettingsWindow", "Registers:", nullptr)); + commentsItalicCheckBox->setText(QString()); + labelsBoldCheckBox->setText(QString()); + registersItalicCheckBox->setText(QString()); + systemBoldCheckBox->setText(QString()); + memoryColorButton_2->setText(QString()); + registersColorButton->setText(QString()); + numbersColorButton_2->setText(QString()); + groupBox_2->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); + fontLabel_2->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); + fontColorButton->setText(QString()); + currentLineCheckBox->setText(QApplication::translate("SettingsWindow", "Enable highlighting", nullptr)); + debugLineColorButton->setText(QString()); + currentLineLabel->setText(QApplication::translate("SettingsWindow", "Current line:", nullptr)); + debugLineLabel->setText(QApplication::translate("SettingsWindow", "Debugging line:", nullptr)); + currentLineColorButton->setText(QString()); + backgroundLabel->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); + backgroundColorButton->setText(QString()); + lineNumberPanelLabel->setText(QApplication::translate("SettingsWindow", "Line number panel:", nullptr)); + lineNumberPanelColorButton->setText(QString()); + lineNumberFontLabel->setText(QApplication::translate("SettingsWindow", "Line number font:", nullptr)); + lineNumberFontColorButton->setText(QString()); + label_8->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(colorsTab), QApplication::translate("SettingsWindow", "Colors", nullptr)); + modeLabel->setText(QApplication::translate("SettingsWindow", "Mode:", nullptr)); + x86RadioButton->setText(QApplication::translate("SettingsWindow", "x86", nullptr)); + x64RadioButton->setText(QApplication::translate("SettingsWindow", "x64", nullptr)); + assemblerLabel->setText(QApplication::translate("SettingsWindow", "Assembler:", nullptr)); + nasmRadioButton->setText(QApplication::translate("SettingsWindow", "NASM", nullptr)); + gasRadioButton->setText(QApplication::translate("SettingsWindow", "GAS", nullptr)); + fasmRadioButton->setText(QApplication::translate("SettingsWindow", "FASM", nullptr)); + masmRadioButton->setText(QApplication::translate("SettingsWindow", "MASM", nullptr)); + assemblyLabel->setText(QApplication::translate("SettingsWindow", "Assembly options:", nullptr)); + linkingLabel->setText(QApplication::translate("SettingsWindow", "Linking options:", nullptr)); + assemblerPathLabel->setText(QApplication::translate("SettingsWindow", "Assembler path:", nullptr)); + linkerPathLabel->setText(QApplication::translate("SettingsWindow", "Linker path:", nullptr)); + objectFileNameLabel->setText(QApplication::translate("SettingsWindow", "Object file name:", nullptr)); + gdbPathLabel->setText(QApplication::translate("SettingsWindow", "GDB path (Unix only):", nullptr)); + assemblerWorkingDirectoryLabel->setText(QApplication::translate("SettingsWindow", "Build in current directory:", nullptr)); + runInCurrentDirectoryCheckbox->setText(QString()); + disableLinkingLabel->setText(QApplication::translate("SettingsWindow", "Disable linking:", nullptr)); + disableLinkingCheckbox->setText(QString()); + gdbVerboseLabel->setText(QApplication::translate("SettingsWindow", "GDB verbose output:", nullptr)); + gdbVerboseCheckBox->setText(QString()); + infoLabel->setText(QString()); + tabWidget->setTabText(tabWidget->indexOf(buildTab), QApplication::translate("SettingsWindow", "Build", nullptr)); + } // retranslateUi + +}; + +namespace Ui { + class SettingsWindow: public Ui_SettingsWindow {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_SETTINGS_H From aaa78cad105c000786c5de92fa8f259e7769667b Mon Sep 17 00:00:00 2001 From: Martin Schreiber Date: Tue, 26 Nov 2019 13:56:59 +0100 Subject: [PATCH 03/86] Added SASM verbose output for executed commands --- mainwindow.cpp | 22 +++++++++++++++------- settings.ui | 10 +++++----- ui_settings.h | 16 ++++++++-------- 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 948c839a..c1b2df4f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -870,6 +870,10 @@ void MainWindow::buildProgram(bool debugMode) } else { assemblerProcess.setWorkingDirectory(applicationDataPath() + "/include"); } + + if (settings.value("sasmverbose", false).toBool()) + printLog("Assembler: "+assemblerPath+" "+assemblerArguments.join(" ")+"\n", Qt::darkGreen); + assemblerProcess.start(assemblerPath, assemblerArguments); assemblerProcess.waitForFinished(); @@ -925,6 +929,10 @@ void MainWindow::buildProgram(bool debugMode) linkerOutput = Common::pathInTemp("linkererror.txt"); linkerProcess.setStandardOutputFile(linkerOutput); linkerProcess.setStandardErrorFile(linkerOutput, QIODevice::Append); + + if (settings.value("sasmverbose", false).toBool()) + printLog("Linker: "+linker+" "+linkerArguments.join(" ")+"\n", Qt::darkGreen); + linkerProcess.start(linker, linkerArguments); linkerProcess.waitForFinished(); @@ -1138,7 +1146,7 @@ void MainWindow::debug() QString gdbpath = settings.value("gdbpath", "gdb").toString(); - debugger = new Debugger(compilerOut, path, Common::pathInTemp(QString()), assembler, gdbpath, 0, settings.value("gdbverbose", false).toBool()); + debugger = new Debugger(compilerOut, path, Common::pathInTemp(QString()), assembler, gdbpath, 0, settings.value("sasmverbose", false).toBool()); // connect print signals for output in Debugger connect(debugger, SIGNAL(printLog(QString,QColor)), this, SLOT(printLog(QString,QColor))); @@ -1833,7 +1841,7 @@ void MainWindow::initAssemblerSettings(bool firstOpening) settingsUi.disableLinkingCheckbox->setChecked(settings.value("disablelinking", false).toBool()); - settingsUi.gdbVerboseCheckBox->setChecked(settings.value("gdbverbose", false).toBool()); + settingsUi.sasmVerboseCheckBox->setChecked(settings.value("sasmverbose", false).toBool()); settingsUi.runInCurrentDirectoryCheckbox->setChecked(settings.value("currentdir", false).toBool()); @@ -1973,7 +1981,7 @@ void MainWindow::recreateAssembler(bool start) settingsUi.linkingOptionsEdit->setText(assembler->getLinkerOptions()); settingsUi.objectFileNameEdit->setText("program.o"); settingsUi.disableLinkingCheckbox->setChecked(false); - settingsUi.gdbVerboseCheckBox->setChecked(false); + settingsUi.sasmVerboseCheckBox->setChecked(false); settingsUi.runInCurrentDirectoryCheckbox->setChecked(false); settingsUi.assemblerPathEdit->setText(assembler->getAssemblerPath()); settingsUi.gdbPathEdit->setText("gdb"); @@ -1983,7 +1991,7 @@ void MainWindow::recreateAssembler(bool start) settings.setValue("objectfilename", "program.o"); settings.setValue("disablelinking", false); settings.setValue("currentdir", false); - settings.setValue("gdbverbose", false); + settings.setValue("sasmverbose", false); settings.setValue("gdbpath", "gdb"); settings.setValue("assemblerpath", assembler->getAssemblerPath()); settings.setValue("linkerpath", assembler->getLinkerPath()); @@ -2007,7 +2015,7 @@ void MainWindow::backupSettings() backupLinkerOptions = settings.value("linkingoptions", assembler->getLinkerOptions()).toString(); backupObjectFileName = settings.value("objectfilename", "program.o").toString(); backupGDBPath = settings.value("gdbpath", "gdb").toString(); - backupGDBVerbose = settings.value("gdbverbose", false).toBool(); + backupGDBVerbose = settings.value("sasmverbose", false).toBool(); backupDisableLinking = settings.value("disablelinking", false).toBool(); backupCurrentDir = settings.value("currentdir", false).toBool(); backupStartText = settings.value("starttext", assembler->getStartText()).toString(); @@ -2025,7 +2033,7 @@ void MainWindow::restoreSettingsAndExit() settings.setValue("objectfilename", backupObjectFileName); settings.setValue("disablelinking", backupDisableLinking); settings.setValue("gdbpath", backupGDBPath); - settings.setValue("gdbverbose", backupGDBVerbose); + settings.setValue("sasmverbose", backupGDBVerbose); settings.setValue("currentdir", backupCurrentDir); settings.setValue("starttext", backupStartText); settings.setValue("linkerpath", backupLinkerPath); @@ -2070,7 +2078,7 @@ void MainWindow::saveSettings() settings.setValue("linkingoptions", settingsUi.linkingOptionsEdit->text()); settings.setValue("objectfilename", settingsUi.objectFileNameEdit->text()); settings.setValue("disablelinking", settingsUi.disableLinkingCheckbox->isChecked()); - settings.setValue("gdbverbose", settingsUi.gdbVerboseCheckBox->isChecked()); + settings.setValue("sasmverbose", settingsUi.sasmVerboseCheckBox->isChecked()); settings.setValue("currentdir", settingsUi.runInCurrentDirectoryCheckbox->isChecked()); settings.setValue("assemblerpath", settingsUi.assemblerPathEdit->text()); settings.setValue("gdbpath", settingsUi.gdbPathEdit->text()); diff --git a/settings.ui b/settings.ui index 0eb8d371..576c5a0a 100644 --- a/settings.ui +++ b/settings.ui @@ -6,8 +6,8 @@ 0 0 - 1439 - 947 + 1702 + 971 @@ -2175,12 +2175,12 @@ - GDB verbose output: + SASM verbose mode: - + @@ -2222,7 +2222,7 @@ - + diff --git a/ui_settings.h b/ui_settings.h index 18d4c542..b1a39970 100644 --- a/ui_settings.h +++ b/ui_settings.h @@ -184,18 +184,18 @@ class Ui_SettingsWindow QLabel *disableLinkingLabel; QCheckBox *disableLinkingCheckbox; QLabel *gdbVerboseLabel; - QCheckBox *gdbVerboseCheckBox; + QCheckBox *sasmVerboseCheckBox; QLabel *infoLabel; QDialogButtonBox *buttonBox; QButtonGroup *buttonGroup; - QButtonGroup *buttonGroup_3; QButtonGroup *buttonGroup_2; + QButtonGroup *buttonGroup_3; void setupUi(QWidget *SettingsWindow) { if (SettingsWindow->objectName().isEmpty()) SettingsWindow->setObjectName(QString::fromUtf8("SettingsWindow")); - SettingsWindow->resize(1439, 947); + SettingsWindow->resize(1702, 971); verticalLayout = new QVBoxLayout(SettingsWindow); verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); settingsLabel = new QLabel(SettingsWindow); @@ -1189,10 +1189,10 @@ class Ui_SettingsWindow formLayout->setWidget(10, QFormLayout::LabelRole, gdbVerboseLabel); - gdbVerboseCheckBox = new QCheckBox(buildTab); - gdbVerboseCheckBox->setObjectName(QString::fromUtf8("gdbVerboseCheckBox")); + sasmVerboseCheckBox = new QCheckBox(buildTab); + sasmVerboseCheckBox->setObjectName(QString::fromUtf8("sasmVerboseCheckBox")); - formLayout->setWidget(10, QFormLayout::FieldRole, gdbVerboseCheckBox); + formLayout->setWidget(10, QFormLayout::FieldRole, sasmVerboseCheckBox); verticalLayout_6->addLayout(formLayout); @@ -1361,8 +1361,8 @@ class Ui_SettingsWindow runInCurrentDirectoryCheckbox->setText(QString()); disableLinkingLabel->setText(QApplication::translate("SettingsWindow", "Disable linking:", nullptr)); disableLinkingCheckbox->setText(QString()); - gdbVerboseLabel->setText(QApplication::translate("SettingsWindow", "GDB verbose output:", nullptr)); - gdbVerboseCheckBox->setText(QString()); + gdbVerboseLabel->setText(QApplication::translate("SettingsWindow", "SASM verbose mode:", nullptr)); + sasmVerboseCheckBox->setText(QString()); infoLabel->setText(QString()); tabWidget->setTabText(tabWidget->indexOf(buildTab), QApplication::translate("SettingsWindow", "Build", nullptr)); } // retranslateUi From ea1a576d744104a1b2b4462fa2bc975910535165 Mon Sep 17 00:00:00 2001 From: Martin Schreiber Date: Tue, 26 Nov 2019 14:06:55 +0100 Subject: [PATCH 04/86] removed obsolete error msg --- debugger.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/debugger.cpp b/debugger.cpp index 5824fa8e..17d71cd2 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -212,6 +212,8 @@ void Debugger::processMessage(QString output, QString error) done. (gdb)*/ +#if 0 + // not required anymore, since GDB can be specified if (output.indexOf(QString(") 8.1.")) != -1) { actionTypeQueue.enqueue(anyAction); processAction(tr("GDB 8.1 not supported due to buggy implementation (b main [newline] run not producing a break). Please use a different version.")); @@ -219,6 +221,7 @@ void Debugger::processMessage(QString output, QString error) emit finished(); return; } +#endif c++; doInput(QString("disas main\n"), none); From 4b5b7b8bf9cff42b5086442cac666b61d44709df Mon Sep 17 00:00:00 2001 From: Martin SCHREIBER Date: Mon, 18 Jan 2021 17:47:22 +0100 Subject: [PATCH 05/86] updates REAME file --- README.txt | 2 + SASM.pro | 1 + moc_predefs.h | 390 -------------- ui_settings.h | 1378 ------------------------------------------------- 4 files changed, 3 insertions(+), 1768 deletions(-) delete mode 100644 moc_predefs.h delete mode 100644 ui_settings.h diff --git a/README.txt b/README.txt index faccf314..fe78eb8e 100644 --- a/README.txt +++ b/README.txt @@ -24,6 +24,8 @@ You need: libxcb-render0 libxcb-icccm4 + + Download sources and unpack their. Go to directory with their: "cd " Further print commands: diff --git a/SASM.pro b/SASM.pro index 6e99b538..391369fe 100644 --- a/SASM.pro +++ b/SASM.pro @@ -4,6 +4,7 @@ # #------------------------------------------------- + QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets diff --git a/moc_predefs.h b/moc_predefs.h deleted file mode 100644 index b5acf688..00000000 --- a/moc_predefs.h +++ /dev/null @@ -1,390 +0,0 @@ -#define __SSP_STRONG__ 3 -#define __DBL_MIN_EXP__ (-1021) -#define __FLT32X_MAX_EXP__ 1024 -#define __cpp_attributes 200809 -#define __UINT_LEAST16_MAX__ 0xffff -#define __ATOMIC_ACQUIRE 2 -#define __FLT128_MAX_10_EXP__ 4932 -#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F -#define __GCC_IEC_559_COMPLEX 2 -#define __cpp_aggregate_nsdmi 201304 -#define __UINT_LEAST8_TYPE__ unsigned char -#define __SIZEOF_FLOAT80__ 16 -#define __INTMAX_C(c) c ## L -#define __CHAR_BIT__ 8 -#define __UINT8_MAX__ 0xff -#define __WINT_MAX__ 0xffffffffU -#define __FLT32_MIN_EXP__ (-125) -#define __cpp_static_assert 200410 -#define __ORDER_LITTLE_ENDIAN__ 1234 -#define __SIZE_MAX__ 0xffffffffffffffffUL -#define __WCHAR_MAX__ 0x7fffffff -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 -#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 -#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 -#define __GCC_IEC_559 2 -#define __FLT32X_DECIMAL_DIG__ 17 -#define __FLT_EVAL_METHOD__ 0 -#define __unix__ 1 -#define __cpp_binary_literals 201304 -#define __FLT64_DECIMAL_DIG__ 17 -#define __CET__ 3 -#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 -#define __x86_64 1 -#define __cpp_variadic_templates 200704 -#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL -#define __SIG_ATOMIC_TYPE__ int -#define __DBL_MIN_10_EXP__ (-307) -#define __FINITE_MATH_ONLY__ 0 -#define __cpp_variable_templates 201304 -#define __GNUC_PATCHLEVEL__ 1 -#define __FLT32_HAS_DENORM__ 1 -#define __UINT_FAST8_MAX__ 0xff -#define __cpp_rvalue_reference 200610 -#define __has_include(STR) __has_include__(STR) -#define __DEC64_MAX_EXP__ 385 -#define __INT8_C(c) c -#define __INT_LEAST8_WIDTH__ 8 -#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL -#define __SHRT_MAX__ 0x7fff -#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L -#define __FLT64X_MAX_10_EXP__ 4932 -#define __UINT_LEAST8_MAX__ 0xff -#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 -#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 -#define __UINTMAX_TYPE__ long unsigned int -#define __linux 1 -#define __DEC32_EPSILON__ 1E-6DF -#define __FLT_EVAL_METHOD_TS_18661_3__ 0 -#define __unix 1 -#define __UINT32_MAX__ 0xffffffffU -#define __GXX_EXPERIMENTAL_CXX0X__ 1 -#define __LDBL_MAX_EXP__ 16384 -#define __FLT128_MIN_EXP__ (-16381) -#define __WINT_MIN__ 0U -#define __linux__ 1 -#define __FLT128_MIN_10_EXP__ (-4931) -#define __INT_LEAST16_WIDTH__ 16 -#define __SCHAR_MAX__ 0x7f -#define __FLT128_MANT_DIG__ 113 -#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) -#define __INT64_C(c) c ## L -#define __DBL_DIG__ 15 -#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 -#define __FLT64X_MANT_DIG__ 64 -#define __SIZEOF_INT__ 4 -#define __SIZEOF_POINTER__ 8 -#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 -#define __USER_LABEL_PREFIX__ -#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x -#define __STDC_HOSTED__ 1 -#define __LDBL_HAS_INFINITY__ 1 -#define __FLT32_DIG__ 6 -#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F -#define __GXX_WEAK__ 1 -#define __SHRT_WIDTH__ 16 -#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L -#define __DEC32_MAX__ 9.999999E96DF -#define __cpp_threadsafe_static_init 200806 -#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x -#define __FLT32X_HAS_INFINITY__ 1 -#define __INT32_MAX__ 0x7fffffff -#define __INT_WIDTH__ 32 -#define __SIZEOF_LONG__ 8 -#define __STDC_IEC_559__ 1 -#define __STDC_ISO_10646__ 201706L -#define __UINT16_C(c) c -#define __PTRDIFF_WIDTH__ 64 -#define __DECIMAL_DIG__ 21 -#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 -#define __gnu_linux__ 1 -#define __INTMAX_WIDTH__ 64 -#define __FLT64_MIN_EXP__ (-1021) -#define __has_include_next(STR) __has_include_next__(STR) -#define __FLT64X_MIN_10_EXP__ (-4931) -#define __LDBL_HAS_QUIET_NAN__ 1 -#define __FLT64_MANT_DIG__ 53 -#define __GNUC__ 9 -#define __GXX_RTTI 1 -#define __pie__ 2 -#define __MMX__ 1 -#define __cpp_delegating_constructors 200604 -#define __FLT_HAS_DENORM__ 1 -#define __SIZEOF_LONG_DOUBLE__ 16 -#define __BIGGEST_ALIGNMENT__ 16 -#define __STDC_UTF_16__ 1 -#define __FLT64_MAX_10_EXP__ 308 -#define __FLT32_HAS_INFINITY__ 1 -#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) -#define __cpp_raw_strings 200710 -#define __INT_FAST32_MAX__ 0x7fffffffffffffffL -#define __DBL_HAS_INFINITY__ 1 -#define __HAVE_SPECULATION_SAFE_VALUE 1 -#define __DEC32_MIN_EXP__ (-94) -#define __INTPTR_WIDTH__ 64 -#define __FLT32X_HAS_DENORM__ 1 -#define __INT_FAST16_TYPE__ long int -#define __LDBL_HAS_DENORM__ 1 -#define __cplusplus 201402L -#define __cpp_ref_qualifiers 200710 -#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL -#define __INT_LEAST32_MAX__ 0x7fffffff -#define __DEC32_MIN__ 1E-95DF -#define __DEPRECATED 1 -#define __cpp_rvalue_references 200610 -#define __DBL_MAX_EXP__ 1024 -#define __WCHAR_WIDTH__ 32 -#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 -#define __DEC128_EPSILON__ 1E-33DL -#define __SSE2_MATH__ 1 -#define __ATOMIC_HLE_RELEASE 131072 -#define __PTRDIFF_MAX__ 0x7fffffffffffffffL -#define __amd64 1 -#define __ATOMIC_HLE_ACQUIRE 65536 -#define __FLT32_HAS_QUIET_NAN__ 1 -#define __GNUG__ 9 -#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL -#define __SIZEOF_SIZE_T__ 8 -#define __cpp_nsdmi 200809 -#define __FLT64X_MIN_EXP__ (-16381) -#define __SIZEOF_WINT_T__ 4 -#define __LONG_LONG_WIDTH__ 64 -#define __cpp_initializer_lists 200806 -#define __FLT32_MAX_EXP__ 128 -#define __cpp_hex_float 201603 -#define __GCC_HAVE_DWARF2_CFI_ASM 1 -#define __GXX_ABI_VERSION 1013 -#define __FLT128_HAS_INFINITY__ 1 -#define __FLT_MIN_EXP__ (-125) -#define __cpp_lambdas 200907 -#define __FLT64X_HAS_QUIET_NAN__ 1 -#define __INT_FAST64_TYPE__ long int -#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 -#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) -#define __PIE__ 2 -#define __LP64__ 1 -#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x -#define __DECIMAL_BID_FORMAT__ 1 -#define __FLT64_MIN_10_EXP__ (-307) -#define __FLT64X_DECIMAL_DIG__ 21 -#define __DEC128_MIN__ 1E-6143DL -#define __REGISTER_PREFIX__ -#define __UINT16_MAX__ 0xffff -#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 -#define __UINT8_TYPE__ unsigned char -#define __NO_INLINE__ 1 -#define __FLT_MANT_DIG__ 24 -#define __LDBL_DECIMAL_DIG__ 21 -#define __VERSION__ "9.2.1 20191008" -#define __UINT64_C(c) c ## UL -#define __cpp_unicode_characters 200704 -#define _STDC_PREDEF_H 1 -#define __cpp_decltype_auto 201304 -#define __GCC_ATOMIC_INT_LOCK_FREE 2 -#define __FLT128_MAX_EXP__ 16384 -#define __FLT32_MANT_DIG__ 24 -#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __STDC_IEC_559_COMPLEX__ 1 -#define __FLT128_HAS_DENORM__ 1 -#define __FLT128_DIG__ 33 -#define __SCHAR_WIDTH__ 8 -#define __INT32_C(c) c -#define __DEC64_EPSILON__ 1E-15DD -#define __ORDER_PDP_ENDIAN__ 3412 -#define __DEC128_MIN_EXP__ (-6142) -#define __FLT32_MAX_10_EXP__ 38 -#define __INT_FAST32_TYPE__ long int -#define __UINT_LEAST16_TYPE__ short unsigned int -#define __FLT64X_HAS_INFINITY__ 1 -#define unix 1 -#define __DBL_HAS_DENORM__ 1 -#define __INT16_MAX__ 0x7fff -#define __cpp_rtti 199711 -#define __SIZE_TYPE__ long unsigned int -#define __UINT64_MAX__ 0xffffffffffffffffUL -#define __FLT64X_DIG__ 18 -#define __INT8_TYPE__ signed char -#define __cpp_digit_separators 201309 -#define __ELF__ 1 -#define __GCC_ASM_FLAG_OUTPUTS__ 1 -#define __FLT_RADIX__ 2 -#define __INT_LEAST16_TYPE__ short int -#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L -#define __UINTMAX_C(c) c ## UL -#define __GLIBCXX_BITSIZE_INT_N_0 128 -#define __k8 1 -#define __SIG_ATOMIC_MAX__ 0x7fffffff -#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 -#define __SIZEOF_PTRDIFF_T__ 8 -#define __FLT32X_MANT_DIG__ 53 -#define __x86_64__ 1 -#define __FLT32X_MIN_EXP__ (-1021) -#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF -#define __INT_FAST16_MAX__ 0x7fffffffffffffffL -#define __FLT64_DIG__ 15 -#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL -#define __UINT_LEAST64_TYPE__ long unsigned int -#define __FLT_HAS_QUIET_NAN__ 1 -#define __FLT_MAX_10_EXP__ 38 -#define __LONG_MAX__ 0x7fffffffffffffffL -#define __FLT64X_HAS_DENORM__ 1 -#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL -#define __FLT_HAS_INFINITY__ 1 -#define __cpp_unicode_literals 200710 -#define __UINT_FAST16_TYPE__ long unsigned int -#define __DEC64_MAX__ 9.999999999999999E384DD -#define __INT_FAST32_WIDTH__ 64 -#define __CHAR16_TYPE__ short unsigned int -#define __PRAGMA_REDEFINE_EXTNAME 1 -#define __SIZE_WIDTH__ 64 -#define __SEG_FS 1 -#define __INT_LEAST16_MAX__ 0x7fff -#define __DEC64_MANT_DIG__ 16 -#define __INT64_MAX__ 0x7fffffffffffffffL -#define __UINT_LEAST32_MAX__ 0xffffffffU -#define __SEG_GS 1 -#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 -#define __GCC_ATOMIC_LONG_LOCK_FREE 2 -#define __SIG_ATOMIC_WIDTH__ 32 -#define __INT_LEAST64_TYPE__ long int -#define __INT16_TYPE__ short int -#define __INT_LEAST8_TYPE__ signed char -#define __DEC32_MAX_EXP__ 97 -#define __INT_FAST8_MAX__ 0x7f -#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 -#define __INTPTR_MAX__ 0x7fffffffffffffffL -#define __cpp_sized_deallocation 201309 -#define linux 1 -#define __cpp_range_based_for 200907 -#define __FLT64_HAS_QUIET_NAN__ 1 -#define __FLT32_MIN_10_EXP__ (-37) -#define __SSE2__ 1 -#define __EXCEPTIONS 1 -#define __LDBL_MANT_DIG__ 64 -#define __DBL_HAS_QUIET_NAN__ 1 -#define __FLT64_HAS_INFINITY__ 1 -#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x -#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) -#define __code_model_small__ 1 -#define __cpp_return_type_deduction 201304 -#define __k8__ 1 -#define __INTPTR_TYPE__ long int -#define __UINT16_TYPE__ short unsigned int -#define __WCHAR_TYPE__ int -#define __SIZEOF_FLOAT__ 4 -#define __pic__ 2 -#define __UINTPTR_MAX__ 0xffffffffffffffffUL -#define __INT_FAST64_WIDTH__ 64 -#define __DEC64_MIN_EXP__ (-382) -#define __cpp_decltype 200707 -#define __FLT32_DECIMAL_DIG__ 9 -#define __INT_FAST64_MAX__ 0x7fffffffffffffffL -#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 -#define __FLT_DIG__ 6 -#define __FLT64X_MAX_EXP__ 16384 -#define __UINT_FAST64_TYPE__ long unsigned int -#define __INT_MAX__ 0x7fffffff -#define __amd64__ 1 -#define __INT64_TYPE__ long int -#define __FLT_MAX_EXP__ 128 -#define __ORDER_BIG_ENDIAN__ 4321 -#define __DBL_MANT_DIG__ 53 -#define __cpp_inheriting_constructors 201511 -#define __SIZEOF_FLOAT128__ 16 -#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL -#define __DEC64_MIN__ 1E-383DD -#define __WINT_TYPE__ unsigned int -#define __UINT_LEAST32_TYPE__ unsigned int -#define __SIZEOF_SHORT__ 2 -#define __SSE__ 1 -#define __LDBL_MIN_EXP__ (-16381) -#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 -#define __WINT_WIDTH__ 32 -#define __INT_LEAST8_MAX__ 0x7f -#define __FLT32X_MAX_10_EXP__ 308 -#define __SIZEOF_INT128__ 16 -#define __LDBL_MAX_10_EXP__ 4932 -#define __ATOMIC_RELAXED 0 -#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) -#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 -#define _LP64 1 -#define __UINT8_C(c) c -#define __FLT64_MAX_EXP__ 1024 -#define __INT_LEAST32_TYPE__ int -#define __SIZEOF_WCHAR_T__ 4 -#define __FLT128_HAS_QUIET_NAN__ 1 -#define __INT_FAST8_TYPE__ signed char -#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x -#define __GNUC_STDC_INLINE__ 1 -#define __FLT64_HAS_DENORM__ 1 -#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 -#define __DBL_DECIMAL_DIG__ 17 -#define __STDC_UTF_32__ 1 -#define __INT_FAST8_WIDTH__ 8 -#define __FXSR__ 1 -#define __DEC_EVAL_METHOD__ 2 -#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x -#define __cpp_runtime_arrays 198712 -#define __UINT64_TYPE__ long unsigned int -#define __UINT32_C(c) c ## U -#define __INTMAX_MAX__ 0x7fffffffffffffffL -#define __cpp_alias_templates 200704 -#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F -#define __INT8_MAX__ 0x7f -#define __LONG_WIDTH__ 64 -#define __PIC__ 2 -#define __UINT_FAST32_TYPE__ long unsigned int -#define __CHAR32_TYPE__ unsigned int -#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F -#define __cpp_constexpr 201304 -#define __INT32_TYPE__ int -#define __SIZEOF_DOUBLE__ 8 -#define __cpp_exceptions 199711 -#define __FLT_MIN_10_EXP__ (-37) -#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 -#define __INT_LEAST32_WIDTH__ 32 -#define __INTMAX_TYPE__ long int -#define __DEC128_MAX_EXP__ 6145 -#define __FLT32X_HAS_QUIET_NAN__ 1 -#define __ATOMIC_CONSUME 1 -#define __GNUC_MINOR__ 2 -#define __GLIBCXX_TYPE_INT_N_0 __int128 -#define __INT_FAST16_WIDTH__ 64 -#define __UINTMAX_MAX__ 0xffffffffffffffffUL -#define __DEC32_MANT_DIG__ 7 -#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x -#define __DBL_MAX_10_EXP__ 308 -#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L -#define __INT16_C(c) c -#define __cpp_generic_lambdas 201304 -#define __STDC__ 1 -#define __FLT32X_DIG__ 15 -#define __PTRDIFF_TYPE__ long int -#define __ATOMIC_SEQ_CST 5 -#define __UINT32_TYPE__ unsigned int -#define __FLT32X_MIN_10_EXP__ (-307) -#define __UINTPTR_TYPE__ long unsigned int -#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD -#define __DEC128_MANT_DIG__ 34 -#define __LDBL_MIN_10_EXP__ (-4931) -#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 -#define __SSE_MATH__ 1 -#define __SIZEOF_LONG_LONG__ 8 -#define __cpp_user_defined_literals 200809 -#define __FLT128_DECIMAL_DIG__ 36 -#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 -#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x -#define __LDBL_DIG__ 18 -#define __FLT_DECIMAL_DIG__ 9 -#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL -#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 -#define __INT_LEAST64_WIDTH__ 64 -#define __UINT_FAST8_TYPE__ unsigned char -#define _GNU_SOURCE 1 -#define __cpp_init_captures 201304 -#define __ATOMIC_ACQ_REL 4 -#define __ATOMIC_RELEASE 3 diff --git a/ui_settings.h b/ui_settings.h deleted file mode 100644 index b1a39970..00000000 --- a/ui_settings.h +++ /dev/null @@ -1,1378 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'settings.ui' -** -** Created by: Qt User Interface Compiler version 5.12.4 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_SETTINGS_H -#define UI_SETTINGS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_SettingsWindow -{ -public: - QVBoxLayout *verticalLayout; - QLabel *settingsLabel; - QTabWidget *tabWidget; - QWidget *commonTab; - QVBoxLayout *verticalLayout_4; - QGroupBox *commonSettingsBox; - QVBoxLayout *verticalLayout_3; - QHBoxLayout *horizontalLayout_2; - QLabel *startWindowLabel; - QComboBox *startWindow; - QSpacerItem *horizontalSpacer_2; - QHBoxLayout *horizontalLayout_4; - QLabel *languageLabel; - QComboBox *language; - QSpacerItem *horizontalSpacer_4; - QLabel *label_4; - QHBoxLayout *horizontalLayout_8; - QLabel *registersLabel_2; - QRadioButton *registersYesRadioButton; - QRadioButton *registersNoRadioButton; - QSpacerItem *horizontalSpacer_9; - QHBoxLayout *horizontalLayout_7; - QLabel *insertDebugStringLabel; - QCheckBox *insertDebugStringCheckBox; - QSpacerItem *horizontalSpacer_10; - QGroupBox *codeSettingsBox; - QVBoxLayout *verticalLayout_2; - QHBoxLayout *horizontalLayout_5; - QLabel *fontLabel; - QFontComboBox *fontComboBox; - QLabel *fontSizeLabel; - QSpinBox *fontSizeSpinBox; - QSpacerItem *horizontalSpacer_5; - QLabel *label; - QLabel *label_2; - QWidget *startTextWidget; - QSpacerItem *verticalSpacer_5; - QHBoxLayout *horizontalLayout; - QToolButton *resetAllButton; - QSpacerItem *horizontalSpacer_3; - QSpacerItem *verticalSpacer; - QWidget *colorsTab; - QGridLayout *gridLayout; - QGroupBox *groupBox; - QGridLayout *gridLayout_2; - QCheckBox *iomacroBoldCheckBox; - QLabel *systemLabel; - QPushButton *quotationColorButton; - QPushButton *systemColorButton; - QCheckBox *numbersItalicCheckBox; - QLabel *label_6; - QCheckBox *numbersBoldCheckBox; - QLabel *label_7; - QLabel *label_3; - QCheckBox *systemItalicCheckBox; - QPushButton *commentsColorButton_2; - QPushButton *keywordsColorButton; - QCheckBox *commentsBoldCheckBox; - QPushButton *keywordsColorButton_2; - QPushButton *iomacroColorButton_2; - QCheckBox *memoryItalicCheckBox; - QLabel *keywordsLabel; - QLabel *label_5; - QPushButton *labelsColorButton; - QLabel *numbersLabel; - QPushButton *quotationColorButton_2; - QLabel *labelsLabel; - QLabel *commentsLabel; - QPushButton *memoryColorButton; - QPushButton *systemColorButton_2; - QLabel *iomacroLabel_2; - QPushButton *labelsColorButton_2; - QCheckBox *registersBoldCheckBox; - QCheckBox *quotationBoldCheckBox; - QPushButton *iomacroColorButton; - QCheckBox *iomacroItalicCheckBox; - QPushButton *registersColorButton_2; - QCheckBox *keywordsBoldCheckBox; - QCheckBox *memoryBoldCheckBox; - QPushButton *numbersColorButton; - QCheckBox *quotationItalicCheckBox; - QPushButton *commentsColorButton; - QCheckBox *labelsItalicCheckBox; - QLabel *memoryLabel; - QLabel *iomacroLabel; - QCheckBox *keywordsItalicCheckBox; - QSpacerItem *verticalSpacer_3; - QLabel *registersLabel; - QCheckBox *commentsItalicCheckBox; - QCheckBox *labelsBoldCheckBox; - QCheckBox *registersItalicCheckBox; - QCheckBox *systemBoldCheckBox; - QPushButton *memoryColorButton_2; - QPushButton *registersColorButton; - QPushButton *numbersColorButton_2; - QSpacerItem *horizontalSpacer_7; - QGroupBox *groupBox_2; - QVBoxLayout *verticalLayout_5; - QGridLayout *gridLayout_4; - QLabel *fontLabel_2; - QPushButton *fontColorButton; - QCheckBox *currentLineCheckBox; - QPushButton *debugLineColorButton; - QLabel *currentLineLabel; - QLabel *debugLineLabel; - QPushButton *currentLineColorButton; - QLabel *backgroundLabel; - QPushButton *backgroundColorButton; - QLabel *lineNumberPanelLabel; - QPushButton *lineNumberPanelColorButton; - QLabel *lineNumberFontLabel; - QPushButton *lineNumberFontColorButton; - QLabel *label_8; - QSpacerItem *horizontalSpacer_6; - QSpacerItem *verticalSpacer_4; - QWidget *buildTab; - QVBoxLayout *verticalLayout_6; - QFormLayout *formLayout; - QLabel *modeLabel; - QHBoxLayout *horizontalLayout_3; - QRadioButton *x86RadioButton; - QRadioButton *x64RadioButton; - QSpacerItem *horizontalSpacer; - QLabel *assemblerLabel; - QHBoxLayout *horizontalLayout_6; - QRadioButton *nasmRadioButton; - QRadioButton *gasRadioButton; - QRadioButton *fasmRadioButton; - QRadioButton *masmRadioButton; - QSpacerItem *horizontalSpacer_8; - QLabel *assemblyLabel; - QLineEdit *assemblyOptionsEdit; - QLabel *linkingLabel; - QLineEdit *linkingOptionsEdit; - QLabel *assemblerPathLabel; - QLineEdit *assemblerPathEdit; - QLabel *linkerPathLabel; - QLineEdit *linkerPathEdit; - QLabel *objectFileNameLabel; - QLineEdit *objectFileNameEdit; - QLabel *gdbPathLabel; - QLineEdit *gdbPathEdit; - QLabel *assemblerWorkingDirectoryLabel; - QCheckBox *runInCurrentDirectoryCheckbox; - QLabel *disableLinkingLabel; - QCheckBox *disableLinkingCheckbox; - QLabel *gdbVerboseLabel; - QCheckBox *sasmVerboseCheckBox; - QLabel *infoLabel; - QDialogButtonBox *buttonBox; - QButtonGroup *buttonGroup; - QButtonGroup *buttonGroup_2; - QButtonGroup *buttonGroup_3; - - void setupUi(QWidget *SettingsWindow) - { - if (SettingsWindow->objectName().isEmpty()) - SettingsWindow->setObjectName(QString::fromUtf8("SettingsWindow")); - SettingsWindow->resize(1702, 971); - verticalLayout = new QVBoxLayout(SettingsWindow); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - settingsLabel = new QLabel(SettingsWindow); - settingsLabel->setObjectName(QString::fromUtf8("settingsLabel")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(settingsLabel->sizePolicy().hasHeightForWidth()); - settingsLabel->setSizePolicy(sizePolicy); - QFont font; - font.setPointSize(16); - settingsLabel->setFont(font); - settingsLabel->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout->addWidget(settingsLabel); - - tabWidget = new QTabWidget(SettingsWindow); - tabWidget->setObjectName(QString::fromUtf8("tabWidget")); - tabWidget->setLayoutDirection(Qt::LeftToRight); - tabWidget->setElideMode(Qt::ElideNone); - commonTab = new QWidget(); - commonTab->setObjectName(QString::fromUtf8("commonTab")); - verticalLayout_4 = new QVBoxLayout(commonTab); - verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); - commonSettingsBox = new QGroupBox(commonTab); - commonSettingsBox->setObjectName(QString::fromUtf8("commonSettingsBox")); - sizePolicy.setHeightForWidth(commonSettingsBox->sizePolicy().hasHeightForWidth()); - commonSettingsBox->setSizePolicy(sizePolicy); - commonSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - verticalLayout_3 = new QVBoxLayout(commonSettingsBox); - verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); - horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); - startWindowLabel = new QLabel(commonSettingsBox); - startWindowLabel->setObjectName(QString::fromUtf8("startWindowLabel")); - QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(startWindowLabel->sizePolicy().hasHeightForWidth()); - startWindowLabel->setSizePolicy(sizePolicy1); - - horizontalLayout_2->addWidget(startWindowLabel); - - startWindow = new QComboBox(commonSettingsBox); - startWindow->addItem(QString()); - startWindow->addItem(QString()); - startWindow->setObjectName(QString::fromUtf8("startWindow")); - QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Fixed); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(startWindow->sizePolicy().hasHeightForWidth()); - startWindow->setSizePolicy(sizePolicy2); - startWindow->setMinimumSize(QSize(266, 0)); - - horizontalLayout_2->addWidget(startWindow); - - horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_2->addItem(horizontalSpacer_2); - - - verticalLayout_3->addLayout(horizontalLayout_2); - - horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); - languageLabel = new QLabel(commonSettingsBox); - languageLabel->setObjectName(QString::fromUtf8("languageLabel")); - - horizontalLayout_4->addWidget(languageLabel); - - language = new QComboBox(commonSettingsBox); - language->addItem(QString::fromUtf8("\320\240\321\203\321\201\321\201\320\272\320\270\320\271")); - language->addItem(QString::fromUtf8("English")); - language->addItem(QString::fromUtf8("T\303\274rk")); - language->addItem(QString::fromUtf8("\344\270\255\345\233\275")); - language->addItem(QString::fromUtf8("Deutsch")); - language->addItem(QString::fromUtf8("Italiano")); - language->addItem(QString()); - language->addItem(QString()); - language->addItem(QString()); - language->setObjectName(QString::fromUtf8("language")); - - horizontalLayout_4->addWidget(language); - - horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_4->addItem(horizontalSpacer_4); - - - verticalLayout_3->addLayout(horizontalLayout_4); - - label_4 = new QLabel(commonSettingsBox); - label_4->setObjectName(QString::fromUtf8("label_4")); - - verticalLayout_3->addWidget(label_4); - - horizontalLayout_8 = new QHBoxLayout(); - horizontalLayout_8->setObjectName(QString::fromUtf8("horizontalLayout_8")); - registersLabel_2 = new QLabel(commonSettingsBox); - registersLabel_2->setObjectName(QString::fromUtf8("registersLabel_2")); - - horizontalLayout_8->addWidget(registersLabel_2); - - registersYesRadioButton = new QRadioButton(commonSettingsBox); - buttonGroup_3 = new QButtonGroup(SettingsWindow); - buttonGroup_3->setObjectName(QString::fromUtf8("buttonGroup_3")); - buttonGroup_3->addButton(registersYesRadioButton); - registersYesRadioButton->setObjectName(QString::fromUtf8("registersYesRadioButton")); - registersYesRadioButton->setChecked(false); - - horizontalLayout_8->addWidget(registersYesRadioButton); - - registersNoRadioButton = new QRadioButton(commonSettingsBox); - buttonGroup_3->addButton(registersNoRadioButton); - registersNoRadioButton->setObjectName(QString::fromUtf8("registersNoRadioButton")); - registersNoRadioButton->setChecked(true); - - horizontalLayout_8->addWidget(registersNoRadioButton); - - horizontalSpacer_9 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_8->addItem(horizontalSpacer_9); - - - verticalLayout_3->addLayout(horizontalLayout_8); - - horizontalLayout_7 = new QHBoxLayout(); - horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7")); - insertDebugStringLabel = new QLabel(commonSettingsBox); - insertDebugStringLabel->setObjectName(QString::fromUtf8("insertDebugStringLabel")); - - horizontalLayout_7->addWidget(insertDebugStringLabel); - - insertDebugStringCheckBox = new QCheckBox(commonSettingsBox); - insertDebugStringCheckBox->setObjectName(QString::fromUtf8("insertDebugStringCheckBox")); - insertDebugStringCheckBox->setChecked(true); - - horizontalLayout_7->addWidget(insertDebugStringCheckBox); - - horizontalSpacer_10 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_7->addItem(horizontalSpacer_10); - - - verticalLayout_3->addLayout(horizontalLayout_7); - - - verticalLayout_4->addWidget(commonSettingsBox); - - codeSettingsBox = new QGroupBox(commonTab); - codeSettingsBox->setObjectName(QString::fromUtf8("codeSettingsBox")); - sizePolicy.setHeightForWidth(codeSettingsBox->sizePolicy().hasHeightForWidth()); - codeSettingsBox->setSizePolicy(sizePolicy); - codeSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - verticalLayout_2 = new QVBoxLayout(codeSettingsBox); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); - horizontalLayout_5 = new QHBoxLayout(); - horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5")); - fontLabel = new QLabel(codeSettingsBox); - fontLabel->setObjectName(QString::fromUtf8("fontLabel")); - - horizontalLayout_5->addWidget(fontLabel); - - fontComboBox = new QFontComboBox(codeSettingsBox); - fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); - fontComboBox->setWritingSystem(QFontDatabase::Latin); - fontComboBox->setFontFilters(QFontComboBox::AllFonts); - QFont font1; - font1.setFamily(QString::fromUtf8("Arial")); - font1.setPointSize(12); - fontComboBox->setCurrentFont(font1); - - horizontalLayout_5->addWidget(fontComboBox); - - fontSizeLabel = new QLabel(codeSettingsBox); - fontSizeLabel->setObjectName(QString::fromUtf8("fontSizeLabel")); - - horizontalLayout_5->addWidget(fontSizeLabel); - - fontSizeSpinBox = new QSpinBox(codeSettingsBox); - fontSizeSpinBox->setObjectName(QString::fromUtf8("fontSizeSpinBox")); - fontSizeSpinBox->setMinimum(5); - fontSizeSpinBox->setMaximum(72); - fontSizeSpinBox->setValue(12); - - horizontalLayout_5->addWidget(fontSizeSpinBox); - - horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_5->addItem(horizontalSpacer_5); - - - verticalLayout_2->addLayout(horizontalLayout_5); - - label = new QLabel(codeSettingsBox); - label->setObjectName(QString::fromUtf8("label")); - label->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout_2->addWidget(label); - - label_2 = new QLabel(codeSettingsBox); - label_2->setObjectName(QString::fromUtf8("label_2")); - label_2->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout_2->addWidget(label_2); - - startTextWidget = new QWidget(codeSettingsBox); - startTextWidget->setObjectName(QString::fromUtf8("startTextWidget")); - - verticalLayout_2->addWidget(startTextWidget); - - verticalSpacer_5 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_2->addItem(verticalSpacer_5); - - - verticalLayout_4->addWidget(codeSettingsBox); - - horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - resetAllButton = new QToolButton(commonTab); - resetAllButton->setObjectName(QString::fromUtf8("resetAllButton")); - resetAllButton->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - horizontalLayout->addWidget(resetAllButton); - - horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout->addItem(horizontalSpacer_3); - - - verticalLayout_4->addLayout(horizontalLayout); - - verticalSpacer = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_4->addItem(verticalSpacer); - - tabWidget->addTab(commonTab, QString()); - colorsTab = new QWidget(); - colorsTab->setObjectName(QString::fromUtf8("colorsTab")); - gridLayout = new QGridLayout(colorsTab); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - groupBox = new QGroupBox(colorsTab); - groupBox->setObjectName(QString::fromUtf8("groupBox")); - gridLayout_2 = new QGridLayout(groupBox); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); - iomacroBoldCheckBox = new QCheckBox(groupBox); - iomacroBoldCheckBox->setObjectName(QString::fromUtf8("iomacroBoldCheckBox")); - QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Minimum); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(iomacroBoldCheckBox->sizePolicy().hasHeightForWidth()); - iomacroBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(iomacroBoldCheckBox, 8, 3, 1, 1); - - systemLabel = new QLabel(groupBox); - systemLabel->setObjectName(QString::fromUtf8("systemLabel")); - - gridLayout_2->addWidget(systemLabel, 7, 0, 1, 1); - - quotationColorButton = new QPushButton(groupBox); - quotationColorButton->setObjectName(QString::fromUtf8("quotationColorButton")); - sizePolicy1.setHeightForWidth(quotationColorButton->sizePolicy().hasHeightForWidth()); - quotationColorButton->setSizePolicy(sizePolicy1); - quotationColorButton->setMinimumSize(QSize(23, 23)); - quotationColorButton->setMaximumSize(QSize(23, 23)); - quotationColorButton->setBaseSize(QSize(0, 0)); - quotationColorButton->setFocusPolicy(Qt::NoFocus); - quotationColorButton->setAutoDefault(false); - quotationColorButton->setFlat(false); - - gridLayout_2->addWidget(quotationColorButton, 9, 1, 1, 1); - - systemColorButton = new QPushButton(groupBox); - systemColorButton->setObjectName(QString::fromUtf8("systemColorButton")); - sizePolicy1.setHeightForWidth(systemColorButton->sizePolicy().hasHeightForWidth()); - systemColorButton->setSizePolicy(sizePolicy1); - systemColorButton->setMinimumSize(QSize(23, 23)); - systemColorButton->setMaximumSize(QSize(23, 23)); - systemColorButton->setBaseSize(QSize(0, 0)); - systemColorButton->setFocusPolicy(Qt::NoFocus); - systemColorButton->setAutoDefault(false); - systemColorButton->setFlat(false); - - gridLayout_2->addWidget(systemColorButton, 7, 1, 1, 1); - - numbersItalicCheckBox = new QCheckBox(groupBox); - numbersItalicCheckBox->setObjectName(QString::fromUtf8("numbersItalicCheckBox")); - sizePolicy3.setHeightForWidth(numbersItalicCheckBox->sizePolicy().hasHeightForWidth()); - numbersItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(numbersItalicCheckBox, 3, 4, 1, 1); - - label_6 = new QLabel(groupBox); - label_6->setObjectName(QString::fromUtf8("label_6")); - - gridLayout_2->addWidget(label_6, 0, 3, 1, 1); - - numbersBoldCheckBox = new QCheckBox(groupBox); - numbersBoldCheckBox->setObjectName(QString::fromUtf8("numbersBoldCheckBox")); - sizePolicy3.setHeightForWidth(numbersBoldCheckBox->sizePolicy().hasHeightForWidth()); - numbersBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(numbersBoldCheckBox, 3, 3, 1, 1); - - label_7 = new QLabel(groupBox); - label_7->setObjectName(QString::fromUtf8("label_7")); - - gridLayout_2->addWidget(label_7, 0, 4, 1, 1); - - label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); - - gridLayout_2->addWidget(label_3, 0, 1, 1, 1); - - systemItalicCheckBox = new QCheckBox(groupBox); - systemItalicCheckBox->setObjectName(QString::fromUtf8("systemItalicCheckBox")); - sizePolicy3.setHeightForWidth(systemItalicCheckBox->sizePolicy().hasHeightForWidth()); - systemItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(systemItalicCheckBox, 7, 4, 1, 1); - - commentsColorButton_2 = new QPushButton(groupBox); - commentsColorButton_2->setObjectName(QString::fromUtf8("commentsColorButton_2")); - sizePolicy1.setHeightForWidth(commentsColorButton_2->sizePolicy().hasHeightForWidth()); - commentsColorButton_2->setSizePolicy(sizePolicy1); - commentsColorButton_2->setMinimumSize(QSize(23, 23)); - commentsColorButton_2->setMaximumSize(QSize(23, 23)); - commentsColorButton_2->setBaseSize(QSize(0, 0)); - commentsColorButton_2->setFocusPolicy(Qt::NoFocus); - commentsColorButton_2->setAutoDefault(false); - commentsColorButton_2->setFlat(false); - - gridLayout_2->addWidget(commentsColorButton_2, 6, 2, 1, 1); - - keywordsColorButton = new QPushButton(groupBox); - keywordsColorButton->setObjectName(QString::fromUtf8("keywordsColorButton")); - sizePolicy1.setHeightForWidth(keywordsColorButton->sizePolicy().hasHeightForWidth()); - keywordsColorButton->setSizePolicy(sizePolicy1); - keywordsColorButton->setMinimumSize(QSize(23, 23)); - keywordsColorButton->setMaximumSize(QSize(23, 23)); - keywordsColorButton->setBaseSize(QSize(0, 0)); - keywordsColorButton->setFocusPolicy(Qt::NoFocus); - keywordsColorButton->setAutoDefault(false); - keywordsColorButton->setFlat(false); - - gridLayout_2->addWidget(keywordsColorButton, 1, 1, 1, 1); - - commentsBoldCheckBox = new QCheckBox(groupBox); - commentsBoldCheckBox->setObjectName(QString::fromUtf8("commentsBoldCheckBox")); - sizePolicy3.setHeightForWidth(commentsBoldCheckBox->sizePolicy().hasHeightForWidth()); - commentsBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(commentsBoldCheckBox, 6, 3, 1, 1); - - keywordsColorButton_2 = new QPushButton(groupBox); - keywordsColorButton_2->setObjectName(QString::fromUtf8("keywordsColorButton_2")); - sizePolicy1.setHeightForWidth(keywordsColorButton_2->sizePolicy().hasHeightForWidth()); - keywordsColorButton_2->setSizePolicy(sizePolicy1); - keywordsColorButton_2->setMinimumSize(QSize(23, 23)); - keywordsColorButton_2->setMaximumSize(QSize(23, 23)); - keywordsColorButton_2->setBaseSize(QSize(0, 0)); - keywordsColorButton_2->setFocusPolicy(Qt::NoFocus); - keywordsColorButton_2->setAutoDefault(false); - keywordsColorButton_2->setFlat(false); - - gridLayout_2->addWidget(keywordsColorButton_2, 1, 2, 1, 1); - - iomacroColorButton_2 = new QPushButton(groupBox); - iomacroColorButton_2->setObjectName(QString::fromUtf8("iomacroColorButton_2")); - sizePolicy1.setHeightForWidth(iomacroColorButton_2->sizePolicy().hasHeightForWidth()); - iomacroColorButton_2->setSizePolicy(sizePolicy1); - iomacroColorButton_2->setMinimumSize(QSize(23, 23)); - iomacroColorButton_2->setMaximumSize(QSize(23, 23)); - iomacroColorButton_2->setBaseSize(QSize(0, 0)); - iomacroColorButton_2->setFocusPolicy(Qt::NoFocus); - iomacroColorButton_2->setAutoDefault(false); - iomacroColorButton_2->setFlat(false); - - gridLayout_2->addWidget(iomacroColorButton_2, 8, 2, 1, 1); - - memoryItalicCheckBox = new QCheckBox(groupBox); - memoryItalicCheckBox->setObjectName(QString::fromUtf8("memoryItalicCheckBox")); - sizePolicy3.setHeightForWidth(memoryItalicCheckBox->sizePolicy().hasHeightForWidth()); - memoryItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(memoryItalicCheckBox, 4, 4, 1, 1); - - keywordsLabel = new QLabel(groupBox); - keywordsLabel->setObjectName(QString::fromUtf8("keywordsLabel")); - - gridLayout_2->addWidget(keywordsLabel, 1, 0, 1, 1); - - label_5 = new QLabel(groupBox); - label_5->setObjectName(QString::fromUtf8("label_5")); - - gridLayout_2->addWidget(label_5, 0, 2, 1, 1); - - labelsColorButton = new QPushButton(groupBox); - labelsColorButton->setObjectName(QString::fromUtf8("labelsColorButton")); - sizePolicy1.setHeightForWidth(labelsColorButton->sizePolicy().hasHeightForWidth()); - labelsColorButton->setSizePolicy(sizePolicy1); - labelsColorButton->setMinimumSize(QSize(23, 23)); - labelsColorButton->setMaximumSize(QSize(23, 23)); - labelsColorButton->setBaseSize(QSize(0, 0)); - labelsColorButton->setFocusPolicy(Qt::NoFocus); - labelsColorButton->setAutoDefault(false); - labelsColorButton->setFlat(false); - - gridLayout_2->addWidget(labelsColorButton, 5, 1, 1, 1); - - numbersLabel = new QLabel(groupBox); - numbersLabel->setObjectName(QString::fromUtf8("numbersLabel")); - - gridLayout_2->addWidget(numbersLabel, 3, 0, 1, 1); - - quotationColorButton_2 = new QPushButton(groupBox); - quotationColorButton_2->setObjectName(QString::fromUtf8("quotationColorButton_2")); - sizePolicy1.setHeightForWidth(quotationColorButton_2->sizePolicy().hasHeightForWidth()); - quotationColorButton_2->setSizePolicy(sizePolicy1); - quotationColorButton_2->setMinimumSize(QSize(23, 23)); - quotationColorButton_2->setMaximumSize(QSize(23, 23)); - quotationColorButton_2->setBaseSize(QSize(0, 0)); - quotationColorButton_2->setFocusPolicy(Qt::NoFocus); - quotationColorButton_2->setAutoDefault(false); - quotationColorButton_2->setFlat(false); - - gridLayout_2->addWidget(quotationColorButton_2, 9, 2, 1, 1); - - labelsLabel = new QLabel(groupBox); - labelsLabel->setObjectName(QString::fromUtf8("labelsLabel")); - - gridLayout_2->addWidget(labelsLabel, 5, 0, 1, 1); - - commentsLabel = new QLabel(groupBox); - commentsLabel->setObjectName(QString::fromUtf8("commentsLabel")); - - gridLayout_2->addWidget(commentsLabel, 6, 0, 1, 1); - - memoryColorButton = new QPushButton(groupBox); - memoryColorButton->setObjectName(QString::fromUtf8("memoryColorButton")); - sizePolicy1.setHeightForWidth(memoryColorButton->sizePolicy().hasHeightForWidth()); - memoryColorButton->setSizePolicy(sizePolicy1); - memoryColorButton->setMinimumSize(QSize(23, 23)); - memoryColorButton->setMaximumSize(QSize(23, 23)); - memoryColorButton->setBaseSize(QSize(0, 0)); - memoryColorButton->setFocusPolicy(Qt::NoFocus); - memoryColorButton->setAutoDefault(false); - memoryColorButton->setFlat(false); - - gridLayout_2->addWidget(memoryColorButton, 4, 1, 1, 1); - - systemColorButton_2 = new QPushButton(groupBox); - systemColorButton_2->setObjectName(QString::fromUtf8("systemColorButton_2")); - sizePolicy1.setHeightForWidth(systemColorButton_2->sizePolicy().hasHeightForWidth()); - systemColorButton_2->setSizePolicy(sizePolicy1); - systemColorButton_2->setMinimumSize(QSize(23, 23)); - systemColorButton_2->setMaximumSize(QSize(23, 23)); - systemColorButton_2->setBaseSize(QSize(0, 0)); - systemColorButton_2->setFocusPolicy(Qt::NoFocus); - systemColorButton_2->setAutoDefault(false); - systemColorButton_2->setFlat(false); - - gridLayout_2->addWidget(systemColorButton_2, 7, 2, 1, 1); - - iomacroLabel_2 = new QLabel(groupBox); - iomacroLabel_2->setObjectName(QString::fromUtf8("iomacroLabel_2")); - - gridLayout_2->addWidget(iomacroLabel_2, 9, 0, 1, 1); - - labelsColorButton_2 = new QPushButton(groupBox); - labelsColorButton_2->setObjectName(QString::fromUtf8("labelsColorButton_2")); - sizePolicy1.setHeightForWidth(labelsColorButton_2->sizePolicy().hasHeightForWidth()); - labelsColorButton_2->setSizePolicy(sizePolicy1); - labelsColorButton_2->setMinimumSize(QSize(23, 23)); - labelsColorButton_2->setMaximumSize(QSize(23, 23)); - labelsColorButton_2->setBaseSize(QSize(0, 0)); - labelsColorButton_2->setFocusPolicy(Qt::NoFocus); - labelsColorButton_2->setAutoDefault(false); - labelsColorButton_2->setFlat(false); - - gridLayout_2->addWidget(labelsColorButton_2, 5, 2, 1, 1); - - registersBoldCheckBox = new QCheckBox(groupBox); - registersBoldCheckBox->setObjectName(QString::fromUtf8("registersBoldCheckBox")); - sizePolicy3.setHeightForWidth(registersBoldCheckBox->sizePolicy().hasHeightForWidth()); - registersBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(registersBoldCheckBox, 2, 3, 1, 1); - - quotationBoldCheckBox = new QCheckBox(groupBox); - quotationBoldCheckBox->setObjectName(QString::fromUtf8("quotationBoldCheckBox")); - sizePolicy3.setHeightForWidth(quotationBoldCheckBox->sizePolicy().hasHeightForWidth()); - quotationBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(quotationBoldCheckBox, 9, 3, 1, 1); - - iomacroColorButton = new QPushButton(groupBox); - iomacroColorButton->setObjectName(QString::fromUtf8("iomacroColorButton")); - sizePolicy1.setHeightForWidth(iomacroColorButton->sizePolicy().hasHeightForWidth()); - iomacroColorButton->setSizePolicy(sizePolicy1); - iomacroColorButton->setMinimumSize(QSize(23, 23)); - iomacroColorButton->setMaximumSize(QSize(23, 23)); - iomacroColorButton->setBaseSize(QSize(0, 0)); - iomacroColorButton->setFocusPolicy(Qt::NoFocus); - iomacroColorButton->setAutoDefault(false); - iomacroColorButton->setFlat(false); - - gridLayout_2->addWidget(iomacroColorButton, 8, 1, 1, 1); - - iomacroItalicCheckBox = new QCheckBox(groupBox); - iomacroItalicCheckBox->setObjectName(QString::fromUtf8("iomacroItalicCheckBox")); - sizePolicy3.setHeightForWidth(iomacroItalicCheckBox->sizePolicy().hasHeightForWidth()); - iomacroItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(iomacroItalicCheckBox, 8, 4, 1, 1); - - registersColorButton_2 = new QPushButton(groupBox); - registersColorButton_2->setObjectName(QString::fromUtf8("registersColorButton_2")); - sizePolicy1.setHeightForWidth(registersColorButton_2->sizePolicy().hasHeightForWidth()); - registersColorButton_2->setSizePolicy(sizePolicy1); - registersColorButton_2->setMinimumSize(QSize(23, 23)); - registersColorButton_2->setMaximumSize(QSize(23, 23)); - registersColorButton_2->setBaseSize(QSize(0, 0)); - registersColorButton_2->setFocusPolicy(Qt::NoFocus); - registersColorButton_2->setAutoDefault(false); - registersColorButton_2->setFlat(false); - - gridLayout_2->addWidget(registersColorButton_2, 2, 2, 1, 1); - - keywordsBoldCheckBox = new QCheckBox(groupBox); - keywordsBoldCheckBox->setObjectName(QString::fromUtf8("keywordsBoldCheckBox")); - sizePolicy3.setHeightForWidth(keywordsBoldCheckBox->sizePolicy().hasHeightForWidth()); - keywordsBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(keywordsBoldCheckBox, 1, 3, 1, 1); - - memoryBoldCheckBox = new QCheckBox(groupBox); - memoryBoldCheckBox->setObjectName(QString::fromUtf8("memoryBoldCheckBox")); - sizePolicy3.setHeightForWidth(memoryBoldCheckBox->sizePolicy().hasHeightForWidth()); - memoryBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(memoryBoldCheckBox, 4, 3, 1, 1); - - numbersColorButton = new QPushButton(groupBox); - numbersColorButton->setObjectName(QString::fromUtf8("numbersColorButton")); - sizePolicy1.setHeightForWidth(numbersColorButton->sizePolicy().hasHeightForWidth()); - numbersColorButton->setSizePolicy(sizePolicy1); - numbersColorButton->setMinimumSize(QSize(23, 23)); - numbersColorButton->setMaximumSize(QSize(23, 23)); - numbersColorButton->setBaseSize(QSize(0, 0)); - numbersColorButton->setFocusPolicy(Qt::NoFocus); - numbersColorButton->setAutoDefault(false); - numbersColorButton->setFlat(false); - - gridLayout_2->addWidget(numbersColorButton, 3, 1, 1, 1); - - quotationItalicCheckBox = new QCheckBox(groupBox); - quotationItalicCheckBox->setObjectName(QString::fromUtf8("quotationItalicCheckBox")); - sizePolicy3.setHeightForWidth(quotationItalicCheckBox->sizePolicy().hasHeightForWidth()); - quotationItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(quotationItalicCheckBox, 9, 4, 1, 1); - - commentsColorButton = new QPushButton(groupBox); - commentsColorButton->setObjectName(QString::fromUtf8("commentsColorButton")); - sizePolicy1.setHeightForWidth(commentsColorButton->sizePolicy().hasHeightForWidth()); - commentsColorButton->setSizePolicy(sizePolicy1); - commentsColorButton->setMinimumSize(QSize(23, 23)); - commentsColorButton->setMaximumSize(QSize(23, 23)); - commentsColorButton->setBaseSize(QSize(0, 0)); - commentsColorButton->setFocusPolicy(Qt::NoFocus); - commentsColorButton->setAutoDefault(false); - commentsColorButton->setFlat(false); - - gridLayout_2->addWidget(commentsColorButton, 6, 1, 1, 1); - - labelsItalicCheckBox = new QCheckBox(groupBox); - labelsItalicCheckBox->setObjectName(QString::fromUtf8("labelsItalicCheckBox")); - sizePolicy3.setHeightForWidth(labelsItalicCheckBox->sizePolicy().hasHeightForWidth()); - labelsItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(labelsItalicCheckBox, 5, 4, 1, 1); - - memoryLabel = new QLabel(groupBox); - memoryLabel->setObjectName(QString::fromUtf8("memoryLabel")); - - gridLayout_2->addWidget(memoryLabel, 4, 0, 1, 1); - - iomacroLabel = new QLabel(groupBox); - iomacroLabel->setObjectName(QString::fromUtf8("iomacroLabel")); - - gridLayout_2->addWidget(iomacroLabel, 8, 0, 1, 1); - - keywordsItalicCheckBox = new QCheckBox(groupBox); - keywordsItalicCheckBox->setObjectName(QString::fromUtf8("keywordsItalicCheckBox")); - sizePolicy3.setHeightForWidth(keywordsItalicCheckBox->sizePolicy().hasHeightForWidth()); - keywordsItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(keywordsItalicCheckBox, 1, 4, 1, 1); - - verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout_2->addItem(verticalSpacer_3, 10, 1, 1, 1); - - registersLabel = new QLabel(groupBox); - registersLabel->setObjectName(QString::fromUtf8("registersLabel")); - - gridLayout_2->addWidget(registersLabel, 2, 0, 1, 1); - - commentsItalicCheckBox = new QCheckBox(groupBox); - commentsItalicCheckBox->setObjectName(QString::fromUtf8("commentsItalicCheckBox")); - sizePolicy3.setHeightForWidth(commentsItalicCheckBox->sizePolicy().hasHeightForWidth()); - commentsItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(commentsItalicCheckBox, 6, 4, 1, 1); - - labelsBoldCheckBox = new QCheckBox(groupBox); - labelsBoldCheckBox->setObjectName(QString::fromUtf8("labelsBoldCheckBox")); - sizePolicy3.setHeightForWidth(labelsBoldCheckBox->sizePolicy().hasHeightForWidth()); - labelsBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(labelsBoldCheckBox, 5, 3, 1, 1); - - registersItalicCheckBox = new QCheckBox(groupBox); - registersItalicCheckBox->setObjectName(QString::fromUtf8("registersItalicCheckBox")); - sizePolicy3.setHeightForWidth(registersItalicCheckBox->sizePolicy().hasHeightForWidth()); - registersItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(registersItalicCheckBox, 2, 4, 1, 1); - - systemBoldCheckBox = new QCheckBox(groupBox); - systemBoldCheckBox->setObjectName(QString::fromUtf8("systemBoldCheckBox")); - sizePolicy3.setHeightForWidth(systemBoldCheckBox->sizePolicy().hasHeightForWidth()); - systemBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(systemBoldCheckBox, 7, 3, 1, 1); - - memoryColorButton_2 = new QPushButton(groupBox); - memoryColorButton_2->setObjectName(QString::fromUtf8("memoryColorButton_2")); - sizePolicy1.setHeightForWidth(memoryColorButton_2->sizePolicy().hasHeightForWidth()); - memoryColorButton_2->setSizePolicy(sizePolicy1); - memoryColorButton_2->setMinimumSize(QSize(23, 23)); - memoryColorButton_2->setMaximumSize(QSize(23, 23)); - memoryColorButton_2->setBaseSize(QSize(0, 0)); - memoryColorButton_2->setFocusPolicy(Qt::NoFocus); - memoryColorButton_2->setAutoDefault(false); - memoryColorButton_2->setFlat(false); - - gridLayout_2->addWidget(memoryColorButton_2, 4, 2, 1, 1); - - registersColorButton = new QPushButton(groupBox); - registersColorButton->setObjectName(QString::fromUtf8("registersColorButton")); - sizePolicy1.setHeightForWidth(registersColorButton->sizePolicy().hasHeightForWidth()); - registersColorButton->setSizePolicy(sizePolicy1); - registersColorButton->setMinimumSize(QSize(23, 23)); - registersColorButton->setMaximumSize(QSize(23, 23)); - registersColorButton->setBaseSize(QSize(0, 0)); - registersColorButton->setFocusPolicy(Qt::NoFocus); - registersColorButton->setAutoDefault(false); - registersColorButton->setFlat(false); - - gridLayout_2->addWidget(registersColorButton, 2, 1, 1, 1); - - numbersColorButton_2 = new QPushButton(groupBox); - numbersColorButton_2->setObjectName(QString::fromUtf8("numbersColorButton_2")); - sizePolicy1.setHeightForWidth(numbersColorButton_2->sizePolicy().hasHeightForWidth()); - numbersColorButton_2->setSizePolicy(sizePolicy1); - numbersColorButton_2->setMinimumSize(QSize(23, 23)); - numbersColorButton_2->setMaximumSize(QSize(23, 23)); - numbersColorButton_2->setBaseSize(QSize(0, 0)); - numbersColorButton_2->setFocusPolicy(Qt::NoFocus); - numbersColorButton_2->setAutoDefault(false); - numbersColorButton_2->setFlat(false); - - gridLayout_2->addWidget(numbersColorButton_2, 3, 2, 1, 1); - - horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout_2->addItem(horizontalSpacer_7, 5, 5, 1, 1); - - - gridLayout->addWidget(groupBox, 0, 2, 1, 1); - - groupBox_2 = new QGroupBox(colorsTab); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); - verticalLayout_5 = new QVBoxLayout(groupBox_2); - verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5")); - gridLayout_4 = new QGridLayout(); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); - fontLabel_2 = new QLabel(groupBox_2); - fontLabel_2->setObjectName(QString::fromUtf8("fontLabel_2")); - - gridLayout_4->addWidget(fontLabel_2, 4, 0, 1, 1); - - fontColorButton = new QPushButton(groupBox_2); - fontColorButton->setObjectName(QString::fromUtf8("fontColorButton")); - sizePolicy1.setHeightForWidth(fontColorButton->sizePolicy().hasHeightForWidth()); - fontColorButton->setSizePolicy(sizePolicy1); - fontColorButton->setMinimumSize(QSize(23, 23)); - fontColorButton->setMaximumSize(QSize(23, 23)); - fontColorButton->setBaseSize(QSize(0, 0)); - fontColorButton->setFocusPolicy(Qt::NoFocus); - fontColorButton->setAutoDefault(false); - fontColorButton->setFlat(false); - - gridLayout_4->addWidget(fontColorButton, 4, 1, 1, 1); - - currentLineCheckBox = new QCheckBox(groupBox_2); - currentLineCheckBox->setObjectName(QString::fromUtf8("currentLineCheckBox")); - - gridLayout_4->addWidget(currentLineCheckBox, 5, 2, 1, 1); - - debugLineColorButton = new QPushButton(groupBox_2); - debugLineColorButton->setObjectName(QString::fromUtf8("debugLineColorButton")); - sizePolicy1.setHeightForWidth(debugLineColorButton->sizePolicy().hasHeightForWidth()); - debugLineColorButton->setSizePolicy(sizePolicy1); - debugLineColorButton->setMinimumSize(QSize(23, 23)); - debugLineColorButton->setMaximumSize(QSize(23, 23)); - debugLineColorButton->setBaseSize(QSize(0, 0)); - debugLineColorButton->setFocusPolicy(Qt::NoFocus); - debugLineColorButton->setAutoDefault(false); - debugLineColorButton->setFlat(false); - - gridLayout_4->addWidget(debugLineColorButton, 6, 1, 1, 1); - - currentLineLabel = new QLabel(groupBox_2); - currentLineLabel->setObjectName(QString::fromUtf8("currentLineLabel")); - - gridLayout_4->addWidget(currentLineLabel, 5, 0, 1, 1); - - debugLineLabel = new QLabel(groupBox_2); - debugLineLabel->setObjectName(QString::fromUtf8("debugLineLabel")); - - gridLayout_4->addWidget(debugLineLabel, 6, 0, 1, 1); - - currentLineColorButton = new QPushButton(groupBox_2); - currentLineColorButton->setObjectName(QString::fromUtf8("currentLineColorButton")); - sizePolicy1.setHeightForWidth(currentLineColorButton->sizePolicy().hasHeightForWidth()); - currentLineColorButton->setSizePolicy(sizePolicy1); - currentLineColorButton->setMinimumSize(QSize(23, 23)); - currentLineColorButton->setMaximumSize(QSize(23, 23)); - currentLineColorButton->setBaseSize(QSize(0, 0)); - currentLineColorButton->setFocusPolicy(Qt::NoFocus); - currentLineColorButton->setAutoDefault(false); - currentLineColorButton->setFlat(false); - - gridLayout_4->addWidget(currentLineColorButton, 5, 1, 1, 1); - - backgroundLabel = new QLabel(groupBox_2); - backgroundLabel->setObjectName(QString::fromUtf8("backgroundLabel")); - - gridLayout_4->addWidget(backgroundLabel, 1, 0, 1, 1); - - backgroundColorButton = new QPushButton(groupBox_2); - backgroundColorButton->setObjectName(QString::fromUtf8("backgroundColorButton")); - sizePolicy1.setHeightForWidth(backgroundColorButton->sizePolicy().hasHeightForWidth()); - backgroundColorButton->setSizePolicy(sizePolicy1); - backgroundColorButton->setMinimumSize(QSize(23, 23)); - backgroundColorButton->setMaximumSize(QSize(23, 23)); - backgroundColorButton->setBaseSize(QSize(0, 0)); - backgroundColorButton->setFocusPolicy(Qt::NoFocus); - backgroundColorButton->setAutoDefault(false); - backgroundColorButton->setFlat(false); - - gridLayout_4->addWidget(backgroundColorButton, 1, 1, 1, 1); - - lineNumberPanelLabel = new QLabel(groupBox_2); - lineNumberPanelLabel->setObjectName(QString::fromUtf8("lineNumberPanelLabel")); - - gridLayout_4->addWidget(lineNumberPanelLabel, 2, 0, 1, 1); - - lineNumberPanelColorButton = new QPushButton(groupBox_2); - lineNumberPanelColorButton->setObjectName(QString::fromUtf8("lineNumberPanelColorButton")); - sizePolicy1.setHeightForWidth(lineNumberPanelColorButton->sizePolicy().hasHeightForWidth()); - lineNumberPanelColorButton->setSizePolicy(sizePolicy1); - lineNumberPanelColorButton->setMinimumSize(QSize(23, 23)); - lineNumberPanelColorButton->setMaximumSize(QSize(23, 23)); - lineNumberPanelColorButton->setBaseSize(QSize(0, 0)); - lineNumberPanelColorButton->setFocusPolicy(Qt::NoFocus); - lineNumberPanelColorButton->setAutoDefault(false); - lineNumberPanelColorButton->setFlat(false); - - gridLayout_4->addWidget(lineNumberPanelColorButton, 2, 1, 1, 1); - - lineNumberFontLabel = new QLabel(groupBox_2); - lineNumberFontLabel->setObjectName(QString::fromUtf8("lineNumberFontLabel")); - - gridLayout_4->addWidget(lineNumberFontLabel, 3, 0, 1, 1); - - lineNumberFontColorButton = new QPushButton(groupBox_2); - lineNumberFontColorButton->setObjectName(QString::fromUtf8("lineNumberFontColorButton")); - sizePolicy1.setHeightForWidth(lineNumberFontColorButton->sizePolicy().hasHeightForWidth()); - lineNumberFontColorButton->setSizePolicy(sizePolicy1); - lineNumberFontColorButton->setMinimumSize(QSize(23, 23)); - lineNumberFontColorButton->setMaximumSize(QSize(23, 23)); - lineNumberFontColorButton->setBaseSize(QSize(0, 0)); - lineNumberFontColorButton->setFocusPolicy(Qt::NoFocus); - lineNumberFontColorButton->setAutoDefault(false); - lineNumberFontColorButton->setFlat(false); - - gridLayout_4->addWidget(lineNumberFontColorButton, 3, 1, 1, 1); - - - verticalLayout_5->addLayout(gridLayout_4); - - label_8 = new QLabel(groupBox_2); - label_8->setObjectName(QString::fromUtf8("label_8")); - label_8->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout_5->addWidget(label_8); - - horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - verticalLayout_5->addItem(horizontalSpacer_6); - - verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_5->addItem(verticalSpacer_4); - - - gridLayout->addWidget(groupBox_2, 0, 0, 1, 1); - - tabWidget->addTab(colorsTab, QString()); - buildTab = new QWidget(); - buildTab->setObjectName(QString::fromUtf8("buildTab")); - verticalLayout_6 = new QVBoxLayout(buildTab); - verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6")); - formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); - formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); - formLayout->setHorizontalSpacing(12); - formLayout->setVerticalSpacing(12); - formLayout->setContentsMargins(-1, -1, -1, 0); - modeLabel = new QLabel(buildTab); - modeLabel->setObjectName(QString::fromUtf8("modeLabel")); - - formLayout->setWidget(0, QFormLayout::LabelRole, modeLabel); - - horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); - x86RadioButton = new QRadioButton(buildTab); - buttonGroup_2 = new QButtonGroup(SettingsWindow); - buttonGroup_2->setObjectName(QString::fromUtf8("buttonGroup_2")); - buttonGroup_2->addButton(x86RadioButton); - x86RadioButton->setObjectName(QString::fromUtf8("x86RadioButton")); - x86RadioButton->setChecked(true); - - horizontalLayout_3->addWidget(x86RadioButton); - - x64RadioButton = new QRadioButton(buildTab); - buttonGroup_2->addButton(x64RadioButton); - x64RadioButton->setObjectName(QString::fromUtf8("x64RadioButton")); - x64RadioButton->setChecked(false); - - horizontalLayout_3->addWidget(x64RadioButton); - - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_3->addItem(horizontalSpacer); - - - formLayout->setLayout(0, QFormLayout::FieldRole, horizontalLayout_3); - - assemblerLabel = new QLabel(buildTab); - assemblerLabel->setObjectName(QString::fromUtf8("assemblerLabel")); - - formLayout->setWidget(1, QFormLayout::LabelRole, assemblerLabel); - - horizontalLayout_6 = new QHBoxLayout(); - horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6")); - nasmRadioButton = new QRadioButton(buildTab); - buttonGroup = new QButtonGroup(SettingsWindow); - buttonGroup->setObjectName(QString::fromUtf8("buttonGroup")); - buttonGroup->addButton(nasmRadioButton); - nasmRadioButton->setObjectName(QString::fromUtf8("nasmRadioButton")); - nasmRadioButton->setChecked(true); - - horizontalLayout_6->addWidget(nasmRadioButton); - - gasRadioButton = new QRadioButton(buildTab); - buttonGroup->addButton(gasRadioButton); - gasRadioButton->setObjectName(QString::fromUtf8("gasRadioButton")); - - horizontalLayout_6->addWidget(gasRadioButton); - - fasmRadioButton = new QRadioButton(buildTab); - buttonGroup->addButton(fasmRadioButton); - fasmRadioButton->setObjectName(QString::fromUtf8("fasmRadioButton")); - - horizontalLayout_6->addWidget(fasmRadioButton); - - masmRadioButton = new QRadioButton(buildTab); - buttonGroup->addButton(masmRadioButton); - masmRadioButton->setObjectName(QString::fromUtf8("masmRadioButton")); - - horizontalLayout_6->addWidget(masmRadioButton); - - horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_6->addItem(horizontalSpacer_8); - - - formLayout->setLayout(1, QFormLayout::FieldRole, horizontalLayout_6); - - assemblyLabel = new QLabel(buildTab); - assemblyLabel->setObjectName(QString::fromUtf8("assemblyLabel")); - - formLayout->setWidget(2, QFormLayout::LabelRole, assemblyLabel); - - assemblyOptionsEdit = new QLineEdit(buildTab); - assemblyOptionsEdit->setObjectName(QString::fromUtf8("assemblyOptionsEdit")); - - formLayout->setWidget(2, QFormLayout::FieldRole, assemblyOptionsEdit); - - linkingLabel = new QLabel(buildTab); - linkingLabel->setObjectName(QString::fromUtf8("linkingLabel")); - - formLayout->setWidget(3, QFormLayout::LabelRole, linkingLabel); - - linkingOptionsEdit = new QLineEdit(buildTab); - linkingOptionsEdit->setObjectName(QString::fromUtf8("linkingOptionsEdit")); - - formLayout->setWidget(3, QFormLayout::FieldRole, linkingOptionsEdit); - - assemblerPathLabel = new QLabel(buildTab); - assemblerPathLabel->setObjectName(QString::fromUtf8("assemblerPathLabel")); - - formLayout->setWidget(4, QFormLayout::LabelRole, assemblerPathLabel); - - assemblerPathEdit = new QLineEdit(buildTab); - assemblerPathEdit->setObjectName(QString::fromUtf8("assemblerPathEdit")); - - formLayout->setWidget(4, QFormLayout::FieldRole, assemblerPathEdit); - - linkerPathLabel = new QLabel(buildTab); - linkerPathLabel->setObjectName(QString::fromUtf8("linkerPathLabel")); - - formLayout->setWidget(5, QFormLayout::LabelRole, linkerPathLabel); - - linkerPathEdit = new QLineEdit(buildTab); - linkerPathEdit->setObjectName(QString::fromUtf8("linkerPathEdit")); - - formLayout->setWidget(5, QFormLayout::FieldRole, linkerPathEdit); - - objectFileNameLabel = new QLabel(buildTab); - objectFileNameLabel->setObjectName(QString::fromUtf8("objectFileNameLabel")); - - formLayout->setWidget(6, QFormLayout::LabelRole, objectFileNameLabel); - - objectFileNameEdit = new QLineEdit(buildTab); - objectFileNameEdit->setObjectName(QString::fromUtf8("objectFileNameEdit")); - - formLayout->setWidget(6, QFormLayout::FieldRole, objectFileNameEdit); - - gdbPathLabel = new QLabel(buildTab); - gdbPathLabel->setObjectName(QString::fromUtf8("gdbPathLabel")); - - formLayout->setWidget(7, QFormLayout::LabelRole, gdbPathLabel); - - gdbPathEdit = new QLineEdit(buildTab); - gdbPathEdit->setObjectName(QString::fromUtf8("gdbPathEdit")); - - formLayout->setWidget(7, QFormLayout::FieldRole, gdbPathEdit); - - assemblerWorkingDirectoryLabel = new QLabel(buildTab); - assemblerWorkingDirectoryLabel->setObjectName(QString::fromUtf8("assemblerWorkingDirectoryLabel")); - - formLayout->setWidget(11, QFormLayout::LabelRole, assemblerWorkingDirectoryLabel); - - runInCurrentDirectoryCheckbox = new QCheckBox(buildTab); - runInCurrentDirectoryCheckbox->setObjectName(QString::fromUtf8("runInCurrentDirectoryCheckbox")); - runInCurrentDirectoryCheckbox->setEnabled(true); - - formLayout->setWidget(11, QFormLayout::FieldRole, runInCurrentDirectoryCheckbox); - - disableLinkingLabel = new QLabel(buildTab); - disableLinkingLabel->setObjectName(QString::fromUtf8("disableLinkingLabel")); - - formLayout->setWidget(12, QFormLayout::LabelRole, disableLinkingLabel); - - disableLinkingCheckbox = new QCheckBox(buildTab); - disableLinkingCheckbox->setObjectName(QString::fromUtf8("disableLinkingCheckbox")); - disableLinkingCheckbox->setEnabled(true); - - formLayout->setWidget(12, QFormLayout::FieldRole, disableLinkingCheckbox); - - gdbVerboseLabel = new QLabel(buildTab); - gdbVerboseLabel->setObjectName(QString::fromUtf8("gdbVerboseLabel")); - - formLayout->setWidget(10, QFormLayout::LabelRole, gdbVerboseLabel); - - sasmVerboseCheckBox = new QCheckBox(buildTab); - sasmVerboseCheckBox->setObjectName(QString::fromUtf8("sasmVerboseCheckBox")); - - formLayout->setWidget(10, QFormLayout::FieldRole, sasmVerboseCheckBox); - - - verticalLayout_6->addLayout(formLayout); - - infoLabel = new QLabel(buildTab); - infoLabel->setObjectName(QString::fromUtf8("infoLabel")); - infoLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); - - verticalLayout_6->addWidget(infoLabel); - - tabWidget->addTab(buildTab, QString()); - - verticalLayout->addWidget(tabWidget); - - buttonBox = new QDialogButtonBox(SettingsWindow); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); - buttonBox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok); - - verticalLayout->addWidget(buttonBox); - - QWidget::setTabOrder(startWindow, fontSizeSpinBox); - QWidget::setTabOrder(fontSizeSpinBox, fontComboBox); - QWidget::setTabOrder(fontComboBox, resetAllButton); - QWidget::setTabOrder(resetAllButton, language); - - retranslateUi(SettingsWindow); - - tabWidget->setCurrentIndex(2); - quotationColorButton->setDefault(false); - systemColorButton->setDefault(false); - commentsColorButton_2->setDefault(false); - keywordsColorButton->setDefault(false); - keywordsColorButton_2->setDefault(false); - iomacroColorButton_2->setDefault(false); - labelsColorButton->setDefault(false); - quotationColorButton_2->setDefault(false); - memoryColorButton->setDefault(false); - systemColorButton_2->setDefault(false); - labelsColorButton_2->setDefault(false); - iomacroColorButton->setDefault(false); - registersColorButton_2->setDefault(false); - numbersColorButton->setDefault(false); - commentsColorButton->setDefault(false); - memoryColorButton_2->setDefault(false); - registersColorButton->setDefault(false); - numbersColorButton_2->setDefault(false); - fontColorButton->setDefault(false); - debugLineColorButton->setDefault(false); - currentLineColorButton->setDefault(false); - backgroundColorButton->setDefault(false); - lineNumberPanelColorButton->setDefault(false); - lineNumberFontColorButton->setDefault(false); - - - QMetaObject::connectSlotsByName(SettingsWindow); - } // setupUi - - void retranslateUi(QWidget *SettingsWindow) - { - SettingsWindow->setWindowTitle(QApplication::translate("SettingsWindow", "Settings", nullptr)); - settingsLabel->setText(QApplication::translate("SettingsWindow", "SASM Options", nullptr)); - commonSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); - startWindowLabel->setText(QApplication::translate("SettingsWindow", "On start:", nullptr)); - startWindow->setItemText(0, QApplication::translate("SettingsWindow", "Open get started window", nullptr)); - startWindow->setItemText(1, QApplication::translate("SettingsWindow", "Restore previous session", nullptr)); - - languageLabel->setText(QApplication::translate("SettingsWindow", "Language:", nullptr)); - language->setItemText(6, QApplication::translate("SettingsWindow", "Polski", nullptr)); - language->setItemText(7, QApplication::translate("SettingsWindow", "\327\242\327\221\327\250\327\231\327\252", nullptr)); - language->setItemText(8, QApplication::translate("SettingsWindow", "Espa\303\261ol", nullptr)); - - label_4->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - registersLabel_2->setText(QApplication::translate("SettingsWindow", "Show all registers in debug:", nullptr)); - registersYesRadioButton->setText(QApplication::translate("SettingsWindow", "Yes", nullptr)); - registersNoRadioButton->setText(QApplication::translate("SettingsWindow", "No, show only general purpose", nullptr)); - insertDebugStringLabel->setText(QApplication::translate("SettingsWindow", "Insert debug string:", nullptr)); - insertDebugStringCheckBox->setText(QString()); - codeSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Code editor", nullptr)); - fontLabel->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); - fontSizeLabel->setText(QApplication::translate("SettingsWindow", "Size:", nullptr)); - label->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - label_2->setText(QApplication::translate("SettingsWindow", "Default code editor text:", nullptr)); - resetAllButton->setText(QApplication::translate("SettingsWindow", "Reset all (need a restart)...", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(commonTab), QApplication::translate("SettingsWindow", "Common", nullptr)); - groupBox->setTitle(QApplication::translate("SettingsWindow", "Syntax highlighting", nullptr)); - iomacroBoldCheckBox->setText(QString()); - systemLabel->setText(QApplication::translate("SettingsWindow", "System:", nullptr)); - quotationColorButton->setText(QString()); - systemColorButton->setText(QString()); - numbersItalicCheckBox->setText(QString()); - label_6->setText(QApplication::translate("SettingsWindow", "Bold:", nullptr)); - numbersBoldCheckBox->setText(QString()); - label_7->setText(QApplication::translate("SettingsWindow", "Italic:", nullptr)); - label_3->setText(QApplication::translate("SettingsWindow", "Foreground:", nullptr)); - systemItalicCheckBox->setText(QString()); - commentsColorButton_2->setText(QString()); - keywordsColorButton->setText(QString()); - commentsBoldCheckBox->setText(QString()); - keywordsColorButton_2->setText(QString()); - iomacroColorButton_2->setText(QString()); - memoryItalicCheckBox->setText(QString()); - keywordsLabel->setText(QApplication::translate("SettingsWindow", "Keywords:", nullptr)); - label_5->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); - labelsColorButton->setText(QString()); - numbersLabel->setText(QApplication::translate("SettingsWindow", "Numbers:", nullptr)); - quotationColorButton_2->setText(QString()); - labelsLabel->setText(QApplication::translate("SettingsWindow", "Labels:", nullptr)); - commentsLabel->setText(QApplication::translate("SettingsWindow", "Comments:", nullptr)); - memoryColorButton->setText(QString()); - systemColorButton_2->setText(QString()); - iomacroLabel_2->setText(QApplication::translate("SettingsWindow", "Quotation:", nullptr)); - labelsColorButton_2->setText(QString()); - registersBoldCheckBox->setText(QString()); - quotationBoldCheckBox->setText(QString()); - iomacroColorButton->setText(QString()); - iomacroItalicCheckBox->setText(QString()); - registersColorButton_2->setText(QString()); - keywordsBoldCheckBox->setText(QString()); - memoryBoldCheckBox->setText(QString()); - numbersColorButton->setText(QString()); - quotationItalicCheckBox->setText(QString()); - commentsColorButton->setText(QString()); - labelsItalicCheckBox->setText(QString()); - memoryLabel->setText(QApplication::translate("SettingsWindow", "Memory:", nullptr)); - iomacroLabel->setText(QApplication::translate("SettingsWindow", "I/O macro:", nullptr)); - keywordsItalicCheckBox->setText(QString()); - registersLabel->setText(QApplication::translate("SettingsWindow", "Registers:", nullptr)); - commentsItalicCheckBox->setText(QString()); - labelsBoldCheckBox->setText(QString()); - registersItalicCheckBox->setText(QString()); - systemBoldCheckBox->setText(QString()); - memoryColorButton_2->setText(QString()); - registersColorButton->setText(QString()); - numbersColorButton_2->setText(QString()); - groupBox_2->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); - fontLabel_2->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); - fontColorButton->setText(QString()); - currentLineCheckBox->setText(QApplication::translate("SettingsWindow", "Enable highlighting", nullptr)); - debugLineColorButton->setText(QString()); - currentLineLabel->setText(QApplication::translate("SettingsWindow", "Current line:", nullptr)); - debugLineLabel->setText(QApplication::translate("SettingsWindow", "Debugging line:", nullptr)); - currentLineColorButton->setText(QString()); - backgroundLabel->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); - backgroundColorButton->setText(QString()); - lineNumberPanelLabel->setText(QApplication::translate("SettingsWindow", "Line number panel:", nullptr)); - lineNumberPanelColorButton->setText(QString()); - lineNumberFontLabel->setText(QApplication::translate("SettingsWindow", "Line number font:", nullptr)); - lineNumberFontColorButton->setText(QString()); - label_8->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(colorsTab), QApplication::translate("SettingsWindow", "Colors", nullptr)); - modeLabel->setText(QApplication::translate("SettingsWindow", "Mode:", nullptr)); - x86RadioButton->setText(QApplication::translate("SettingsWindow", "x86", nullptr)); - x64RadioButton->setText(QApplication::translate("SettingsWindow", "x64", nullptr)); - assemblerLabel->setText(QApplication::translate("SettingsWindow", "Assembler:", nullptr)); - nasmRadioButton->setText(QApplication::translate("SettingsWindow", "NASM", nullptr)); - gasRadioButton->setText(QApplication::translate("SettingsWindow", "GAS", nullptr)); - fasmRadioButton->setText(QApplication::translate("SettingsWindow", "FASM", nullptr)); - masmRadioButton->setText(QApplication::translate("SettingsWindow", "MASM", nullptr)); - assemblyLabel->setText(QApplication::translate("SettingsWindow", "Assembly options:", nullptr)); - linkingLabel->setText(QApplication::translate("SettingsWindow", "Linking options:", nullptr)); - assemblerPathLabel->setText(QApplication::translate("SettingsWindow", "Assembler path:", nullptr)); - linkerPathLabel->setText(QApplication::translate("SettingsWindow", "Linker path:", nullptr)); - objectFileNameLabel->setText(QApplication::translate("SettingsWindow", "Object file name:", nullptr)); - gdbPathLabel->setText(QApplication::translate("SettingsWindow", "GDB path (Unix only):", nullptr)); - assemblerWorkingDirectoryLabel->setText(QApplication::translate("SettingsWindow", "Build in current directory:", nullptr)); - runInCurrentDirectoryCheckbox->setText(QString()); - disableLinkingLabel->setText(QApplication::translate("SettingsWindow", "Disable linking:", nullptr)); - disableLinkingCheckbox->setText(QString()); - gdbVerboseLabel->setText(QApplication::translate("SettingsWindow", "SASM verbose mode:", nullptr)); - sasmVerboseCheckBox->setText(QString()); - infoLabel->setText(QString()); - tabWidget->setTabText(tabWidget->indexOf(buildTab), QApplication::translate("SettingsWindow", "Build", nullptr)); - } // retranslateUi - -}; - -namespace Ui { - class SettingsWindow: public Ui_SettingsWindow {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_SETTINGS_H From 84a152a585d21aa57723ee1a32a5e9642602476a Mon Sep 17 00:00:00 2001 From: Martin SCHREIBER Date: Thu, 21 Jan 2021 14:15:36 +0100 Subject: [PATCH 06/86] QT5 --- README.txt | 6 +++ SASM.pro | 1 + ui_settings.h | 134 +++++++++++++++++++++++++------------------------- 3 files changed, 74 insertions(+), 67 deletions(-) diff --git a/README.txt b/README.txt index faccf314..3ac13353 100644 --- a/README.txt +++ b/README.txt @@ -16,6 +16,8 @@ You need: gcc (x86) or gcc-multilib (x64) gdb nasm + +For QT4, install qt4-qmake libqt4-dev libqt4-core @@ -24,6 +26,10 @@ You need: libxcb-render0 libxcb-icccm4 +For QT5, install + qt5-default + + Download sources and unpack their. Go to directory with their: "cd " Further print commands: diff --git a/SASM.pro b/SASM.pro index 6e99b538..391369fe 100644 --- a/SASM.pro +++ b/SASM.pro @@ -4,6 +4,7 @@ # #------------------------------------------------- + QT += core gui greaterThan(QT_MAJOR_VERSION, 4): QT += widgets diff --git a/ui_settings.h b/ui_settings.h index b1a39970..08bb67ed 100644 --- a/ui_settings.h +++ b/ui_settings.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'settings.ui' ** -** Created by: Qt User Interface Compiler version 5.12.4 +** Created by: Qt User Interface Compiler version 5.15.2 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -1252,41 +1252,41 @@ class Ui_SettingsWindow void retranslateUi(QWidget *SettingsWindow) { - SettingsWindow->setWindowTitle(QApplication::translate("SettingsWindow", "Settings", nullptr)); - settingsLabel->setText(QApplication::translate("SettingsWindow", "SASM Options", nullptr)); - commonSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); - startWindowLabel->setText(QApplication::translate("SettingsWindow", "On start:", nullptr)); - startWindow->setItemText(0, QApplication::translate("SettingsWindow", "Open get started window", nullptr)); - startWindow->setItemText(1, QApplication::translate("SettingsWindow", "Restore previous session", nullptr)); - - languageLabel->setText(QApplication::translate("SettingsWindow", "Language:", nullptr)); - language->setItemText(6, QApplication::translate("SettingsWindow", "Polski", nullptr)); - language->setItemText(7, QApplication::translate("SettingsWindow", "\327\242\327\221\327\250\327\231\327\252", nullptr)); - language->setItemText(8, QApplication::translate("SettingsWindow", "Espa\303\261ol", nullptr)); - - label_4->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - registersLabel_2->setText(QApplication::translate("SettingsWindow", "Show all registers in debug:", nullptr)); - registersYesRadioButton->setText(QApplication::translate("SettingsWindow", "Yes", nullptr)); - registersNoRadioButton->setText(QApplication::translate("SettingsWindow", "No, show only general purpose", nullptr)); - insertDebugStringLabel->setText(QApplication::translate("SettingsWindow", "Insert debug string:", nullptr)); + SettingsWindow->setWindowTitle(QCoreApplication::translate("SettingsWindow", "Settings", nullptr)); + settingsLabel->setText(QCoreApplication::translate("SettingsWindow", "SASM Options", nullptr)); + commonSettingsBox->setTitle(QCoreApplication::translate("SettingsWindow", "Common", nullptr)); + startWindowLabel->setText(QCoreApplication::translate("SettingsWindow", "On start:", nullptr)); + startWindow->setItemText(0, QCoreApplication::translate("SettingsWindow", "Open get started window", nullptr)); + startWindow->setItemText(1, QCoreApplication::translate("SettingsWindow", "Restore previous session", nullptr)); + + languageLabel->setText(QCoreApplication::translate("SettingsWindow", "Language:", nullptr)); + language->setItemText(6, QCoreApplication::translate("SettingsWindow", "Polski", nullptr)); + language->setItemText(7, QCoreApplication::translate("SettingsWindow", "\327\242\327\221\327\250\327\231\327\252", nullptr)); + language->setItemText(8, QCoreApplication::translate("SettingsWindow", "Espa\303\261ol", nullptr)); + + label_4->setText(QCoreApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + registersLabel_2->setText(QCoreApplication::translate("SettingsWindow", "Show all registers in debug:", nullptr)); + registersYesRadioButton->setText(QCoreApplication::translate("SettingsWindow", "Yes", nullptr)); + registersNoRadioButton->setText(QCoreApplication::translate("SettingsWindow", "No, show only general purpose", nullptr)); + insertDebugStringLabel->setText(QCoreApplication::translate("SettingsWindow", "Insert debug string:", nullptr)); insertDebugStringCheckBox->setText(QString()); - codeSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Code editor", nullptr)); - fontLabel->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); - fontSizeLabel->setText(QApplication::translate("SettingsWindow", "Size:", nullptr)); - label->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - label_2->setText(QApplication::translate("SettingsWindow", "Default code editor text:", nullptr)); - resetAllButton->setText(QApplication::translate("SettingsWindow", "Reset all (need a restart)...", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(commonTab), QApplication::translate("SettingsWindow", "Common", nullptr)); - groupBox->setTitle(QApplication::translate("SettingsWindow", "Syntax highlighting", nullptr)); + codeSettingsBox->setTitle(QCoreApplication::translate("SettingsWindow", "Code editor", nullptr)); + fontLabel->setText(QCoreApplication::translate("SettingsWindow", "Font:", nullptr)); + fontSizeLabel->setText(QCoreApplication::translate("SettingsWindow", "Size:", nullptr)); + label->setText(QCoreApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + label_2->setText(QCoreApplication::translate("SettingsWindow", "Default code editor text:", nullptr)); + resetAllButton->setText(QCoreApplication::translate("SettingsWindow", "Reset all (need a restart)...", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(commonTab), QCoreApplication::translate("SettingsWindow", "Common", nullptr)); + groupBox->setTitle(QCoreApplication::translate("SettingsWindow", "Syntax highlighting", nullptr)); iomacroBoldCheckBox->setText(QString()); - systemLabel->setText(QApplication::translate("SettingsWindow", "System:", nullptr)); + systemLabel->setText(QCoreApplication::translate("SettingsWindow", "System:", nullptr)); quotationColorButton->setText(QString()); systemColorButton->setText(QString()); numbersItalicCheckBox->setText(QString()); - label_6->setText(QApplication::translate("SettingsWindow", "Bold:", nullptr)); + label_6->setText(QCoreApplication::translate("SettingsWindow", "Bold:", nullptr)); numbersBoldCheckBox->setText(QString()); - label_7->setText(QApplication::translate("SettingsWindow", "Italic:", nullptr)); - label_3->setText(QApplication::translate("SettingsWindow", "Foreground:", nullptr)); + label_7->setText(QCoreApplication::translate("SettingsWindow", "Italic:", nullptr)); + label_3->setText(QCoreApplication::translate("SettingsWindow", "Foreground:", nullptr)); systemItalicCheckBox->setText(QString()); commentsColorButton_2->setText(QString()); keywordsColorButton->setText(QString()); @@ -1294,16 +1294,16 @@ class Ui_SettingsWindow keywordsColorButton_2->setText(QString()); iomacroColorButton_2->setText(QString()); memoryItalicCheckBox->setText(QString()); - keywordsLabel->setText(QApplication::translate("SettingsWindow", "Keywords:", nullptr)); - label_5->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); + keywordsLabel->setText(QCoreApplication::translate("SettingsWindow", "Keywords:", nullptr)); + label_5->setText(QCoreApplication::translate("SettingsWindow", "Background:", nullptr)); labelsColorButton->setText(QString()); - numbersLabel->setText(QApplication::translate("SettingsWindow", "Numbers:", nullptr)); + numbersLabel->setText(QCoreApplication::translate("SettingsWindow", "Numbers:", nullptr)); quotationColorButton_2->setText(QString()); - labelsLabel->setText(QApplication::translate("SettingsWindow", "Labels:", nullptr)); - commentsLabel->setText(QApplication::translate("SettingsWindow", "Comments:", nullptr)); + labelsLabel->setText(QCoreApplication::translate("SettingsWindow", "Labels:", nullptr)); + commentsLabel->setText(QCoreApplication::translate("SettingsWindow", "Comments:", nullptr)); memoryColorButton->setText(QString()); systemColorButton_2->setText(QString()); - iomacroLabel_2->setText(QApplication::translate("SettingsWindow", "Quotation:", nullptr)); + iomacroLabel_2->setText(QCoreApplication::translate("SettingsWindow", "Quotation:", nullptr)); labelsColorButton_2->setText(QString()); registersBoldCheckBox->setText(QString()); quotationBoldCheckBox->setText(QString()); @@ -1316,10 +1316,10 @@ class Ui_SettingsWindow quotationItalicCheckBox->setText(QString()); commentsColorButton->setText(QString()); labelsItalicCheckBox->setText(QString()); - memoryLabel->setText(QApplication::translate("SettingsWindow", "Memory:", nullptr)); - iomacroLabel->setText(QApplication::translate("SettingsWindow", "I/O macro:", nullptr)); + memoryLabel->setText(QCoreApplication::translate("SettingsWindow", "Memory:", nullptr)); + iomacroLabel->setText(QCoreApplication::translate("SettingsWindow", "I/O macro:", nullptr)); keywordsItalicCheckBox->setText(QString()); - registersLabel->setText(QApplication::translate("SettingsWindow", "Registers:", nullptr)); + registersLabel->setText(QCoreApplication::translate("SettingsWindow", "Registers:", nullptr)); commentsItalicCheckBox->setText(QString()); labelsBoldCheckBox->setText(QString()); registersItalicCheckBox->setText(QString()); @@ -1327,44 +1327,44 @@ class Ui_SettingsWindow memoryColorButton_2->setText(QString()); registersColorButton->setText(QString()); numbersColorButton_2->setText(QString()); - groupBox_2->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); - fontLabel_2->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); + groupBox_2->setTitle(QCoreApplication::translate("SettingsWindow", "Common", nullptr)); + fontLabel_2->setText(QCoreApplication::translate("SettingsWindow", "Font:", nullptr)); fontColorButton->setText(QString()); - currentLineCheckBox->setText(QApplication::translate("SettingsWindow", "Enable highlighting", nullptr)); + currentLineCheckBox->setText(QCoreApplication::translate("SettingsWindow", "Enable highlighting", nullptr)); debugLineColorButton->setText(QString()); - currentLineLabel->setText(QApplication::translate("SettingsWindow", "Current line:", nullptr)); - debugLineLabel->setText(QApplication::translate("SettingsWindow", "Debugging line:", nullptr)); + currentLineLabel->setText(QCoreApplication::translate("SettingsWindow", "Current line:", nullptr)); + debugLineLabel->setText(QCoreApplication::translate("SettingsWindow", "Debugging line:", nullptr)); currentLineColorButton->setText(QString()); - backgroundLabel->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); + backgroundLabel->setText(QCoreApplication::translate("SettingsWindow", "Background:", nullptr)); backgroundColorButton->setText(QString()); - lineNumberPanelLabel->setText(QApplication::translate("SettingsWindow", "Line number panel:", nullptr)); + lineNumberPanelLabel->setText(QCoreApplication::translate("SettingsWindow", "Line number panel:", nullptr)); lineNumberPanelColorButton->setText(QString()); - lineNumberFontLabel->setText(QApplication::translate("SettingsWindow", "Line number font:", nullptr)); + lineNumberFontLabel->setText(QCoreApplication::translate("SettingsWindow", "Line number font:", nullptr)); lineNumberFontColorButton->setText(QString()); - label_8->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(colorsTab), QApplication::translate("SettingsWindow", "Colors", nullptr)); - modeLabel->setText(QApplication::translate("SettingsWindow", "Mode:", nullptr)); - x86RadioButton->setText(QApplication::translate("SettingsWindow", "x86", nullptr)); - x64RadioButton->setText(QApplication::translate("SettingsWindow", "x64", nullptr)); - assemblerLabel->setText(QApplication::translate("SettingsWindow", "Assembler:", nullptr)); - nasmRadioButton->setText(QApplication::translate("SettingsWindow", "NASM", nullptr)); - gasRadioButton->setText(QApplication::translate("SettingsWindow", "GAS", nullptr)); - fasmRadioButton->setText(QApplication::translate("SettingsWindow", "FASM", nullptr)); - masmRadioButton->setText(QApplication::translate("SettingsWindow", "MASM", nullptr)); - assemblyLabel->setText(QApplication::translate("SettingsWindow", "Assembly options:", nullptr)); - linkingLabel->setText(QApplication::translate("SettingsWindow", "Linking options:", nullptr)); - assemblerPathLabel->setText(QApplication::translate("SettingsWindow", "Assembler path:", nullptr)); - linkerPathLabel->setText(QApplication::translate("SettingsWindow", "Linker path:", nullptr)); - objectFileNameLabel->setText(QApplication::translate("SettingsWindow", "Object file name:", nullptr)); - gdbPathLabel->setText(QApplication::translate("SettingsWindow", "GDB path (Unix only):", nullptr)); - assemblerWorkingDirectoryLabel->setText(QApplication::translate("SettingsWindow", "Build in current directory:", nullptr)); + label_8->setText(QCoreApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(colorsTab), QCoreApplication::translate("SettingsWindow", "Colors", nullptr)); + modeLabel->setText(QCoreApplication::translate("SettingsWindow", "Mode:", nullptr)); + x86RadioButton->setText(QCoreApplication::translate("SettingsWindow", "x86", nullptr)); + x64RadioButton->setText(QCoreApplication::translate("SettingsWindow", "x64", nullptr)); + assemblerLabel->setText(QCoreApplication::translate("SettingsWindow", "Assembler:", nullptr)); + nasmRadioButton->setText(QCoreApplication::translate("SettingsWindow", "NASM", nullptr)); + gasRadioButton->setText(QCoreApplication::translate("SettingsWindow", "GAS", nullptr)); + fasmRadioButton->setText(QCoreApplication::translate("SettingsWindow", "FASM", nullptr)); + masmRadioButton->setText(QCoreApplication::translate("SettingsWindow", "MASM", nullptr)); + assemblyLabel->setText(QCoreApplication::translate("SettingsWindow", "Assembly options:", nullptr)); + linkingLabel->setText(QCoreApplication::translate("SettingsWindow", "Linking options:", nullptr)); + assemblerPathLabel->setText(QCoreApplication::translate("SettingsWindow", "Assembler path:", nullptr)); + linkerPathLabel->setText(QCoreApplication::translate("SettingsWindow", "Linker path:", nullptr)); + objectFileNameLabel->setText(QCoreApplication::translate("SettingsWindow", "Object file name:", nullptr)); + gdbPathLabel->setText(QCoreApplication::translate("SettingsWindow", "GDB path (Unix only):", nullptr)); + assemblerWorkingDirectoryLabel->setText(QCoreApplication::translate("SettingsWindow", "Build in current directory:", nullptr)); runInCurrentDirectoryCheckbox->setText(QString()); - disableLinkingLabel->setText(QApplication::translate("SettingsWindow", "Disable linking:", nullptr)); + disableLinkingLabel->setText(QCoreApplication::translate("SettingsWindow", "Disable linking:", nullptr)); disableLinkingCheckbox->setText(QString()); - gdbVerboseLabel->setText(QApplication::translate("SettingsWindow", "SASM verbose mode:", nullptr)); + gdbVerboseLabel->setText(QCoreApplication::translate("SettingsWindow", "SASM verbose mode:", nullptr)); sasmVerboseCheckBox->setText(QString()); infoLabel->setText(QString()); - tabWidget->setTabText(tabWidget->indexOf(buildTab), QApplication::translate("SettingsWindow", "Build", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(buildTab), QCoreApplication::translate("SettingsWindow", "Build", nullptr)); } // retranslateUi }; From 815f0d452be7034b58aa229eb8ef2e3f95984674 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Thu, 4 Feb 2021 11:25:07 +0100 Subject: [PATCH 07/86] Creating new branch --- Linux/share/sasm/Projects/NASMHello.asm | 9 +- debugger.cpp | 410 +++++++++++++++++++++++- debugger.h | 6 +- mainwindow.cpp | 13 +- mainwindow.h | 1 + moc_predefs.h | 391 ++++++++++++++++++++++ settings.ui | 14 + ui_settings.h | 148 +++++---- 8 files changed, 915 insertions(+), 77 deletions(-) create mode 100644 moc_predefs.h diff --git a/Linux/share/sasm/Projects/NASMHello.asm b/Linux/share/sasm/Projects/NASMHello.asm index 370ad00e..2a6af949 100644 --- a/Linux/share/sasm/Projects/NASMHello.asm +++ b/Linux/share/sasm/Projects/NASMHello.asm @@ -1,13 +1,20 @@ -%include "io.inc" +%include "io64.inc" section .data msg db 'Hello, world!', 0 + msg2 db 'adadd', 0 section .text global CMAIN CMAIN: + mov rbp, rsp; for correct debugging + mov rbp, rsp + PRINT_STRING msg + mov rbp, rsp mov ebp, esp PRINT_STRING msg NEWLINE + NEWLINE + PRINT_STRING msg2 xor eax, eax ret \ No newline at end of file diff --git a/debugger.cpp b/debugger.cpp index 5f4a866b..6236d502 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -53,7 +53,7 @@ namespace { } -Debugger::Debugger(QTextEdit *tEdit, const QString &i_path, const QString &tmp, Assembler *i_assembler, const QString &i_gdbpath, QWidget *parent, bool i_verbose) +Debugger::Debugger(QTextEdit *tEdit, const QString &i_path, const QString &tmp, Assembler *i_assembler, const QString &i_gdbpath, QWidget *parent, bool i_verbose, bool i_mimode) : QObject(parent) { QSettings settings("SASM Project", "SASM"); @@ -67,6 +67,7 @@ Debugger::Debugger(QTextEdit *tEdit, const QString &i_path, const QString &tmp, gdbPath = i_gdbpath; assembler = i_assembler; verbose = i_verbose; + mimode = i_mimode; } bool Debugger::run() @@ -117,6 +118,10 @@ bool Debugger::run() QStringList arguments; arguments << path; + + if (mimode) { + arguments << "--interpreter=mi"; + } printLog(tr("Starting Debugger: ")+gdb+" "+arguments.join(" ")+"\n", Qt::darkGreen); @@ -178,15 +183,19 @@ void Debugger::processOutput() if (index != -1) { //if whole message ready to processing (end of whole message is "(gdb)") if (verbose) { - printLog(buffer+"\n", Qt::red); - printLog(errorBuffer+"\n", Qt::red); + printLog(buffer+"\n", Qt::blue); + printLog(errorBuffer+"\n", Qt::blue); } - QString output = buffer.left(index); QString error = errorBuffer.left(linefeedIndex); - buffer.remove(0, index + 5); //remove processed message + buffer.remove(0, index + 5); + //remove processed message errorBuffer.remove(0, linefeedIndex + 1); - processMessage(output, error); + if(!mimode){ + processMessage(output, error); + }else{ + processMessageMiMode(output, error); + } } bufferTimer->start(10); } @@ -246,7 +255,6 @@ void Debugger::processMessage(QString output, QString error) //skip this information (for gdb 8.0) c++; - processLst(); //count accordance gdb_cmd_run(); //perform Debugger::run(), that run program and open I/O files return; } @@ -566,6 +574,394 @@ void Debugger::processAction(QString output, QString error) emit printLog(output); } +void Debugger::processMessageMiMode(QString output, QString error) +{ + if (error.indexOf("PC register is not available") != -1) { + emit printLog(tr("GDB error\n"), Qt::red); + emit finished(); + return; + } + if (c == 0) { //in start wait for printing of start gdb text like this: + /*GNU gdb (GDB) 7.4 + + Copyright (C) 2012 Free Software Foundation, Inc. + License GPLv3+: GNU GPL version 3 or later + This is free software: you are free to change and redistribute it. + There is NO WARRANTY, to the extent permitted by law. Type "show copying" + and "show warranty" for details. + + This GDB was configured as "i686-pc-mingw32". + For bug reporting instructions, please see: + ... + Reading symbols from C:\Users\Dmitri\Dropbox\Projects\SASMstatic\release\Program\SASMprog.exe... + + done. + (gdb)*/ + c++; + doInput(QString("disas main\n"), none); + return; + } + + if (c == 1) { + if (error.indexOf("No symbol", 0, Qt::CaseInsensitive)!=-1) { + dbgSymbols = false; + } else { + dbgSymbols = true; + } + } + + if (dbgSymbols) { //debug symbols exists + if (c == 1 && output != " ") { + /*Dump of assembler code for function sasmStartL: + 0x00401390 <+0>: xor %eax,%eax + 0x00401392 <+2>: ret + 0x00401393 <+3>: add %dl,-0x77(%ebp) + End of assembler dump.*/ + //skip this information (for gdb 8.0) + c++; + + gdb_cmd_run(); //perform Debugger::run(), that run program and open I/O files + return; + } + + //determine run of program + //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () + if (c == 2 && output.indexOf(QString(" in ")) != -1) { + //set accordance between program in memory and program in file + //in example we need 0x00401390 + + //count offset + QRegExp r = QRegExp("addr=\"0x[0-9a-fA-F]{8,16}"); + int index = r.indexIn(output); + //take offset in hexadecimal representation (10 symbols) from string and convert it to int + offset = output.mid(index+6, r.matchedLength()-6).toULongLong(0, 16); + processLst(); //count accordance + + c++; + actionTypeQueue.enqueue(ni); + doInput("info inferiors\n", none); + } + + //if an error with the wrong name of the section has occurred + if ((c == 2 && output.indexOf(QString("Make breakpoint pending on future shared library load")) != -1) + || (c == 1 && output == " ")) { + actionTypeQueue.enqueue(anyAction); + processActionMiMode(tr("An error has occurred in the debugger. Please check the names of the sections.")); + QObject::disconnect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutputToBuffer())); + emit finished(); + } + } else { //debug symbols does not exists (for example, non-gcc linker) + if (c == 1) { + offset = entryPoint; //changes in processLst() + c++; + processLst(); //count accordance + gdb_cmd_run(); //perform Debugger::run(), that run program and open I/O files + return; + } + + //determine run of program + //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () + if (c == 2 && output.indexOf(QString(" in ")) != -1) { + c++; + actionTypeQueue.enqueue(ni); + doInput("info inferiors\n", none); + } + } + + //interrupt while debugging (program was stopped) + #ifdef Q_OS_WIN32 + QString interruptSig("SIGTRAP"); + #else + QString interruptSig("SIGINT"); + #endif + if (output.indexOf(interruptSig) != -1) { + stopped = true; + emit wasStopped(); + return; + } + + if (!pid) { + QRegExp r("Num +Description +Executable"); + int index = output.indexOf(r); + if (index != -1) { + QString processString("process "); + r = QRegExp(processString + "[0-9]+"); + index = output.indexOf(r); + output = output.mid(index + processString.length()); + output = output.split(QChar(' ')).at(0); + pid = output.toULongLong(0, 10); + return; + } + } + + //process all actions after start + if (c == 3) //if (output.indexOf(QString("$1 =")) == -1 && output.indexOf(QString("&\"si")) == -1 && output.indexOf(QString("&\"ni")) == -1 &&) //input file + if (output.indexOf(QRegExp("$1 =|&\"si|&\"ni|&\"c")) == -1 || output.indexOf(QString("&\"clear")) != -1) + processActionMiMode(output, error); +} + +void Debugger::processActionMiMode(QString output, QString error) +{ + bool backtrace = (output.indexOf(QRegExp("#\\d+ 0x[0-9a-fA-F]{8,16} in .* ()")) != -1); + + + if (output.indexOf(exitMessage) != -1 && !backtrace) { + doInput("c\n", none); + return; + } + if (output.indexOf(QRegExp(cExitMessage)) != -1) { //if debug finished + //print output - message like bottom + /*...output...~"[Inferior 1 (process 7372) exited normally]\n" + =thread-exited,id="1",group-id="i1"\u000a=thread-group-exited,id="i1",exit-code="0" + *stopped,reason="exited-normally"\u000a"*/ + + QString msg = output.left(output.lastIndexOf(QChar('~'))); //program output + msg.remove(0,2); //rm first view whitespace + emit printOutput(msg); + + //exit from debugging + QObject::disconnect(process, SIGNAL(readyReadStandardOutput()), this, SLOT(readOutputToBuffer())); + emit finished(); + return; + } + if (actionTypeQueue.isEmpty()) { + return; + } + DebugActionType actionType = actionTypeQueue.dequeue(); + + if (actionType == breakpoint) + return; + + if(actionType == ni && firstAction){ + firstAction = false; + QRegExp r = QRegExp("addr=\"0x[0-9a-fA-F]{8,16}"); + int index = r.indexIn(output); + quint64 lineNumber = output.mid(index+6, r.matchedLength()-6).toULongLong(0, 16); + + bool found = false; + for (int i = lines.count() - 1; i >= 0; i--) { + if (lineNumber == lines[i].numInMem) { + lineNumber = lines[i].numInCode; + found = true; + break; + } + } + + if (!found) { + //output = tr("Inside the macro or outside the program.") + '\n'; + emit inMacro(); + return; + } else { //if found highlight and print it + //highlight line number + emit highlightLine(lineNumber); + stopped = true; + emit wasStopped(); + return; + } + } + + if (actionType == si || actionType == ni || actionType == showLine) { + //message is: line number + data + //print line number and other data if si or ni and print line number only if showLine + //scan line number in memory + QRegExp r = QRegExp("addr=\"0x[0-9a-fA-F]{8,16}"); + int index = r.indexIn(output); + //print output + if (index > 1) { + QString msg = output.left(output.lastIndexOf(QChar('~'))); //left part - probably output of program; + QRegExp breakpointMsg("=breakpoint"); + QRegExp threadMsg("\\[Switching to Thread [^\\]]*\\]\r?\n");//todo + QRegExp signalMsg("\r?\n(Program received signal.*)");//todo + if (breakpointMsg.indexIn(msg) != -1) + msg.remove(breakpointMsg.indexIn(msg), msg.indexOf(QChar('\n'), breakpointMsg.indexIn(msg)) + 5); + msg.remove(threadMsg); + if (signalMsg.indexIn(msg) != -1) { + QString recievedSignal = signalMsg.cap(1); + if (QRegExp("SIG(TRAP|INT)").indexIn(recievedSignal) == -1) { + emit printLog(recievedSignal, Qt::red); + } + msg.remove(signalMsg); + } + msg.remove(0,2); //rm first view whitespace + emit printOutput(msg); + } + + quint64 lineNumber = output.mid(index+6, r.matchedLength()-6).toULongLong(0, 16); + //take line number in hexadecimal representation + //(10 symbols) in memory from string and convert it to int + + //find line number in accordance array and get number line in file with code + bool found = false; + for (int i = lines.count() - 1; i >= 0; i--) { + if (lineNumber == lines[i].numInMem) { + lineNumber = lines[i].numInCode; + found = true; + break; + } + } + + if (!found) { + //output = tr("Inside the macro or outside the program.") + '\n'; + emit inMacro(); + return; + } else { //if found highlight and print it + //highlight line number + emit highlightLine(lineNumber); + stopped = true; + emit wasStopped(); + + //print string number and all after it + //output = QString::number(lineNumber) + tr(" line") + output.mid(output.indexOf("()") + 2); + if (actionType == showLine) + return; + output.remove(0, output.indexOf("()") + 6); + } + } + + if (actionType == anyAction) { + if (output[output.length() - 1] != '\n') + output += QChar('\n'); + //process as ni or si + if (output.indexOf(QRegExp("0x[0-9a-fA-F]{8,16} in ")) != -1 + && !backtrace) { + actionTypeQueue.enqueue(showLine); + processActionMiMode(output); + } + if (!error.isEmpty()) { + if (output != " \n") + output = error + output; + else + output = error; + } + } + + if (actionType == infoMemory) { + bool isValid = false; + if (output.indexOf(QString("No symbol")) == -1 && + output.indexOf(QString("no debug info")) == -1 && output != QString(" ")) { + //if variable exists (isValid = true) + isValid = true; + int index = output.indexOf(QRegExp("\\$\\d+ = .*")); + if (index == -1) + isValid = false; + else { + output = output.right(output.length() - index); + output = output.right(output.length() - output.indexOf(QChar('=')) - 1); + output = output.left(output.indexOf(QString("\\n"))); + for (int i = output.size() - 1; i >= 0; i--) { + if (output[i].isSpace()) + output.remove(i, 1); + } + } + } + memoryInfo info; + if (isValid) + info.value = output; + info.isValid = isValid; + watches.append(info); + if (watchesCount == watches.size()) { + emit printMemory(watches); + watches.clear(); + } + return; + } + + if (actionType == infoRegisters) { + output.remove(QString("&\"info registers\\n\"")); + output.remove(QString("^done")); + QStringList tmp; + for (QString s : output.split(QChar('\n'), QString::SkipEmptyParts)){ + if (s.at(0) == QChar('~')) + tmp.append(s.remove(QRegExp("\"|~|\n"))); + } + QString filteredoutput = tmp.join(QString("\n")); + QTextStream registersStream(&filteredoutput); + QList registers; + registersInfo info; + QSettings settings("SASM Project", "SASM"); + + QSet general; + QString ip; + QSet segment; + segment << "cs" << "ds" << "ss" << "es" << "fs" << "gs"; + QSet flags; + flags << "eflags" << "mxcsr"; + QSet fpu_info; + fpu_info << "fctrl" << "fstat" << "ftag" << "fiseg" << "fioff" << "foseg" << "fooff" << "fop"; + QRegExp mmx("mm\\d+"); + QRegExp xmm("xmm\\d+"); + QRegExp ymm("ymm\\d+"); + QRegExp fpu_stack("st\\d+"); + + if (settings.value("mode", QString("x86")).toString() == "x86") { + //x86 + + general << "eax" << "ebx" << "ecx" << "edx" << "esi" << "edi" << "esp" << "ebp"; + ip = "eip"; + } else { + //x64 + general << "rax" << "rbx" << "rcx" << "rdx" << "rsi" << "rdi" << "rsp" << "rbp" << + "r8" << "r9" << "r10" << "r11" << "r12" << "r13" << "r14" << "r15"; + ip = "rip"; + } + + for (int i = 0; !registersStream.atEnd(); i++) { + registersStream >> info.name; + + if (info.name.isEmpty()) { + // last empty line + break; + } + + if (general.contains(info.name) || segment.contains(info.name) || fpu_info.contains(info.name) || + info.name == ip || flags.contains(info.name) || fpu_stack.exactMatch(info.name)) { + registersStream >> info.hexValue; + registersStream.skipWhiteSpace(); + info.decValue = registersStream.readLine(); + } else if (mmx.exactMatch(info.name) || xmm.exactMatch(info.name) || ymm.exactMatch(info.name)) { + QMap fields; + + if (!readStruct(registersStream, &fields)) { + // bad news + emit printLog(QString("can not parse register data: ") + info.name + "\n", Qt::red); + break; + } + + if (mmx.exactMatch(info.name)) + info.decValue = fields["v8_int8"]; + else if (xmm.exactMatch(info.name)) + info.decValue = fields["uint128"]; + else if (ymm.exactMatch(info.name)) + info.decValue = fields["v2_int128"]; + + info.hexValue = ""; + } else { + // unknown register, try to skip it. + registersStream.readLine(); + emit printLog(QString("unknown register: ") + info.name + "\n", Qt::red); + continue; + } + + registers.append(info); + if (i == 0 && info.name != "eax" && info.name != "rax" && registersOk) { + doInput(QString("info registers\n"), infoRegisters); + registersOk = false; + return; + } + } + + emit printRegisters(registers); + return; + } + //todo + if (output == QString("\r\n") || output == QString("\n") || + output == QString("\r\n\n") || output == QString("\n\n")||output.at(0)=='*') //if empty or starts with * + return; + + //print information to log field + emit printLog(output); +} + bool Debugger::isStopped() { return stopped; diff --git a/debugger.h b/debugger.h index f53b6912..4b3f6ca6 100644 --- a/debugger.h +++ b/debugger.h @@ -81,7 +81,7 @@ class Debugger : public QObject Q_OBJECT public: - Debugger(QTextEdit *tEdit, const QString &path, const QString &tmp, Assembler *assembler, const QString &gdbpath, QWidget *parent = 0, bool verbose = true); + Debugger(QTextEdit *tEdit, const QString &path, const QString &tmp, Assembler *assembler, const QString &gdbpath, QWidget *parent = 0, bool verbose = true, bool mimode = true); ~Debugger(); void setWatchesCount(int count); @@ -115,6 +115,8 @@ class Debugger : public QObject void gdb_cmd_run(); bool verbose; + bool mimode; + bool con; QProcess *process; QTextEdit *textEdit; @@ -170,7 +172,9 @@ public slots: void readOutputToBuffer(); void processOutput(); void processMessage(QString output, QString error); + void processMessageMiMode(QString output, QString error); void processAction(QString output, QString error = QString()); + void processActionMiMode(QString output, QString error = QString()); void doInput(QString command, DebugActionType actionType); void changeBreakpoint(quint64 lineNumber, bool isAdded); void emitStarted(); diff --git a/mainwindow.cpp b/mainwindow.cpp index 7db755e1..ff5e24ca 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -918,6 +918,10 @@ void MainWindow::buildProgram(bool debugMode) QProcess gccMProcess; gccMProcess.start(gcc, gccMArguments); gccMProcess.waitForFinished(); + QByteArray error = gccMProcess.readAllStandardError(); + QString errorBuffer = QString::fromLocal8Bit(error.constData(), error.size()); + if (errorBuffer.contains("fatal error: ")) + emit printLog(QString("can not compile macro.c: ") + errorBuffer + "\n", Qt::red); #endif //! Final linking @@ -1152,7 +1156,7 @@ void MainWindow::debug() QString gdbpath = settings.value("gdbpath", "gdb").toString(); - debugger = new Debugger(compilerOut, path, Common::pathInTemp(QString()), assembler, gdbpath, 0, settings.value("sasmverbose", false).toBool()); + debugger = new Debugger(compilerOut, path, Common::pathInTemp(QString()), assembler, gdbpath, 0, settings.value("sasmverbose", false).toBool(), settings.value("mi", false).toBool()); // connect print signals for output in Debugger connect(debugger, SIGNAL(printLog(QString,QColor)), this, SLOT(printLog(QString,QColor))); @@ -1854,6 +1858,8 @@ void MainWindow::initAssemblerSettings(bool firstOpening) settingsUi.disableLinkingCheckbox->setChecked(settings.value("disablelinking", false).toBool()); settingsUi.sasmVerboseCheckBox->setChecked(settings.value("sasmverbose", false).toBool()); + + settingsUi.MiModusCheckBox->setChecked(settings.value("mi", false).toBool()); settingsUi.runInCurrentDirectoryCheckbox->setChecked(settings.value("currentdir", false).toBool()); @@ -1994,6 +2000,7 @@ void MainWindow::recreateAssembler(bool start) settingsUi.objectFileNameEdit->setText("program.o"); settingsUi.disableLinkingCheckbox->setChecked(false); settingsUi.sasmVerboseCheckBox->setChecked(false); + settingsUi.MiModusCheckBox->setChecked(false); settingsUi.runInCurrentDirectoryCheckbox->setChecked(false); settingsUi.assemblerPathEdit->setText(assembler->getAssemblerPath()); settingsUi.gdbPathEdit->setText("gdb"); @@ -2004,6 +2011,7 @@ void MainWindow::recreateAssembler(bool start) settings.setValue("disablelinking", false); settings.setValue("currentdir", false); settings.setValue("sasmverbose", false); + settings.setValue("mi", false); settings.setValue("gdbpath", "gdb"); settings.setValue("assemblerpath", assembler->getAssemblerPath()); settings.setValue("linkerpath", assembler->getLinkerPath()); @@ -2028,6 +2036,7 @@ void MainWindow::backupSettings() backupObjectFileName = settings.value("objectfilename", "program.o").toString(); backupGDBPath = settings.value("gdbpath", "gdb").toString(); backupGDBVerbose = settings.value("sasmverbose", false).toBool(); + backupGDBMi = settings.value("mi", false).toBool(); backupDisableLinking = settings.value("disablelinking", false).toBool(); backupCurrentDir = settings.value("currentdir", false).toBool(); backupStartText = settings.value("starttext", assembler->getStartText()).toString(); @@ -2046,6 +2055,7 @@ void MainWindow::restoreSettingsAndExit() settings.setValue("disablelinking", backupDisableLinking); settings.setValue("gdbpath", backupGDBPath); settings.setValue("sasmverbose", backupGDBVerbose); + settings.setValue("mi", backupGDBMi); settings.setValue("currentdir", backupCurrentDir); settings.setValue("starttext", backupStartText); settings.setValue("linkerpath", backupLinkerPath); @@ -2091,6 +2101,7 @@ void MainWindow::saveSettings() settings.setValue("objectfilename", settingsUi.objectFileNameEdit->text()); settings.setValue("disablelinking", settingsUi.disableLinkingCheckbox->isChecked()); settings.setValue("sasmverbose", settingsUi.sasmVerboseCheckBox->isChecked()); + settings.setValue("mi", settingsUi.MiModusCheckBox->isChecked()); settings.setValue("currentdir", settingsUi.runInCurrentDirectoryCheckbox->isChecked()); settings.setValue("assemblerpath", settingsUi.assemblerPathEdit->text()); settings.setValue("gdbpath", settingsUi.gdbPathEdit->text()); diff --git a/mainwindow.h b/mainwindow.h index 227bdfc6..46a37ccb 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -211,6 +211,7 @@ class MainWindow : public QMainWindow QString backupObjectFileName; QString backupGDBPath; QString backupGDBVerbose; + QString backupGDBMi; bool backupDisableLinking; bool backupCurrentDir; QString backupAssemblerPath; diff --git a/moc_predefs.h b/moc_predefs.h new file mode 100644 index 00000000..bbadeee3 --- /dev/null +++ b/moc_predefs.h @@ -0,0 +1,391 @@ +#define __SSP_STRONG__ 3 +#define __DBL_MIN_EXP__ (-1021) +#define __FLT32X_MAX_EXP__ 1024 +#define __cpp_attributes 200809 +#define __UINT_LEAST16_MAX__ 0xffff +#define __ATOMIC_ACQUIRE 2 +#define __FLT128_MAX_10_EXP__ 4932 +#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F +#define __GCC_IEC_559_COMPLEX 2 +#define __cpp_aggregate_nsdmi 201304 +#define __UINT_LEAST8_TYPE__ unsigned char +#define __SIZEOF_FLOAT80__ 16 +#define __INTMAX_C(c) c ## L +#define __CHAR_BIT__ 8 +#define __UINT8_MAX__ 0xff +#define __WINT_MAX__ 0xffffffffU +#define __FLT32_MIN_EXP__ (-125) +#define __cpp_static_assert 200410 +#define __ORDER_LITTLE_ENDIAN__ 1234 +#define __SIZE_MAX__ 0xffffffffffffffffUL +#define __WCHAR_MAX__ 0x7fffffff +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 +#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) +#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 +#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 +#define __GCC_IEC_559 2 +#define __FLT32X_DECIMAL_DIG__ 17 +#define __FLT_EVAL_METHOD__ 0 +#define __unix__ 1 +#define __cpp_binary_literals 201304 +#define __FLT64_DECIMAL_DIG__ 17 +#define __CET__ 3 +#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 +#define __x86_64 1 +#define __cpp_variadic_templates 200704 +#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL +#define __SIG_ATOMIC_TYPE__ int +#define __DBL_MIN_10_EXP__ (-307) +#define __FINITE_MATH_ONLY__ 0 +#define __cpp_variable_templates 201304 +#define __GNUC_PATCHLEVEL__ 0 +#define __FLT32_HAS_DENORM__ 1 +#define __UINT_FAST8_MAX__ 0xff +#define __cpp_rvalue_reference 200610 +#define __has_include(STR) __has_include__(STR) +#define __DEC64_MAX_EXP__ 385 +#define __INT8_C(c) c +#define __INT_LEAST8_WIDTH__ 8 +#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL +#define __SHRT_MAX__ 0x7fff +#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L +#define __FLT64X_MAX_10_EXP__ 4932 +#define __UINT_LEAST8_MAX__ 0xff +#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 +#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 +#define __UINTMAX_TYPE__ long unsigned int +#define __linux 1 +#define __DEC32_EPSILON__ 1E-6DF +#define __FLT_EVAL_METHOD_TS_18661_3__ 0 +#define __OPTIMIZE__ 1 +#define __unix 1 +#define __UINT32_MAX__ 0xffffffffU +#define __GXX_EXPERIMENTAL_CXX0X__ 1 +#define __LDBL_MAX_EXP__ 16384 +#define __FLT128_MIN_EXP__ (-16381) +#define __WINT_MIN__ 0U +#define __linux__ 1 +#define __FLT128_MIN_10_EXP__ (-4931) +#define __INT_LEAST16_WIDTH__ 16 +#define __SCHAR_MAX__ 0x7f +#define __FLT128_MANT_DIG__ 113 +#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) +#define __INT64_C(c) c ## L +#define __DBL_DIG__ 15 +#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 +#define __FLT64X_MANT_DIG__ 64 +#define _FORTIFY_SOURCE 2 +#define __SIZEOF_INT__ 4 +#define __SIZEOF_POINTER__ 8 +#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 +#define __USER_LABEL_PREFIX__ +#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x +#define __STDC_HOSTED__ 1 +#define __LDBL_HAS_INFINITY__ 1 +#define __FLT32_DIG__ 6 +#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F +#define __GXX_WEAK__ 1 +#define __SHRT_WIDTH__ 16 +#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L +#define __DEC32_MAX__ 9.999999E96DF +#define __cpp_threadsafe_static_init 200806 +#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x +#define __FLT32X_HAS_INFINITY__ 1 +#define __INT32_MAX__ 0x7fffffff +#define __INT_WIDTH__ 32 +#define __SIZEOF_LONG__ 8 +#define __STDC_IEC_559__ 1 +#define __STDC_ISO_10646__ 201706L +#define __UINT16_C(c) c +#define __PTRDIFF_WIDTH__ 64 +#define __DECIMAL_DIG__ 21 +#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 +#define __gnu_linux__ 1 +#define __INTMAX_WIDTH__ 64 +#define __FLT64_MIN_EXP__ (-1021) +#define __has_include_next(STR) __has_include_next__(STR) +#define __FLT64X_MIN_10_EXP__ (-4931) +#define __LDBL_HAS_QUIET_NAN__ 1 +#define __FLT64_MANT_DIG__ 53 +#define __GNUC__ 9 +#define __GXX_RTTI 1 +#define __pie__ 2 +#define __MMX__ 1 +#define __cpp_delegating_constructors 200604 +#define __FLT_HAS_DENORM__ 1 +#define __SIZEOF_LONG_DOUBLE__ 16 +#define __BIGGEST_ALIGNMENT__ 16 +#define __STDC_UTF_16__ 1 +#define __FLT64_MAX_10_EXP__ 308 +#define __FLT32_HAS_INFINITY__ 1 +#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) +#define __cpp_raw_strings 200710 +#define __INT_FAST32_MAX__ 0x7fffffffffffffffL +#define __DBL_HAS_INFINITY__ 1 +#define __HAVE_SPECULATION_SAFE_VALUE 1 +#define __DEC32_MIN_EXP__ (-94) +#define __INTPTR_WIDTH__ 64 +#define __FLT32X_HAS_DENORM__ 1 +#define __INT_FAST16_TYPE__ long int +#define __LDBL_HAS_DENORM__ 1 +#define __cplusplus 201402L +#define __cpp_ref_qualifiers 200710 +#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL +#define __INT_LEAST32_MAX__ 0x7fffffff +#define __DEC32_MIN__ 1E-95DF +#define __DEPRECATED 1 +#define __cpp_rvalue_references 200610 +#define __DBL_MAX_EXP__ 1024 +#define __WCHAR_WIDTH__ 32 +#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 +#define __DEC128_EPSILON__ 1E-33DL +#define __SSE2_MATH__ 1 +#define __ATOMIC_HLE_RELEASE 131072 +#define __PTRDIFF_MAX__ 0x7fffffffffffffffL +#define __amd64 1 +#define __ATOMIC_HLE_ACQUIRE 65536 +#define __FLT32_HAS_QUIET_NAN__ 1 +#define __GNUG__ 9 +#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL +#define __SIZEOF_SIZE_T__ 8 +#define __cpp_nsdmi 200809 +#define __FLT64X_MIN_EXP__ (-16381) +#define __SIZEOF_WINT_T__ 4 +#define __LONG_LONG_WIDTH__ 64 +#define __cpp_initializer_lists 200806 +#define __FLT32_MAX_EXP__ 128 +#define __cpp_hex_float 201603 +#define __GCC_HAVE_DWARF2_CFI_ASM 1 +#define __GXX_ABI_VERSION 1013 +#define __FLT128_HAS_INFINITY__ 1 +#define __FLT_MIN_EXP__ (-125) +#define __cpp_lambdas 200907 +#define __FLT64X_HAS_QUIET_NAN__ 1 +#define __INT_FAST64_TYPE__ long int +#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 +#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) +#define __PIE__ 2 +#define __LP64__ 1 +#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x +#define __DECIMAL_BID_FORMAT__ 1 +#define __FLT64_MIN_10_EXP__ (-307) +#define __FLT64X_DECIMAL_DIG__ 21 +#define __DEC128_MIN__ 1E-6143DL +#define __REGISTER_PREFIX__ +#define __UINT16_MAX__ 0xffff +#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 +#define __UINT8_TYPE__ unsigned char +#define __FLT_MANT_DIG__ 24 +#define __LDBL_DECIMAL_DIG__ 21 +#define __VERSION__ "9.3.0" +#define __UINT64_C(c) c ## UL +#define __cpp_unicode_characters 200704 +#define _STDC_PREDEF_H 1 +#define __cpp_decltype_auto 201304 +#define __GCC_ATOMIC_INT_LOCK_FREE 2 +#define __FLT128_MAX_EXP__ 16384 +#define __FLT32_MANT_DIG__ 24 +#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __STDC_IEC_559_COMPLEX__ 1 +#define __FLT128_HAS_DENORM__ 1 +#define __FLT128_DIG__ 33 +#define __SCHAR_WIDTH__ 8 +#define __INT32_C(c) c +#define __DEC64_EPSILON__ 1E-15DD +#define __ORDER_PDP_ENDIAN__ 3412 +#define __DEC128_MIN_EXP__ (-6142) +#define __FLT32_MAX_10_EXP__ 38 +#define __INT_FAST32_TYPE__ long int +#define __UINT_LEAST16_TYPE__ short unsigned int +#define __FLT64X_HAS_INFINITY__ 1 +#define unix 1 +#define __DBL_HAS_DENORM__ 1 +#define __INT16_MAX__ 0x7fff +#define __cpp_rtti 199711 +#define __SIZE_TYPE__ long unsigned int +#define __UINT64_MAX__ 0xffffffffffffffffUL +#define __FLT64X_DIG__ 18 +#define __INT8_TYPE__ signed char +#define __cpp_digit_separators 201309 +#define __ELF__ 1 +#define __GCC_ASM_FLAG_OUTPUTS__ 1 +#define __FLT_RADIX__ 2 +#define __INT_LEAST16_TYPE__ short int +#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L +#define __UINTMAX_C(c) c ## UL +#define __GLIBCXX_BITSIZE_INT_N_0 128 +#define __k8 1 +#define __SIG_ATOMIC_MAX__ 0x7fffffff +#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 +#define __SIZEOF_PTRDIFF_T__ 8 +#define __FLT32X_MANT_DIG__ 53 +#define __x86_64__ 1 +#define __FLT32X_MIN_EXP__ (-1021) +#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF +#define __INT_FAST16_MAX__ 0x7fffffffffffffffL +#define __FLT64_DIG__ 15 +#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL +#define __UINT_LEAST64_TYPE__ long unsigned int +#define __FLT_HAS_QUIET_NAN__ 1 +#define __FLT_MAX_10_EXP__ 38 +#define __LONG_MAX__ 0x7fffffffffffffffL +#define __FLT64X_HAS_DENORM__ 1 +#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL +#define __FLT_HAS_INFINITY__ 1 +#define __cpp_unicode_literals 200710 +#define __UINT_FAST16_TYPE__ long unsigned int +#define __DEC64_MAX__ 9.999999999999999E384DD +#define __INT_FAST32_WIDTH__ 64 +#define __CHAR16_TYPE__ short unsigned int +#define __PRAGMA_REDEFINE_EXTNAME 1 +#define __SIZE_WIDTH__ 64 +#define __SEG_FS 1 +#define __INT_LEAST16_MAX__ 0x7fff +#define __DEC64_MANT_DIG__ 16 +#define __INT64_MAX__ 0x7fffffffffffffffL +#define __UINT_LEAST32_MAX__ 0xffffffffU +#define __SEG_GS 1 +#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 +#define __GCC_ATOMIC_LONG_LOCK_FREE 2 +#define __SIG_ATOMIC_WIDTH__ 32 +#define __INT_LEAST64_TYPE__ long int +#define __INT16_TYPE__ short int +#define __INT_LEAST8_TYPE__ signed char +#define __DEC32_MAX_EXP__ 97 +#define __INT_FAST8_MAX__ 0x7f +#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 +#define __INTPTR_MAX__ 0x7fffffffffffffffL +#define __cpp_sized_deallocation 201309 +#define linux 1 +#define __cpp_range_based_for 200907 +#define __FLT64_HAS_QUIET_NAN__ 1 +#define __FLT32_MIN_10_EXP__ (-37) +#define __SSE2__ 1 +#define __EXCEPTIONS 1 +#define __LDBL_MANT_DIG__ 64 +#define __DBL_HAS_QUIET_NAN__ 1 +#define __FLT64_HAS_INFINITY__ 1 +#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x +#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) +#define __code_model_small__ 1 +#define __cpp_return_type_deduction 201304 +#define __k8__ 1 +#define __INTPTR_TYPE__ long int +#define __UINT16_TYPE__ short unsigned int +#define __WCHAR_TYPE__ int +#define __SIZEOF_FLOAT__ 4 +#define __pic__ 2 +#define __UINTPTR_MAX__ 0xffffffffffffffffUL +#define __INT_FAST64_WIDTH__ 64 +#define __DEC64_MIN_EXP__ (-382) +#define __cpp_decltype 200707 +#define __FLT32_DECIMAL_DIG__ 9 +#define __INT_FAST64_MAX__ 0x7fffffffffffffffL +#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 +#define __FLT_DIG__ 6 +#define __FLT64X_MAX_EXP__ 16384 +#define __UINT_FAST64_TYPE__ long unsigned int +#define __INT_MAX__ 0x7fffffff +#define __amd64__ 1 +#define __INT64_TYPE__ long int +#define __FLT_MAX_EXP__ 128 +#define __ORDER_BIG_ENDIAN__ 4321 +#define __DBL_MANT_DIG__ 53 +#define __cpp_inheriting_constructors 201511 +#define __SIZEOF_FLOAT128__ 16 +#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL +#define __DEC64_MIN__ 1E-383DD +#define __WINT_TYPE__ unsigned int +#define __UINT_LEAST32_TYPE__ unsigned int +#define __SIZEOF_SHORT__ 2 +#define __SSE__ 1 +#define __LDBL_MIN_EXP__ (-16381) +#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 +#define __WINT_WIDTH__ 32 +#define __INT_LEAST8_MAX__ 0x7f +#define __FLT32X_MAX_10_EXP__ 308 +#define __SIZEOF_INT128__ 16 +#define __LDBL_MAX_10_EXP__ 4932 +#define __ATOMIC_RELAXED 0 +#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) +#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 +#define _LP64 1 +#define __UINT8_C(c) c +#define __FLT64_MAX_EXP__ 1024 +#define __INT_LEAST32_TYPE__ int +#define __SIZEOF_WCHAR_T__ 4 +#define __FLT128_HAS_QUIET_NAN__ 1 +#define __INT_FAST8_TYPE__ signed char +#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x +#define __GNUC_STDC_INLINE__ 1 +#define __FLT64_HAS_DENORM__ 1 +#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 +#define __DBL_DECIMAL_DIG__ 17 +#define __STDC_UTF_32__ 1 +#define __INT_FAST8_WIDTH__ 8 +#define __FXSR__ 1 +#define __DEC_EVAL_METHOD__ 2 +#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x +#define __cpp_runtime_arrays 198712 +#define __UINT64_TYPE__ long unsigned int +#define __UINT32_C(c) c ## U +#define __INTMAX_MAX__ 0x7fffffffffffffffL +#define __cpp_alias_templates 200704 +#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ +#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F +#define __INT8_MAX__ 0x7f +#define __LONG_WIDTH__ 64 +#define __PIC__ 2 +#define __UINT_FAST32_TYPE__ long unsigned int +#define __CHAR32_TYPE__ unsigned int +#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F +#define __cpp_constexpr 201304 +#define __INT32_TYPE__ int +#define __SIZEOF_DOUBLE__ 8 +#define __cpp_exceptions 199711 +#define __FLT_MIN_10_EXP__ (-37) +#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 +#define __INT_LEAST32_WIDTH__ 32 +#define __INTMAX_TYPE__ long int +#define __DEC128_MAX_EXP__ 6145 +#define __FLT32X_HAS_QUIET_NAN__ 1 +#define __ATOMIC_CONSUME 1 +#define __GNUC_MINOR__ 3 +#define __GLIBCXX_TYPE_INT_N_0 __int128 +#define __INT_FAST16_WIDTH__ 64 +#define __UINTMAX_MAX__ 0xffffffffffffffffUL +#define __DEC32_MANT_DIG__ 7 +#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x +#define __DBL_MAX_10_EXP__ 308 +#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L +#define __INT16_C(c) c +#define __cpp_generic_lambdas 201304 +#define __STDC__ 1 +#define __FLT32X_DIG__ 15 +#define __PTRDIFF_TYPE__ long int +#define __ATOMIC_SEQ_CST 5 +#define __UINT32_TYPE__ unsigned int +#define __FLT32X_MIN_10_EXP__ (-307) +#define __UINTPTR_TYPE__ long unsigned int +#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD +#define __DEC128_MANT_DIG__ 34 +#define __LDBL_MIN_10_EXP__ (-4931) +#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 +#define __SSE_MATH__ 1 +#define __SIZEOF_LONG_LONG__ 8 +#define __cpp_user_defined_literals 200809 +#define __FLT128_DECIMAL_DIG__ 36 +#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 +#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x +#define __LDBL_DIG__ 18 +#define __FLT_DECIMAL_DIG__ 9 +#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL +#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 +#define __INT_LEAST64_WIDTH__ 64 +#define __UINT_FAST8_TYPE__ unsigned char +#define _GNU_SOURCE 1 +#define __cpp_init_captures 201304 +#define __ATOMIC_ACQ_REL 4 +#define __ATOMIC_RELEASE 3 diff --git a/settings.ui b/settings.ui index 576c5a0a..2017709b 100644 --- a/settings.ui +++ b/settings.ui @@ -2186,6 +2186,20 @@ + + + + MI-Mode: + + + + + + + + + + diff --git a/ui_settings.h b/ui_settings.h index 08bb67ed..dfe14768 100644 --- a/ui_settings.h +++ b/ui_settings.h @@ -1,7 +1,7 @@ /******************************************************************************** ** Form generated from reading UI file 'settings.ui' ** -** Created by: Qt User Interface Compiler version 5.15.2 +** Created by: Qt User Interface Compiler version 5.12.8 ** ** WARNING! All changes made in this file will be lost when recompiling UI file! ********************************************************************************/ @@ -185,6 +185,8 @@ class Ui_SettingsWindow QCheckBox *disableLinkingCheckbox; QLabel *gdbVerboseLabel; QCheckBox *sasmVerboseCheckBox; + QLabel *MiModusLabel; + QCheckBox *MiModusCheckBox; QLabel *infoLabel; QDialogButtonBox *buttonBox; QButtonGroup *buttonGroup; @@ -1194,6 +1196,16 @@ class Ui_SettingsWindow formLayout->setWidget(10, QFormLayout::FieldRole, sasmVerboseCheckBox); + MiModusLabel = new QLabel(buildTab); + MiModusLabel->setObjectName(QString::fromUtf8("MiModusLabel")); + + formLayout->setWidget(13, QFormLayout::LabelRole, MiModusLabel); + + MiModusCheckBox = new QCheckBox(buildTab); + MiModusCheckBox->setObjectName(QString::fromUtf8("MiModusCheckBox")); + + formLayout->setWidget(13, QFormLayout::FieldRole, MiModusCheckBox); + verticalLayout_6->addLayout(formLayout); @@ -1252,41 +1264,41 @@ class Ui_SettingsWindow void retranslateUi(QWidget *SettingsWindow) { - SettingsWindow->setWindowTitle(QCoreApplication::translate("SettingsWindow", "Settings", nullptr)); - settingsLabel->setText(QCoreApplication::translate("SettingsWindow", "SASM Options", nullptr)); - commonSettingsBox->setTitle(QCoreApplication::translate("SettingsWindow", "Common", nullptr)); - startWindowLabel->setText(QCoreApplication::translate("SettingsWindow", "On start:", nullptr)); - startWindow->setItemText(0, QCoreApplication::translate("SettingsWindow", "Open get started window", nullptr)); - startWindow->setItemText(1, QCoreApplication::translate("SettingsWindow", "Restore previous session", nullptr)); - - languageLabel->setText(QCoreApplication::translate("SettingsWindow", "Language:", nullptr)); - language->setItemText(6, QCoreApplication::translate("SettingsWindow", "Polski", nullptr)); - language->setItemText(7, QCoreApplication::translate("SettingsWindow", "\327\242\327\221\327\250\327\231\327\252", nullptr)); - language->setItemText(8, QCoreApplication::translate("SettingsWindow", "Espa\303\261ol", nullptr)); - - label_4->setText(QCoreApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - registersLabel_2->setText(QCoreApplication::translate("SettingsWindow", "Show all registers in debug:", nullptr)); - registersYesRadioButton->setText(QCoreApplication::translate("SettingsWindow", "Yes", nullptr)); - registersNoRadioButton->setText(QCoreApplication::translate("SettingsWindow", "No, show only general purpose", nullptr)); - insertDebugStringLabel->setText(QCoreApplication::translate("SettingsWindow", "Insert debug string:", nullptr)); + SettingsWindow->setWindowTitle(QApplication::translate("SettingsWindow", "Settings", nullptr)); + settingsLabel->setText(QApplication::translate("SettingsWindow", "SASM Options", nullptr)); + commonSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); + startWindowLabel->setText(QApplication::translate("SettingsWindow", "On start:", nullptr)); + startWindow->setItemText(0, QApplication::translate("SettingsWindow", "Open get started window", nullptr)); + startWindow->setItemText(1, QApplication::translate("SettingsWindow", "Restore previous session", nullptr)); + + languageLabel->setText(QApplication::translate("SettingsWindow", "Language:", nullptr)); + language->setItemText(6, QApplication::translate("SettingsWindow", "Polski", nullptr)); + language->setItemText(7, QApplication::translate("SettingsWindow", "\327\242\327\221\327\250\327\231\327\252", nullptr)); + language->setItemText(8, QApplication::translate("SettingsWindow", "Espa\303\261ol", nullptr)); + + label_4->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + registersLabel_2->setText(QApplication::translate("SettingsWindow", "Show all registers in debug:", nullptr)); + registersYesRadioButton->setText(QApplication::translate("SettingsWindow", "Yes", nullptr)); + registersNoRadioButton->setText(QApplication::translate("SettingsWindow", "No, show only general purpose", nullptr)); + insertDebugStringLabel->setText(QApplication::translate("SettingsWindow", "Insert debug string:", nullptr)); insertDebugStringCheckBox->setText(QString()); - codeSettingsBox->setTitle(QCoreApplication::translate("SettingsWindow", "Code editor", nullptr)); - fontLabel->setText(QCoreApplication::translate("SettingsWindow", "Font:", nullptr)); - fontSizeLabel->setText(QCoreApplication::translate("SettingsWindow", "Size:", nullptr)); - label->setText(QCoreApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - label_2->setText(QCoreApplication::translate("SettingsWindow", "Default code editor text:", nullptr)); - resetAllButton->setText(QCoreApplication::translate("SettingsWindow", "Reset all (need a restart)...", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(commonTab), QCoreApplication::translate("SettingsWindow", "Common", nullptr)); - groupBox->setTitle(QCoreApplication::translate("SettingsWindow", "Syntax highlighting", nullptr)); + codeSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Code editor", nullptr)); + fontLabel->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); + fontSizeLabel->setText(QApplication::translate("SettingsWindow", "Size:", nullptr)); + label->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + label_2->setText(QApplication::translate("SettingsWindow", "Default code editor text:", nullptr)); + resetAllButton->setText(QApplication::translate("SettingsWindow", "Reset all (need a restart)...", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(commonTab), QApplication::translate("SettingsWindow", "Common", nullptr)); + groupBox->setTitle(QApplication::translate("SettingsWindow", "Syntax highlighting", nullptr)); iomacroBoldCheckBox->setText(QString()); - systemLabel->setText(QCoreApplication::translate("SettingsWindow", "System:", nullptr)); + systemLabel->setText(QApplication::translate("SettingsWindow", "System:", nullptr)); quotationColorButton->setText(QString()); systemColorButton->setText(QString()); numbersItalicCheckBox->setText(QString()); - label_6->setText(QCoreApplication::translate("SettingsWindow", "Bold:", nullptr)); + label_6->setText(QApplication::translate("SettingsWindow", "Bold:", nullptr)); numbersBoldCheckBox->setText(QString()); - label_7->setText(QCoreApplication::translate("SettingsWindow", "Italic:", nullptr)); - label_3->setText(QCoreApplication::translate("SettingsWindow", "Foreground:", nullptr)); + label_7->setText(QApplication::translate("SettingsWindow", "Italic:", nullptr)); + label_3->setText(QApplication::translate("SettingsWindow", "Foreground:", nullptr)); systemItalicCheckBox->setText(QString()); commentsColorButton_2->setText(QString()); keywordsColorButton->setText(QString()); @@ -1294,16 +1306,16 @@ class Ui_SettingsWindow keywordsColorButton_2->setText(QString()); iomacroColorButton_2->setText(QString()); memoryItalicCheckBox->setText(QString()); - keywordsLabel->setText(QCoreApplication::translate("SettingsWindow", "Keywords:", nullptr)); - label_5->setText(QCoreApplication::translate("SettingsWindow", "Background:", nullptr)); + keywordsLabel->setText(QApplication::translate("SettingsWindow", "Keywords:", nullptr)); + label_5->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); labelsColorButton->setText(QString()); - numbersLabel->setText(QCoreApplication::translate("SettingsWindow", "Numbers:", nullptr)); + numbersLabel->setText(QApplication::translate("SettingsWindow", "Numbers:", nullptr)); quotationColorButton_2->setText(QString()); - labelsLabel->setText(QCoreApplication::translate("SettingsWindow", "Labels:", nullptr)); - commentsLabel->setText(QCoreApplication::translate("SettingsWindow", "Comments:", nullptr)); + labelsLabel->setText(QApplication::translate("SettingsWindow", "Labels:", nullptr)); + commentsLabel->setText(QApplication::translate("SettingsWindow", "Comments:", nullptr)); memoryColorButton->setText(QString()); systemColorButton_2->setText(QString()); - iomacroLabel_2->setText(QCoreApplication::translate("SettingsWindow", "Quotation:", nullptr)); + iomacroLabel_2->setText(QApplication::translate("SettingsWindow", "Quotation:", nullptr)); labelsColorButton_2->setText(QString()); registersBoldCheckBox->setText(QString()); quotationBoldCheckBox->setText(QString()); @@ -1316,10 +1328,10 @@ class Ui_SettingsWindow quotationItalicCheckBox->setText(QString()); commentsColorButton->setText(QString()); labelsItalicCheckBox->setText(QString()); - memoryLabel->setText(QCoreApplication::translate("SettingsWindow", "Memory:", nullptr)); - iomacroLabel->setText(QCoreApplication::translate("SettingsWindow", "I/O macro:", nullptr)); + memoryLabel->setText(QApplication::translate("SettingsWindow", "Memory:", nullptr)); + iomacroLabel->setText(QApplication::translate("SettingsWindow", "I/O macro:", nullptr)); keywordsItalicCheckBox->setText(QString()); - registersLabel->setText(QCoreApplication::translate("SettingsWindow", "Registers:", nullptr)); + registersLabel->setText(QApplication::translate("SettingsWindow", "Registers:", nullptr)); commentsItalicCheckBox->setText(QString()); labelsBoldCheckBox->setText(QString()); registersItalicCheckBox->setText(QString()); @@ -1327,44 +1339,46 @@ class Ui_SettingsWindow memoryColorButton_2->setText(QString()); registersColorButton->setText(QString()); numbersColorButton_2->setText(QString()); - groupBox_2->setTitle(QCoreApplication::translate("SettingsWindow", "Common", nullptr)); - fontLabel_2->setText(QCoreApplication::translate("SettingsWindow", "Font:", nullptr)); + groupBox_2->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); + fontLabel_2->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); fontColorButton->setText(QString()); - currentLineCheckBox->setText(QCoreApplication::translate("SettingsWindow", "Enable highlighting", nullptr)); + currentLineCheckBox->setText(QApplication::translate("SettingsWindow", "Enable highlighting", nullptr)); debugLineColorButton->setText(QString()); - currentLineLabel->setText(QCoreApplication::translate("SettingsWindow", "Current line:", nullptr)); - debugLineLabel->setText(QCoreApplication::translate("SettingsWindow", "Debugging line:", nullptr)); + currentLineLabel->setText(QApplication::translate("SettingsWindow", "Current line:", nullptr)); + debugLineLabel->setText(QApplication::translate("SettingsWindow", "Debugging line:", nullptr)); currentLineColorButton->setText(QString()); - backgroundLabel->setText(QCoreApplication::translate("SettingsWindow", "Background:", nullptr)); + backgroundLabel->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); backgroundColorButton->setText(QString()); - lineNumberPanelLabel->setText(QCoreApplication::translate("SettingsWindow", "Line number panel:", nullptr)); + lineNumberPanelLabel->setText(QApplication::translate("SettingsWindow", "Line number panel:", nullptr)); lineNumberPanelColorButton->setText(QString()); - lineNumberFontLabel->setText(QCoreApplication::translate("SettingsWindow", "Line number font:", nullptr)); + lineNumberFontLabel->setText(QApplication::translate("SettingsWindow", "Line number font:", nullptr)); lineNumberFontColorButton->setText(QString()); - label_8->setText(QCoreApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(colorsTab), QCoreApplication::translate("SettingsWindow", "Colors", nullptr)); - modeLabel->setText(QCoreApplication::translate("SettingsWindow", "Mode:", nullptr)); - x86RadioButton->setText(QCoreApplication::translate("SettingsWindow", "x86", nullptr)); - x64RadioButton->setText(QCoreApplication::translate("SettingsWindow", "x64", nullptr)); - assemblerLabel->setText(QCoreApplication::translate("SettingsWindow", "Assembler:", nullptr)); - nasmRadioButton->setText(QCoreApplication::translate("SettingsWindow", "NASM", nullptr)); - gasRadioButton->setText(QCoreApplication::translate("SettingsWindow", "GAS", nullptr)); - fasmRadioButton->setText(QCoreApplication::translate("SettingsWindow", "FASM", nullptr)); - masmRadioButton->setText(QCoreApplication::translate("SettingsWindow", "MASM", nullptr)); - assemblyLabel->setText(QCoreApplication::translate("SettingsWindow", "Assembly options:", nullptr)); - linkingLabel->setText(QCoreApplication::translate("SettingsWindow", "Linking options:", nullptr)); - assemblerPathLabel->setText(QCoreApplication::translate("SettingsWindow", "Assembler path:", nullptr)); - linkerPathLabel->setText(QCoreApplication::translate("SettingsWindow", "Linker path:", nullptr)); - objectFileNameLabel->setText(QCoreApplication::translate("SettingsWindow", "Object file name:", nullptr)); - gdbPathLabel->setText(QCoreApplication::translate("SettingsWindow", "GDB path (Unix only):", nullptr)); - assemblerWorkingDirectoryLabel->setText(QCoreApplication::translate("SettingsWindow", "Build in current directory:", nullptr)); + label_8->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(colorsTab), QApplication::translate("SettingsWindow", "Colors", nullptr)); + modeLabel->setText(QApplication::translate("SettingsWindow", "Mode:", nullptr)); + x86RadioButton->setText(QApplication::translate("SettingsWindow", "x86", nullptr)); + x64RadioButton->setText(QApplication::translate("SettingsWindow", "x64", nullptr)); + assemblerLabel->setText(QApplication::translate("SettingsWindow", "Assembler:", nullptr)); + nasmRadioButton->setText(QApplication::translate("SettingsWindow", "NASM", nullptr)); + gasRadioButton->setText(QApplication::translate("SettingsWindow", "GAS", nullptr)); + fasmRadioButton->setText(QApplication::translate("SettingsWindow", "FASM", nullptr)); + masmRadioButton->setText(QApplication::translate("SettingsWindow", "MASM", nullptr)); + assemblyLabel->setText(QApplication::translate("SettingsWindow", "Assembly options:", nullptr)); + linkingLabel->setText(QApplication::translate("SettingsWindow", "Linking options:", nullptr)); + assemblerPathLabel->setText(QApplication::translate("SettingsWindow", "Assembler path:", nullptr)); + linkerPathLabel->setText(QApplication::translate("SettingsWindow", "Linker path:", nullptr)); + objectFileNameLabel->setText(QApplication::translate("SettingsWindow", "Object file name:", nullptr)); + gdbPathLabel->setText(QApplication::translate("SettingsWindow", "GDB path (Unix only):", nullptr)); + assemblerWorkingDirectoryLabel->setText(QApplication::translate("SettingsWindow", "Build in current directory:", nullptr)); runInCurrentDirectoryCheckbox->setText(QString()); - disableLinkingLabel->setText(QCoreApplication::translate("SettingsWindow", "Disable linking:", nullptr)); + disableLinkingLabel->setText(QApplication::translate("SettingsWindow", "Disable linking:", nullptr)); disableLinkingCheckbox->setText(QString()); - gdbVerboseLabel->setText(QCoreApplication::translate("SettingsWindow", "SASM verbose mode:", nullptr)); + gdbVerboseLabel->setText(QApplication::translate("SettingsWindow", "SASM verbose mode:", nullptr)); sasmVerboseCheckBox->setText(QString()); + MiModusLabel->setText(QApplication::translate("SettingsWindow", "MI-Mode:", nullptr)); + MiModusCheckBox->setText(QString()); infoLabel->setText(QString()); - tabWidget->setTabText(tabWidget->indexOf(buildTab), QCoreApplication::translate("SettingsWindow", "Build", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(buildTab), QApplication::translate("SettingsWindow", "Build", nullptr)); } // retranslateUi }; From d0ee8b4a0f02e7ba490042106d4704d22de4ae66 Mon Sep 17 00:00:00 2001 From: ge69dal <78534322+ge69dal@users.noreply.github.com> Date: Thu, 4 Feb 2021 18:19:50 +0100 Subject: [PATCH 08/86] fixed deadlock in debugger --- debugger.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 6236d502..4ca12c2a 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -626,7 +626,7 @@ void Debugger::processMessageMiMode(QString output, QString error) //determine run of program //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () - if (c == 2 && output.indexOf(QString(" in ")) != -1) { + if (c == 2 && output.indexOf(QString("*stopped,reason=\"breakpoint-hit")) != -1) { //set accordance between program in memory and program in file //in example we need 0x00401390 @@ -768,7 +768,7 @@ void Debugger::processActionMiMode(QString output, QString error) int index = r.indexIn(output); //print output if (index > 1) { - QString msg = output.left(output.lastIndexOf(QChar('~'))); //left part - probably output of program; + QString msg = output.left(output.indexOf(QChar('~'))); //left part - probably output of program; QRegExp breakpointMsg("=breakpoint"); QRegExp threadMsg("\\[Switching to Thread [^\\]]*\\]\r?\n");//todo QRegExp signalMsg("\r?\n(Program received signal.*)");//todo @@ -803,26 +803,20 @@ void Debugger::processActionMiMode(QString output, QString error) if (!found) { //output = tr("Inside the macro or outside the program.") + '\n'; emit inMacro(); - return; } else { //if found highlight and print it //highlight line number emit highlightLine(lineNumber); stopped = true; emit wasStopped(); - - //print string number and all after it - //output = QString::number(lineNumber) + tr(" line") + output.mid(output.indexOf("()") + 2); - if (actionType == showLine) - return; - output.remove(0, output.indexOf("()") + 6); } + return; } if (actionType == anyAction) { if (output[output.length() - 1] != '\n') output += QChar('\n'); //process as ni or si - if (output.indexOf(QRegExp("0x[0-9a-fA-F]{8,16} in ")) != -1 + if (output.indexOf(QRegExp("addr=\"0x[0-9a-fA-F]{8,16}\"")) != -1 && !backtrace) { actionTypeQueue.enqueue(showLine); processActionMiMode(output); From bfd0b0339c2bd98bd68b282055780a0887cf008c Mon Sep 17 00:00:00 2001 From: Martin SCHREIBER Date: Thu, 4 Feb 2021 18:27:22 +0100 Subject: [PATCH 09/86] cleaned up obsolete header files --- moc_predefs.h | 391 -------------- ui_settings.h | 1392 ------------------------------------------------- 2 files changed, 1783 deletions(-) delete mode 100644 moc_predefs.h delete mode 100644 ui_settings.h diff --git a/moc_predefs.h b/moc_predefs.h deleted file mode 100644 index bbadeee3..00000000 --- a/moc_predefs.h +++ /dev/null @@ -1,391 +0,0 @@ -#define __SSP_STRONG__ 3 -#define __DBL_MIN_EXP__ (-1021) -#define __FLT32X_MAX_EXP__ 1024 -#define __cpp_attributes 200809 -#define __UINT_LEAST16_MAX__ 0xffff -#define __ATOMIC_ACQUIRE 2 -#define __FLT128_MAX_10_EXP__ 4932 -#define __FLT_MIN__ 1.17549435082228750796873653722224568e-38F -#define __GCC_IEC_559_COMPLEX 2 -#define __cpp_aggregate_nsdmi 201304 -#define __UINT_LEAST8_TYPE__ unsigned char -#define __SIZEOF_FLOAT80__ 16 -#define __INTMAX_C(c) c ## L -#define __CHAR_BIT__ 8 -#define __UINT8_MAX__ 0xff -#define __WINT_MAX__ 0xffffffffU -#define __FLT32_MIN_EXP__ (-125) -#define __cpp_static_assert 200410 -#define __ORDER_LITTLE_ENDIAN__ 1234 -#define __SIZE_MAX__ 0xffffffffffffffffUL -#define __WCHAR_MAX__ 0x7fffffff -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_1 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_2 1 -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1 -#define __DBL_DENORM_MIN__ double(4.94065645841246544176568792868221372e-324L) -#define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1 -#define __GCC_ATOMIC_CHAR_LOCK_FREE 2 -#define __GCC_IEC_559 2 -#define __FLT32X_DECIMAL_DIG__ 17 -#define __FLT_EVAL_METHOD__ 0 -#define __unix__ 1 -#define __cpp_binary_literals 201304 -#define __FLT64_DECIMAL_DIG__ 17 -#define __CET__ 3 -#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2 -#define __x86_64 1 -#define __cpp_variadic_templates 200704 -#define __UINT_FAST64_MAX__ 0xffffffffffffffffUL -#define __SIG_ATOMIC_TYPE__ int -#define __DBL_MIN_10_EXP__ (-307) -#define __FINITE_MATH_ONLY__ 0 -#define __cpp_variable_templates 201304 -#define __GNUC_PATCHLEVEL__ 0 -#define __FLT32_HAS_DENORM__ 1 -#define __UINT_FAST8_MAX__ 0xff -#define __cpp_rvalue_reference 200610 -#define __has_include(STR) __has_include__(STR) -#define __DEC64_MAX_EXP__ 385 -#define __INT8_C(c) c -#define __INT_LEAST8_WIDTH__ 8 -#define __UINT_LEAST64_MAX__ 0xffffffffffffffffUL -#define __SHRT_MAX__ 0x7fff -#define __LDBL_MAX__ 1.18973149535723176502126385303097021e+4932L -#define __FLT64X_MAX_10_EXP__ 4932 -#define __UINT_LEAST8_MAX__ 0xff -#define __GCC_ATOMIC_BOOL_LOCK_FREE 2 -#define __FLT128_DENORM_MIN__ 6.47517511943802511092443895822764655e-4966F128 -#define __UINTMAX_TYPE__ long unsigned int -#define __linux 1 -#define __DEC32_EPSILON__ 1E-6DF -#define __FLT_EVAL_METHOD_TS_18661_3__ 0 -#define __OPTIMIZE__ 1 -#define __unix 1 -#define __UINT32_MAX__ 0xffffffffU -#define __GXX_EXPERIMENTAL_CXX0X__ 1 -#define __LDBL_MAX_EXP__ 16384 -#define __FLT128_MIN_EXP__ (-16381) -#define __WINT_MIN__ 0U -#define __linux__ 1 -#define __FLT128_MIN_10_EXP__ (-4931) -#define __INT_LEAST16_WIDTH__ 16 -#define __SCHAR_MAX__ 0x7f -#define __FLT128_MANT_DIG__ 113 -#define __WCHAR_MIN__ (-__WCHAR_MAX__ - 1) -#define __INT64_C(c) c ## L -#define __DBL_DIG__ 15 -#define __GCC_ATOMIC_POINTER_LOCK_FREE 2 -#define __FLT64X_MANT_DIG__ 64 -#define _FORTIFY_SOURCE 2 -#define __SIZEOF_INT__ 4 -#define __SIZEOF_POINTER__ 8 -#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2 -#define __USER_LABEL_PREFIX__ -#define __FLT64X_EPSILON__ 1.08420217248550443400745280086994171e-19F64x -#define __STDC_HOSTED__ 1 -#define __LDBL_HAS_INFINITY__ 1 -#define __FLT32_DIG__ 6 -#define __FLT_EPSILON__ 1.19209289550781250000000000000000000e-7F -#define __GXX_WEAK__ 1 -#define __SHRT_WIDTH__ 16 -#define __LDBL_MIN__ 3.36210314311209350626267781732175260e-4932L -#define __DEC32_MAX__ 9.999999E96DF -#define __cpp_threadsafe_static_init 200806 -#define __FLT64X_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951F64x -#define __FLT32X_HAS_INFINITY__ 1 -#define __INT32_MAX__ 0x7fffffff -#define __INT_WIDTH__ 32 -#define __SIZEOF_LONG__ 8 -#define __STDC_IEC_559__ 1 -#define __STDC_ISO_10646__ 201706L -#define __UINT16_C(c) c -#define __PTRDIFF_WIDTH__ 64 -#define __DECIMAL_DIG__ 21 -#define __FLT64_EPSILON__ 2.22044604925031308084726333618164062e-16F64 -#define __gnu_linux__ 1 -#define __INTMAX_WIDTH__ 64 -#define __FLT64_MIN_EXP__ (-1021) -#define __has_include_next(STR) __has_include_next__(STR) -#define __FLT64X_MIN_10_EXP__ (-4931) -#define __LDBL_HAS_QUIET_NAN__ 1 -#define __FLT64_MANT_DIG__ 53 -#define __GNUC__ 9 -#define __GXX_RTTI 1 -#define __pie__ 2 -#define __MMX__ 1 -#define __cpp_delegating_constructors 200604 -#define __FLT_HAS_DENORM__ 1 -#define __SIZEOF_LONG_DOUBLE__ 16 -#define __BIGGEST_ALIGNMENT__ 16 -#define __STDC_UTF_16__ 1 -#define __FLT64_MAX_10_EXP__ 308 -#define __FLT32_HAS_INFINITY__ 1 -#define __DBL_MAX__ double(1.79769313486231570814527423731704357e+308L) -#define __cpp_raw_strings 200710 -#define __INT_FAST32_MAX__ 0x7fffffffffffffffL -#define __DBL_HAS_INFINITY__ 1 -#define __HAVE_SPECULATION_SAFE_VALUE 1 -#define __DEC32_MIN_EXP__ (-94) -#define __INTPTR_WIDTH__ 64 -#define __FLT32X_HAS_DENORM__ 1 -#define __INT_FAST16_TYPE__ long int -#define __LDBL_HAS_DENORM__ 1 -#define __cplusplus 201402L -#define __cpp_ref_qualifiers 200710 -#define __DEC128_MAX__ 9.999999999999999999999999999999999E6144DL -#define __INT_LEAST32_MAX__ 0x7fffffff -#define __DEC32_MIN__ 1E-95DF -#define __DEPRECATED 1 -#define __cpp_rvalue_references 200610 -#define __DBL_MAX_EXP__ 1024 -#define __WCHAR_WIDTH__ 32 -#define __FLT32_MAX__ 3.40282346638528859811704183484516925e+38F32 -#define __DEC128_EPSILON__ 1E-33DL -#define __SSE2_MATH__ 1 -#define __ATOMIC_HLE_RELEASE 131072 -#define __PTRDIFF_MAX__ 0x7fffffffffffffffL -#define __amd64 1 -#define __ATOMIC_HLE_ACQUIRE 65536 -#define __FLT32_HAS_QUIET_NAN__ 1 -#define __GNUG__ 9 -#define __LONG_LONG_MAX__ 0x7fffffffffffffffLL -#define __SIZEOF_SIZE_T__ 8 -#define __cpp_nsdmi 200809 -#define __FLT64X_MIN_EXP__ (-16381) -#define __SIZEOF_WINT_T__ 4 -#define __LONG_LONG_WIDTH__ 64 -#define __cpp_initializer_lists 200806 -#define __FLT32_MAX_EXP__ 128 -#define __cpp_hex_float 201603 -#define __GCC_HAVE_DWARF2_CFI_ASM 1 -#define __GXX_ABI_VERSION 1013 -#define __FLT128_HAS_INFINITY__ 1 -#define __FLT_MIN_EXP__ (-125) -#define __cpp_lambdas 200907 -#define __FLT64X_HAS_QUIET_NAN__ 1 -#define __INT_FAST64_TYPE__ long int -#define __FLT64_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F64 -#define __DBL_MIN__ double(2.22507385850720138309023271733240406e-308L) -#define __PIE__ 2 -#define __LP64__ 1 -#define __FLT32X_EPSILON__ 2.22044604925031308084726333618164062e-16F32x -#define __DECIMAL_BID_FORMAT__ 1 -#define __FLT64_MIN_10_EXP__ (-307) -#define __FLT64X_DECIMAL_DIG__ 21 -#define __DEC128_MIN__ 1E-6143DL -#define __REGISTER_PREFIX__ -#define __UINT16_MAX__ 0xffff -#define __FLT32_MIN__ 1.17549435082228750796873653722224568e-38F32 -#define __UINT8_TYPE__ unsigned char -#define __FLT_MANT_DIG__ 24 -#define __LDBL_DECIMAL_DIG__ 21 -#define __VERSION__ "9.3.0" -#define __UINT64_C(c) c ## UL -#define __cpp_unicode_characters 200704 -#define _STDC_PREDEF_H 1 -#define __cpp_decltype_auto 201304 -#define __GCC_ATOMIC_INT_LOCK_FREE 2 -#define __FLT128_MAX_EXP__ 16384 -#define __FLT32_MANT_DIG__ 24 -#define __FLOAT_WORD_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __STDC_IEC_559_COMPLEX__ 1 -#define __FLT128_HAS_DENORM__ 1 -#define __FLT128_DIG__ 33 -#define __SCHAR_WIDTH__ 8 -#define __INT32_C(c) c -#define __DEC64_EPSILON__ 1E-15DD -#define __ORDER_PDP_ENDIAN__ 3412 -#define __DEC128_MIN_EXP__ (-6142) -#define __FLT32_MAX_10_EXP__ 38 -#define __INT_FAST32_TYPE__ long int -#define __UINT_LEAST16_TYPE__ short unsigned int -#define __FLT64X_HAS_INFINITY__ 1 -#define unix 1 -#define __DBL_HAS_DENORM__ 1 -#define __INT16_MAX__ 0x7fff -#define __cpp_rtti 199711 -#define __SIZE_TYPE__ long unsigned int -#define __UINT64_MAX__ 0xffffffffffffffffUL -#define __FLT64X_DIG__ 18 -#define __INT8_TYPE__ signed char -#define __cpp_digit_separators 201309 -#define __ELF__ 1 -#define __GCC_ASM_FLAG_OUTPUTS__ 1 -#define __FLT_RADIX__ 2 -#define __INT_LEAST16_TYPE__ short int -#define __LDBL_EPSILON__ 1.08420217248550443400745280086994171e-19L -#define __UINTMAX_C(c) c ## UL -#define __GLIBCXX_BITSIZE_INT_N_0 128 -#define __k8 1 -#define __SIG_ATOMIC_MAX__ 0x7fffffff -#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2 -#define __SIZEOF_PTRDIFF_T__ 8 -#define __FLT32X_MANT_DIG__ 53 -#define __x86_64__ 1 -#define __FLT32X_MIN_EXP__ (-1021) -#define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF -#define __INT_FAST16_MAX__ 0x7fffffffffffffffL -#define __FLT64_DIG__ 15 -#define __UINT_FAST32_MAX__ 0xffffffffffffffffUL -#define __UINT_LEAST64_TYPE__ long unsigned int -#define __FLT_HAS_QUIET_NAN__ 1 -#define __FLT_MAX_10_EXP__ 38 -#define __LONG_MAX__ 0x7fffffffffffffffL -#define __FLT64X_HAS_DENORM__ 1 -#define __DEC128_SUBNORMAL_MIN__ 0.000000000000000000000000000000001E-6143DL -#define __FLT_HAS_INFINITY__ 1 -#define __cpp_unicode_literals 200710 -#define __UINT_FAST16_TYPE__ long unsigned int -#define __DEC64_MAX__ 9.999999999999999E384DD -#define __INT_FAST32_WIDTH__ 64 -#define __CHAR16_TYPE__ short unsigned int -#define __PRAGMA_REDEFINE_EXTNAME 1 -#define __SIZE_WIDTH__ 64 -#define __SEG_FS 1 -#define __INT_LEAST16_MAX__ 0x7fff -#define __DEC64_MANT_DIG__ 16 -#define __INT64_MAX__ 0x7fffffffffffffffL -#define __UINT_LEAST32_MAX__ 0xffffffffU -#define __SEG_GS 1 -#define __FLT32_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F32 -#define __GCC_ATOMIC_LONG_LOCK_FREE 2 -#define __SIG_ATOMIC_WIDTH__ 32 -#define __INT_LEAST64_TYPE__ long int -#define __INT16_TYPE__ short int -#define __INT_LEAST8_TYPE__ signed char -#define __DEC32_MAX_EXP__ 97 -#define __INT_FAST8_MAX__ 0x7f -#define __FLT128_MAX__ 1.18973149535723176508575932662800702e+4932F128 -#define __INTPTR_MAX__ 0x7fffffffffffffffL -#define __cpp_sized_deallocation 201309 -#define linux 1 -#define __cpp_range_based_for 200907 -#define __FLT64_HAS_QUIET_NAN__ 1 -#define __FLT32_MIN_10_EXP__ (-37) -#define __SSE2__ 1 -#define __EXCEPTIONS 1 -#define __LDBL_MANT_DIG__ 64 -#define __DBL_HAS_QUIET_NAN__ 1 -#define __FLT64_HAS_INFINITY__ 1 -#define __FLT64X_MAX__ 1.18973149535723176502126385303097021e+4932F64x -#define __SIG_ATOMIC_MIN__ (-__SIG_ATOMIC_MAX__ - 1) -#define __code_model_small__ 1 -#define __cpp_return_type_deduction 201304 -#define __k8__ 1 -#define __INTPTR_TYPE__ long int -#define __UINT16_TYPE__ short unsigned int -#define __WCHAR_TYPE__ int -#define __SIZEOF_FLOAT__ 4 -#define __pic__ 2 -#define __UINTPTR_MAX__ 0xffffffffffffffffUL -#define __INT_FAST64_WIDTH__ 64 -#define __DEC64_MIN_EXP__ (-382) -#define __cpp_decltype 200707 -#define __FLT32_DECIMAL_DIG__ 9 -#define __INT_FAST64_MAX__ 0x7fffffffffffffffL -#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1 -#define __FLT_DIG__ 6 -#define __FLT64X_MAX_EXP__ 16384 -#define __UINT_FAST64_TYPE__ long unsigned int -#define __INT_MAX__ 0x7fffffff -#define __amd64__ 1 -#define __INT64_TYPE__ long int -#define __FLT_MAX_EXP__ 128 -#define __ORDER_BIG_ENDIAN__ 4321 -#define __DBL_MANT_DIG__ 53 -#define __cpp_inheriting_constructors 201511 -#define __SIZEOF_FLOAT128__ 16 -#define __INT_LEAST64_MAX__ 0x7fffffffffffffffL -#define __DEC64_MIN__ 1E-383DD -#define __WINT_TYPE__ unsigned int -#define __UINT_LEAST32_TYPE__ unsigned int -#define __SIZEOF_SHORT__ 2 -#define __SSE__ 1 -#define __LDBL_MIN_EXP__ (-16381) -#define __FLT64_MAX__ 1.79769313486231570814527423731704357e+308F64 -#define __WINT_WIDTH__ 32 -#define __INT_LEAST8_MAX__ 0x7f -#define __FLT32X_MAX_10_EXP__ 308 -#define __SIZEOF_INT128__ 16 -#define __LDBL_MAX_10_EXP__ 4932 -#define __ATOMIC_RELAXED 0 -#define __DBL_EPSILON__ double(2.22044604925031308084726333618164062e-16L) -#define __FLT128_MIN__ 3.36210314311209350626267781732175260e-4932F128 -#define _LP64 1 -#define __UINT8_C(c) c -#define __FLT64_MAX_EXP__ 1024 -#define __INT_LEAST32_TYPE__ int -#define __SIZEOF_WCHAR_T__ 4 -#define __FLT128_HAS_QUIET_NAN__ 1 -#define __INT_FAST8_TYPE__ signed char -#define __FLT64X_MIN__ 3.36210314311209350626267781732175260e-4932F64x -#define __GNUC_STDC_INLINE__ 1 -#define __FLT64_HAS_DENORM__ 1 -#define __FLT32_EPSILON__ 1.19209289550781250000000000000000000e-7F32 -#define __DBL_DECIMAL_DIG__ 17 -#define __STDC_UTF_32__ 1 -#define __INT_FAST8_WIDTH__ 8 -#define __FXSR__ 1 -#define __DEC_EVAL_METHOD__ 2 -#define __FLT32X_MAX__ 1.79769313486231570814527423731704357e+308F32x -#define __cpp_runtime_arrays 198712 -#define __UINT64_TYPE__ long unsigned int -#define __UINT32_C(c) c ## U -#define __INTMAX_MAX__ 0x7fffffffffffffffL -#define __cpp_alias_templates 200704 -#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__ -#define __FLT_DENORM_MIN__ 1.40129846432481707092372958328991613e-45F -#define __INT8_MAX__ 0x7f -#define __LONG_WIDTH__ 64 -#define __PIC__ 2 -#define __UINT_FAST32_TYPE__ long unsigned int -#define __CHAR32_TYPE__ unsigned int -#define __FLT_MAX__ 3.40282346638528859811704183484516925e+38F -#define __cpp_constexpr 201304 -#define __INT32_TYPE__ int -#define __SIZEOF_DOUBLE__ 8 -#define __cpp_exceptions 199711 -#define __FLT_MIN_10_EXP__ (-37) -#define __FLT64_MIN__ 2.22507385850720138309023271733240406e-308F64 -#define __INT_LEAST32_WIDTH__ 32 -#define __INTMAX_TYPE__ long int -#define __DEC128_MAX_EXP__ 6145 -#define __FLT32X_HAS_QUIET_NAN__ 1 -#define __ATOMIC_CONSUME 1 -#define __GNUC_MINOR__ 3 -#define __GLIBCXX_TYPE_INT_N_0 __int128 -#define __INT_FAST16_WIDTH__ 64 -#define __UINTMAX_MAX__ 0xffffffffffffffffUL -#define __DEC32_MANT_DIG__ 7 -#define __FLT32X_DENORM_MIN__ 4.94065645841246544176568792868221372e-324F32x -#define __DBL_MAX_10_EXP__ 308 -#define __LDBL_DENORM_MIN__ 3.64519953188247460252840593361941982e-4951L -#define __INT16_C(c) c -#define __cpp_generic_lambdas 201304 -#define __STDC__ 1 -#define __FLT32X_DIG__ 15 -#define __PTRDIFF_TYPE__ long int -#define __ATOMIC_SEQ_CST 5 -#define __UINT32_TYPE__ unsigned int -#define __FLT32X_MIN_10_EXP__ (-307) -#define __UINTPTR_TYPE__ long unsigned int -#define __DEC64_SUBNORMAL_MIN__ 0.000000000000001E-383DD -#define __DEC128_MANT_DIG__ 34 -#define __LDBL_MIN_10_EXP__ (-4931) -#define __FLT128_EPSILON__ 1.92592994438723585305597794258492732e-34F128 -#define __SSE_MATH__ 1 -#define __SIZEOF_LONG_LONG__ 8 -#define __cpp_user_defined_literals 200809 -#define __FLT128_DECIMAL_DIG__ 36 -#define __GCC_ATOMIC_LLONG_LOCK_FREE 2 -#define __FLT32X_MIN__ 2.22507385850720138309023271733240406e-308F32x -#define __LDBL_DIG__ 18 -#define __FLT_DECIMAL_DIG__ 9 -#define __UINT_FAST16_MAX__ 0xffffffffffffffffUL -#define __GCC_ATOMIC_SHORT_LOCK_FREE 2 -#define __INT_LEAST64_WIDTH__ 64 -#define __UINT_FAST8_TYPE__ unsigned char -#define _GNU_SOURCE 1 -#define __cpp_init_captures 201304 -#define __ATOMIC_ACQ_REL 4 -#define __ATOMIC_RELEASE 3 diff --git a/ui_settings.h b/ui_settings.h deleted file mode 100644 index dfe14768..00000000 --- a/ui_settings.h +++ /dev/null @@ -1,1392 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'settings.ui' -** -** Created by: Qt User Interface Compiler version 5.12.8 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_SETTINGS_H -#define UI_SETTINGS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_SettingsWindow -{ -public: - QVBoxLayout *verticalLayout; - QLabel *settingsLabel; - QTabWidget *tabWidget; - QWidget *commonTab; - QVBoxLayout *verticalLayout_4; - QGroupBox *commonSettingsBox; - QVBoxLayout *verticalLayout_3; - QHBoxLayout *horizontalLayout_2; - QLabel *startWindowLabel; - QComboBox *startWindow; - QSpacerItem *horizontalSpacer_2; - QHBoxLayout *horizontalLayout_4; - QLabel *languageLabel; - QComboBox *language; - QSpacerItem *horizontalSpacer_4; - QLabel *label_4; - QHBoxLayout *horizontalLayout_8; - QLabel *registersLabel_2; - QRadioButton *registersYesRadioButton; - QRadioButton *registersNoRadioButton; - QSpacerItem *horizontalSpacer_9; - QHBoxLayout *horizontalLayout_7; - QLabel *insertDebugStringLabel; - QCheckBox *insertDebugStringCheckBox; - QSpacerItem *horizontalSpacer_10; - QGroupBox *codeSettingsBox; - QVBoxLayout *verticalLayout_2; - QHBoxLayout *horizontalLayout_5; - QLabel *fontLabel; - QFontComboBox *fontComboBox; - QLabel *fontSizeLabel; - QSpinBox *fontSizeSpinBox; - QSpacerItem *horizontalSpacer_5; - QLabel *label; - QLabel *label_2; - QWidget *startTextWidget; - QSpacerItem *verticalSpacer_5; - QHBoxLayout *horizontalLayout; - QToolButton *resetAllButton; - QSpacerItem *horizontalSpacer_3; - QSpacerItem *verticalSpacer; - QWidget *colorsTab; - QGridLayout *gridLayout; - QGroupBox *groupBox; - QGridLayout *gridLayout_2; - QCheckBox *iomacroBoldCheckBox; - QLabel *systemLabel; - QPushButton *quotationColorButton; - QPushButton *systemColorButton; - QCheckBox *numbersItalicCheckBox; - QLabel *label_6; - QCheckBox *numbersBoldCheckBox; - QLabel *label_7; - QLabel *label_3; - QCheckBox *systemItalicCheckBox; - QPushButton *commentsColorButton_2; - QPushButton *keywordsColorButton; - QCheckBox *commentsBoldCheckBox; - QPushButton *keywordsColorButton_2; - QPushButton *iomacroColorButton_2; - QCheckBox *memoryItalicCheckBox; - QLabel *keywordsLabel; - QLabel *label_5; - QPushButton *labelsColorButton; - QLabel *numbersLabel; - QPushButton *quotationColorButton_2; - QLabel *labelsLabel; - QLabel *commentsLabel; - QPushButton *memoryColorButton; - QPushButton *systemColorButton_2; - QLabel *iomacroLabel_2; - QPushButton *labelsColorButton_2; - QCheckBox *registersBoldCheckBox; - QCheckBox *quotationBoldCheckBox; - QPushButton *iomacroColorButton; - QCheckBox *iomacroItalicCheckBox; - QPushButton *registersColorButton_2; - QCheckBox *keywordsBoldCheckBox; - QCheckBox *memoryBoldCheckBox; - QPushButton *numbersColorButton; - QCheckBox *quotationItalicCheckBox; - QPushButton *commentsColorButton; - QCheckBox *labelsItalicCheckBox; - QLabel *memoryLabel; - QLabel *iomacroLabel; - QCheckBox *keywordsItalicCheckBox; - QSpacerItem *verticalSpacer_3; - QLabel *registersLabel; - QCheckBox *commentsItalicCheckBox; - QCheckBox *labelsBoldCheckBox; - QCheckBox *registersItalicCheckBox; - QCheckBox *systemBoldCheckBox; - QPushButton *memoryColorButton_2; - QPushButton *registersColorButton; - QPushButton *numbersColorButton_2; - QSpacerItem *horizontalSpacer_7; - QGroupBox *groupBox_2; - QVBoxLayout *verticalLayout_5; - QGridLayout *gridLayout_4; - QLabel *fontLabel_2; - QPushButton *fontColorButton; - QCheckBox *currentLineCheckBox; - QPushButton *debugLineColorButton; - QLabel *currentLineLabel; - QLabel *debugLineLabel; - QPushButton *currentLineColorButton; - QLabel *backgroundLabel; - QPushButton *backgroundColorButton; - QLabel *lineNumberPanelLabel; - QPushButton *lineNumberPanelColorButton; - QLabel *lineNumberFontLabel; - QPushButton *lineNumberFontColorButton; - QLabel *label_8; - QSpacerItem *horizontalSpacer_6; - QSpacerItem *verticalSpacer_4; - QWidget *buildTab; - QVBoxLayout *verticalLayout_6; - QFormLayout *formLayout; - QLabel *modeLabel; - QHBoxLayout *horizontalLayout_3; - QRadioButton *x86RadioButton; - QRadioButton *x64RadioButton; - QSpacerItem *horizontalSpacer; - QLabel *assemblerLabel; - QHBoxLayout *horizontalLayout_6; - QRadioButton *nasmRadioButton; - QRadioButton *gasRadioButton; - QRadioButton *fasmRadioButton; - QRadioButton *masmRadioButton; - QSpacerItem *horizontalSpacer_8; - QLabel *assemblyLabel; - QLineEdit *assemblyOptionsEdit; - QLabel *linkingLabel; - QLineEdit *linkingOptionsEdit; - QLabel *assemblerPathLabel; - QLineEdit *assemblerPathEdit; - QLabel *linkerPathLabel; - QLineEdit *linkerPathEdit; - QLabel *objectFileNameLabel; - QLineEdit *objectFileNameEdit; - QLabel *gdbPathLabel; - QLineEdit *gdbPathEdit; - QLabel *assemblerWorkingDirectoryLabel; - QCheckBox *runInCurrentDirectoryCheckbox; - QLabel *disableLinkingLabel; - QCheckBox *disableLinkingCheckbox; - QLabel *gdbVerboseLabel; - QCheckBox *sasmVerboseCheckBox; - QLabel *MiModusLabel; - QCheckBox *MiModusCheckBox; - QLabel *infoLabel; - QDialogButtonBox *buttonBox; - QButtonGroup *buttonGroup; - QButtonGroup *buttonGroup_2; - QButtonGroup *buttonGroup_3; - - void setupUi(QWidget *SettingsWindow) - { - if (SettingsWindow->objectName().isEmpty()) - SettingsWindow->setObjectName(QString::fromUtf8("SettingsWindow")); - SettingsWindow->resize(1702, 971); - verticalLayout = new QVBoxLayout(SettingsWindow); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - settingsLabel = new QLabel(SettingsWindow); - settingsLabel->setObjectName(QString::fromUtf8("settingsLabel")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(settingsLabel->sizePolicy().hasHeightForWidth()); - settingsLabel->setSizePolicy(sizePolicy); - QFont font; - font.setPointSize(16); - settingsLabel->setFont(font); - settingsLabel->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout->addWidget(settingsLabel); - - tabWidget = new QTabWidget(SettingsWindow); - tabWidget->setObjectName(QString::fromUtf8("tabWidget")); - tabWidget->setLayoutDirection(Qt::LeftToRight); - tabWidget->setElideMode(Qt::ElideNone); - commonTab = new QWidget(); - commonTab->setObjectName(QString::fromUtf8("commonTab")); - verticalLayout_4 = new QVBoxLayout(commonTab); - verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); - commonSettingsBox = new QGroupBox(commonTab); - commonSettingsBox->setObjectName(QString::fromUtf8("commonSettingsBox")); - sizePolicy.setHeightForWidth(commonSettingsBox->sizePolicy().hasHeightForWidth()); - commonSettingsBox->setSizePolicy(sizePolicy); - commonSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - verticalLayout_3 = new QVBoxLayout(commonSettingsBox); - verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); - horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); - startWindowLabel = new QLabel(commonSettingsBox); - startWindowLabel->setObjectName(QString::fromUtf8("startWindowLabel")); - QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(startWindowLabel->sizePolicy().hasHeightForWidth()); - startWindowLabel->setSizePolicy(sizePolicy1); - - horizontalLayout_2->addWidget(startWindowLabel); - - startWindow = new QComboBox(commonSettingsBox); - startWindow->addItem(QString()); - startWindow->addItem(QString()); - startWindow->setObjectName(QString::fromUtf8("startWindow")); - QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Fixed); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(startWindow->sizePolicy().hasHeightForWidth()); - startWindow->setSizePolicy(sizePolicy2); - startWindow->setMinimumSize(QSize(266, 0)); - - horizontalLayout_2->addWidget(startWindow); - - horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_2->addItem(horizontalSpacer_2); - - - verticalLayout_3->addLayout(horizontalLayout_2); - - horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); - languageLabel = new QLabel(commonSettingsBox); - languageLabel->setObjectName(QString::fromUtf8("languageLabel")); - - horizontalLayout_4->addWidget(languageLabel); - - language = new QComboBox(commonSettingsBox); - language->addItem(QString::fromUtf8("\320\240\321\203\321\201\321\201\320\272\320\270\320\271")); - language->addItem(QString::fromUtf8("English")); - language->addItem(QString::fromUtf8("T\303\274rk")); - language->addItem(QString::fromUtf8("\344\270\255\345\233\275")); - language->addItem(QString::fromUtf8("Deutsch")); - language->addItem(QString::fromUtf8("Italiano")); - language->addItem(QString()); - language->addItem(QString()); - language->addItem(QString()); - language->setObjectName(QString::fromUtf8("language")); - - horizontalLayout_4->addWidget(language); - - horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_4->addItem(horizontalSpacer_4); - - - verticalLayout_3->addLayout(horizontalLayout_4); - - label_4 = new QLabel(commonSettingsBox); - label_4->setObjectName(QString::fromUtf8("label_4")); - - verticalLayout_3->addWidget(label_4); - - horizontalLayout_8 = new QHBoxLayout(); - horizontalLayout_8->setObjectName(QString::fromUtf8("horizontalLayout_8")); - registersLabel_2 = new QLabel(commonSettingsBox); - registersLabel_2->setObjectName(QString::fromUtf8("registersLabel_2")); - - horizontalLayout_8->addWidget(registersLabel_2); - - registersYesRadioButton = new QRadioButton(commonSettingsBox); - buttonGroup_3 = new QButtonGroup(SettingsWindow); - buttonGroup_3->setObjectName(QString::fromUtf8("buttonGroup_3")); - buttonGroup_3->addButton(registersYesRadioButton); - registersYesRadioButton->setObjectName(QString::fromUtf8("registersYesRadioButton")); - registersYesRadioButton->setChecked(false); - - horizontalLayout_8->addWidget(registersYesRadioButton); - - registersNoRadioButton = new QRadioButton(commonSettingsBox); - buttonGroup_3->addButton(registersNoRadioButton); - registersNoRadioButton->setObjectName(QString::fromUtf8("registersNoRadioButton")); - registersNoRadioButton->setChecked(true); - - horizontalLayout_8->addWidget(registersNoRadioButton); - - horizontalSpacer_9 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_8->addItem(horizontalSpacer_9); - - - verticalLayout_3->addLayout(horizontalLayout_8); - - horizontalLayout_7 = new QHBoxLayout(); - horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7")); - insertDebugStringLabel = new QLabel(commonSettingsBox); - insertDebugStringLabel->setObjectName(QString::fromUtf8("insertDebugStringLabel")); - - horizontalLayout_7->addWidget(insertDebugStringLabel); - - insertDebugStringCheckBox = new QCheckBox(commonSettingsBox); - insertDebugStringCheckBox->setObjectName(QString::fromUtf8("insertDebugStringCheckBox")); - insertDebugStringCheckBox->setChecked(true); - - horizontalLayout_7->addWidget(insertDebugStringCheckBox); - - horizontalSpacer_10 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_7->addItem(horizontalSpacer_10); - - - verticalLayout_3->addLayout(horizontalLayout_7); - - - verticalLayout_4->addWidget(commonSettingsBox); - - codeSettingsBox = new QGroupBox(commonTab); - codeSettingsBox->setObjectName(QString::fromUtf8("codeSettingsBox")); - sizePolicy.setHeightForWidth(codeSettingsBox->sizePolicy().hasHeightForWidth()); - codeSettingsBox->setSizePolicy(sizePolicy); - codeSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - verticalLayout_2 = new QVBoxLayout(codeSettingsBox); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); - horizontalLayout_5 = new QHBoxLayout(); - horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5")); - fontLabel = new QLabel(codeSettingsBox); - fontLabel->setObjectName(QString::fromUtf8("fontLabel")); - - horizontalLayout_5->addWidget(fontLabel); - - fontComboBox = new QFontComboBox(codeSettingsBox); - fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); - fontComboBox->setWritingSystem(QFontDatabase::Latin); - fontComboBox->setFontFilters(QFontComboBox::AllFonts); - QFont font1; - font1.setFamily(QString::fromUtf8("Arial")); - font1.setPointSize(12); - fontComboBox->setCurrentFont(font1); - - horizontalLayout_5->addWidget(fontComboBox); - - fontSizeLabel = new QLabel(codeSettingsBox); - fontSizeLabel->setObjectName(QString::fromUtf8("fontSizeLabel")); - - horizontalLayout_5->addWidget(fontSizeLabel); - - fontSizeSpinBox = new QSpinBox(codeSettingsBox); - fontSizeSpinBox->setObjectName(QString::fromUtf8("fontSizeSpinBox")); - fontSizeSpinBox->setMinimum(5); - fontSizeSpinBox->setMaximum(72); - fontSizeSpinBox->setValue(12); - - horizontalLayout_5->addWidget(fontSizeSpinBox); - - horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_5->addItem(horizontalSpacer_5); - - - verticalLayout_2->addLayout(horizontalLayout_5); - - label = new QLabel(codeSettingsBox); - label->setObjectName(QString::fromUtf8("label")); - label->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout_2->addWidget(label); - - label_2 = new QLabel(codeSettingsBox); - label_2->setObjectName(QString::fromUtf8("label_2")); - label_2->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout_2->addWidget(label_2); - - startTextWidget = new QWidget(codeSettingsBox); - startTextWidget->setObjectName(QString::fromUtf8("startTextWidget")); - - verticalLayout_2->addWidget(startTextWidget); - - verticalSpacer_5 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_2->addItem(verticalSpacer_5); - - - verticalLayout_4->addWidget(codeSettingsBox); - - horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - resetAllButton = new QToolButton(commonTab); - resetAllButton->setObjectName(QString::fromUtf8("resetAllButton")); - resetAllButton->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - horizontalLayout->addWidget(resetAllButton); - - horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout->addItem(horizontalSpacer_3); - - - verticalLayout_4->addLayout(horizontalLayout); - - verticalSpacer = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_4->addItem(verticalSpacer); - - tabWidget->addTab(commonTab, QString()); - colorsTab = new QWidget(); - colorsTab->setObjectName(QString::fromUtf8("colorsTab")); - gridLayout = new QGridLayout(colorsTab); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - groupBox = new QGroupBox(colorsTab); - groupBox->setObjectName(QString::fromUtf8("groupBox")); - gridLayout_2 = new QGridLayout(groupBox); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); - iomacroBoldCheckBox = new QCheckBox(groupBox); - iomacroBoldCheckBox->setObjectName(QString::fromUtf8("iomacroBoldCheckBox")); - QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Minimum); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(iomacroBoldCheckBox->sizePolicy().hasHeightForWidth()); - iomacroBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(iomacroBoldCheckBox, 8, 3, 1, 1); - - systemLabel = new QLabel(groupBox); - systemLabel->setObjectName(QString::fromUtf8("systemLabel")); - - gridLayout_2->addWidget(systemLabel, 7, 0, 1, 1); - - quotationColorButton = new QPushButton(groupBox); - quotationColorButton->setObjectName(QString::fromUtf8("quotationColorButton")); - sizePolicy1.setHeightForWidth(quotationColorButton->sizePolicy().hasHeightForWidth()); - quotationColorButton->setSizePolicy(sizePolicy1); - quotationColorButton->setMinimumSize(QSize(23, 23)); - quotationColorButton->setMaximumSize(QSize(23, 23)); - quotationColorButton->setBaseSize(QSize(0, 0)); - quotationColorButton->setFocusPolicy(Qt::NoFocus); - quotationColorButton->setAutoDefault(false); - quotationColorButton->setFlat(false); - - gridLayout_2->addWidget(quotationColorButton, 9, 1, 1, 1); - - systemColorButton = new QPushButton(groupBox); - systemColorButton->setObjectName(QString::fromUtf8("systemColorButton")); - sizePolicy1.setHeightForWidth(systemColorButton->sizePolicy().hasHeightForWidth()); - systemColorButton->setSizePolicy(sizePolicy1); - systemColorButton->setMinimumSize(QSize(23, 23)); - systemColorButton->setMaximumSize(QSize(23, 23)); - systemColorButton->setBaseSize(QSize(0, 0)); - systemColorButton->setFocusPolicy(Qt::NoFocus); - systemColorButton->setAutoDefault(false); - systemColorButton->setFlat(false); - - gridLayout_2->addWidget(systemColorButton, 7, 1, 1, 1); - - numbersItalicCheckBox = new QCheckBox(groupBox); - numbersItalicCheckBox->setObjectName(QString::fromUtf8("numbersItalicCheckBox")); - sizePolicy3.setHeightForWidth(numbersItalicCheckBox->sizePolicy().hasHeightForWidth()); - numbersItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(numbersItalicCheckBox, 3, 4, 1, 1); - - label_6 = new QLabel(groupBox); - label_6->setObjectName(QString::fromUtf8("label_6")); - - gridLayout_2->addWidget(label_6, 0, 3, 1, 1); - - numbersBoldCheckBox = new QCheckBox(groupBox); - numbersBoldCheckBox->setObjectName(QString::fromUtf8("numbersBoldCheckBox")); - sizePolicy3.setHeightForWidth(numbersBoldCheckBox->sizePolicy().hasHeightForWidth()); - numbersBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(numbersBoldCheckBox, 3, 3, 1, 1); - - label_7 = new QLabel(groupBox); - label_7->setObjectName(QString::fromUtf8("label_7")); - - gridLayout_2->addWidget(label_7, 0, 4, 1, 1); - - label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); - - gridLayout_2->addWidget(label_3, 0, 1, 1, 1); - - systemItalicCheckBox = new QCheckBox(groupBox); - systemItalicCheckBox->setObjectName(QString::fromUtf8("systemItalicCheckBox")); - sizePolicy3.setHeightForWidth(systemItalicCheckBox->sizePolicy().hasHeightForWidth()); - systemItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(systemItalicCheckBox, 7, 4, 1, 1); - - commentsColorButton_2 = new QPushButton(groupBox); - commentsColorButton_2->setObjectName(QString::fromUtf8("commentsColorButton_2")); - sizePolicy1.setHeightForWidth(commentsColorButton_2->sizePolicy().hasHeightForWidth()); - commentsColorButton_2->setSizePolicy(sizePolicy1); - commentsColorButton_2->setMinimumSize(QSize(23, 23)); - commentsColorButton_2->setMaximumSize(QSize(23, 23)); - commentsColorButton_2->setBaseSize(QSize(0, 0)); - commentsColorButton_2->setFocusPolicy(Qt::NoFocus); - commentsColorButton_2->setAutoDefault(false); - commentsColorButton_2->setFlat(false); - - gridLayout_2->addWidget(commentsColorButton_2, 6, 2, 1, 1); - - keywordsColorButton = new QPushButton(groupBox); - keywordsColorButton->setObjectName(QString::fromUtf8("keywordsColorButton")); - sizePolicy1.setHeightForWidth(keywordsColorButton->sizePolicy().hasHeightForWidth()); - keywordsColorButton->setSizePolicy(sizePolicy1); - keywordsColorButton->setMinimumSize(QSize(23, 23)); - keywordsColorButton->setMaximumSize(QSize(23, 23)); - keywordsColorButton->setBaseSize(QSize(0, 0)); - keywordsColorButton->setFocusPolicy(Qt::NoFocus); - keywordsColorButton->setAutoDefault(false); - keywordsColorButton->setFlat(false); - - gridLayout_2->addWidget(keywordsColorButton, 1, 1, 1, 1); - - commentsBoldCheckBox = new QCheckBox(groupBox); - commentsBoldCheckBox->setObjectName(QString::fromUtf8("commentsBoldCheckBox")); - sizePolicy3.setHeightForWidth(commentsBoldCheckBox->sizePolicy().hasHeightForWidth()); - commentsBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(commentsBoldCheckBox, 6, 3, 1, 1); - - keywordsColorButton_2 = new QPushButton(groupBox); - keywordsColorButton_2->setObjectName(QString::fromUtf8("keywordsColorButton_2")); - sizePolicy1.setHeightForWidth(keywordsColorButton_2->sizePolicy().hasHeightForWidth()); - keywordsColorButton_2->setSizePolicy(sizePolicy1); - keywordsColorButton_2->setMinimumSize(QSize(23, 23)); - keywordsColorButton_2->setMaximumSize(QSize(23, 23)); - keywordsColorButton_2->setBaseSize(QSize(0, 0)); - keywordsColorButton_2->setFocusPolicy(Qt::NoFocus); - keywordsColorButton_2->setAutoDefault(false); - keywordsColorButton_2->setFlat(false); - - gridLayout_2->addWidget(keywordsColorButton_2, 1, 2, 1, 1); - - iomacroColorButton_2 = new QPushButton(groupBox); - iomacroColorButton_2->setObjectName(QString::fromUtf8("iomacroColorButton_2")); - sizePolicy1.setHeightForWidth(iomacroColorButton_2->sizePolicy().hasHeightForWidth()); - iomacroColorButton_2->setSizePolicy(sizePolicy1); - iomacroColorButton_2->setMinimumSize(QSize(23, 23)); - iomacroColorButton_2->setMaximumSize(QSize(23, 23)); - iomacroColorButton_2->setBaseSize(QSize(0, 0)); - iomacroColorButton_2->setFocusPolicy(Qt::NoFocus); - iomacroColorButton_2->setAutoDefault(false); - iomacroColorButton_2->setFlat(false); - - gridLayout_2->addWidget(iomacroColorButton_2, 8, 2, 1, 1); - - memoryItalicCheckBox = new QCheckBox(groupBox); - memoryItalicCheckBox->setObjectName(QString::fromUtf8("memoryItalicCheckBox")); - sizePolicy3.setHeightForWidth(memoryItalicCheckBox->sizePolicy().hasHeightForWidth()); - memoryItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(memoryItalicCheckBox, 4, 4, 1, 1); - - keywordsLabel = new QLabel(groupBox); - keywordsLabel->setObjectName(QString::fromUtf8("keywordsLabel")); - - gridLayout_2->addWidget(keywordsLabel, 1, 0, 1, 1); - - label_5 = new QLabel(groupBox); - label_5->setObjectName(QString::fromUtf8("label_5")); - - gridLayout_2->addWidget(label_5, 0, 2, 1, 1); - - labelsColorButton = new QPushButton(groupBox); - labelsColorButton->setObjectName(QString::fromUtf8("labelsColorButton")); - sizePolicy1.setHeightForWidth(labelsColorButton->sizePolicy().hasHeightForWidth()); - labelsColorButton->setSizePolicy(sizePolicy1); - labelsColorButton->setMinimumSize(QSize(23, 23)); - labelsColorButton->setMaximumSize(QSize(23, 23)); - labelsColorButton->setBaseSize(QSize(0, 0)); - labelsColorButton->setFocusPolicy(Qt::NoFocus); - labelsColorButton->setAutoDefault(false); - labelsColorButton->setFlat(false); - - gridLayout_2->addWidget(labelsColorButton, 5, 1, 1, 1); - - numbersLabel = new QLabel(groupBox); - numbersLabel->setObjectName(QString::fromUtf8("numbersLabel")); - - gridLayout_2->addWidget(numbersLabel, 3, 0, 1, 1); - - quotationColorButton_2 = new QPushButton(groupBox); - quotationColorButton_2->setObjectName(QString::fromUtf8("quotationColorButton_2")); - sizePolicy1.setHeightForWidth(quotationColorButton_2->sizePolicy().hasHeightForWidth()); - quotationColorButton_2->setSizePolicy(sizePolicy1); - quotationColorButton_2->setMinimumSize(QSize(23, 23)); - quotationColorButton_2->setMaximumSize(QSize(23, 23)); - quotationColorButton_2->setBaseSize(QSize(0, 0)); - quotationColorButton_2->setFocusPolicy(Qt::NoFocus); - quotationColorButton_2->setAutoDefault(false); - quotationColorButton_2->setFlat(false); - - gridLayout_2->addWidget(quotationColorButton_2, 9, 2, 1, 1); - - labelsLabel = new QLabel(groupBox); - labelsLabel->setObjectName(QString::fromUtf8("labelsLabel")); - - gridLayout_2->addWidget(labelsLabel, 5, 0, 1, 1); - - commentsLabel = new QLabel(groupBox); - commentsLabel->setObjectName(QString::fromUtf8("commentsLabel")); - - gridLayout_2->addWidget(commentsLabel, 6, 0, 1, 1); - - memoryColorButton = new QPushButton(groupBox); - memoryColorButton->setObjectName(QString::fromUtf8("memoryColorButton")); - sizePolicy1.setHeightForWidth(memoryColorButton->sizePolicy().hasHeightForWidth()); - memoryColorButton->setSizePolicy(sizePolicy1); - memoryColorButton->setMinimumSize(QSize(23, 23)); - memoryColorButton->setMaximumSize(QSize(23, 23)); - memoryColorButton->setBaseSize(QSize(0, 0)); - memoryColorButton->setFocusPolicy(Qt::NoFocus); - memoryColorButton->setAutoDefault(false); - memoryColorButton->setFlat(false); - - gridLayout_2->addWidget(memoryColorButton, 4, 1, 1, 1); - - systemColorButton_2 = new QPushButton(groupBox); - systemColorButton_2->setObjectName(QString::fromUtf8("systemColorButton_2")); - sizePolicy1.setHeightForWidth(systemColorButton_2->sizePolicy().hasHeightForWidth()); - systemColorButton_2->setSizePolicy(sizePolicy1); - systemColorButton_2->setMinimumSize(QSize(23, 23)); - systemColorButton_2->setMaximumSize(QSize(23, 23)); - systemColorButton_2->setBaseSize(QSize(0, 0)); - systemColorButton_2->setFocusPolicy(Qt::NoFocus); - systemColorButton_2->setAutoDefault(false); - systemColorButton_2->setFlat(false); - - gridLayout_2->addWidget(systemColorButton_2, 7, 2, 1, 1); - - iomacroLabel_2 = new QLabel(groupBox); - iomacroLabel_2->setObjectName(QString::fromUtf8("iomacroLabel_2")); - - gridLayout_2->addWidget(iomacroLabel_2, 9, 0, 1, 1); - - labelsColorButton_2 = new QPushButton(groupBox); - labelsColorButton_2->setObjectName(QString::fromUtf8("labelsColorButton_2")); - sizePolicy1.setHeightForWidth(labelsColorButton_2->sizePolicy().hasHeightForWidth()); - labelsColorButton_2->setSizePolicy(sizePolicy1); - labelsColorButton_2->setMinimumSize(QSize(23, 23)); - labelsColorButton_2->setMaximumSize(QSize(23, 23)); - labelsColorButton_2->setBaseSize(QSize(0, 0)); - labelsColorButton_2->setFocusPolicy(Qt::NoFocus); - labelsColorButton_2->setAutoDefault(false); - labelsColorButton_2->setFlat(false); - - gridLayout_2->addWidget(labelsColorButton_2, 5, 2, 1, 1); - - registersBoldCheckBox = new QCheckBox(groupBox); - registersBoldCheckBox->setObjectName(QString::fromUtf8("registersBoldCheckBox")); - sizePolicy3.setHeightForWidth(registersBoldCheckBox->sizePolicy().hasHeightForWidth()); - registersBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(registersBoldCheckBox, 2, 3, 1, 1); - - quotationBoldCheckBox = new QCheckBox(groupBox); - quotationBoldCheckBox->setObjectName(QString::fromUtf8("quotationBoldCheckBox")); - sizePolicy3.setHeightForWidth(quotationBoldCheckBox->sizePolicy().hasHeightForWidth()); - quotationBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(quotationBoldCheckBox, 9, 3, 1, 1); - - iomacroColorButton = new QPushButton(groupBox); - iomacroColorButton->setObjectName(QString::fromUtf8("iomacroColorButton")); - sizePolicy1.setHeightForWidth(iomacroColorButton->sizePolicy().hasHeightForWidth()); - iomacroColorButton->setSizePolicy(sizePolicy1); - iomacroColorButton->setMinimumSize(QSize(23, 23)); - iomacroColorButton->setMaximumSize(QSize(23, 23)); - iomacroColorButton->setBaseSize(QSize(0, 0)); - iomacroColorButton->setFocusPolicy(Qt::NoFocus); - iomacroColorButton->setAutoDefault(false); - iomacroColorButton->setFlat(false); - - gridLayout_2->addWidget(iomacroColorButton, 8, 1, 1, 1); - - iomacroItalicCheckBox = new QCheckBox(groupBox); - iomacroItalicCheckBox->setObjectName(QString::fromUtf8("iomacroItalicCheckBox")); - sizePolicy3.setHeightForWidth(iomacroItalicCheckBox->sizePolicy().hasHeightForWidth()); - iomacroItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(iomacroItalicCheckBox, 8, 4, 1, 1); - - registersColorButton_2 = new QPushButton(groupBox); - registersColorButton_2->setObjectName(QString::fromUtf8("registersColorButton_2")); - sizePolicy1.setHeightForWidth(registersColorButton_2->sizePolicy().hasHeightForWidth()); - registersColorButton_2->setSizePolicy(sizePolicy1); - registersColorButton_2->setMinimumSize(QSize(23, 23)); - registersColorButton_2->setMaximumSize(QSize(23, 23)); - registersColorButton_2->setBaseSize(QSize(0, 0)); - registersColorButton_2->setFocusPolicy(Qt::NoFocus); - registersColorButton_2->setAutoDefault(false); - registersColorButton_2->setFlat(false); - - gridLayout_2->addWidget(registersColorButton_2, 2, 2, 1, 1); - - keywordsBoldCheckBox = new QCheckBox(groupBox); - keywordsBoldCheckBox->setObjectName(QString::fromUtf8("keywordsBoldCheckBox")); - sizePolicy3.setHeightForWidth(keywordsBoldCheckBox->sizePolicy().hasHeightForWidth()); - keywordsBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(keywordsBoldCheckBox, 1, 3, 1, 1); - - memoryBoldCheckBox = new QCheckBox(groupBox); - memoryBoldCheckBox->setObjectName(QString::fromUtf8("memoryBoldCheckBox")); - sizePolicy3.setHeightForWidth(memoryBoldCheckBox->sizePolicy().hasHeightForWidth()); - memoryBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(memoryBoldCheckBox, 4, 3, 1, 1); - - numbersColorButton = new QPushButton(groupBox); - numbersColorButton->setObjectName(QString::fromUtf8("numbersColorButton")); - sizePolicy1.setHeightForWidth(numbersColorButton->sizePolicy().hasHeightForWidth()); - numbersColorButton->setSizePolicy(sizePolicy1); - numbersColorButton->setMinimumSize(QSize(23, 23)); - numbersColorButton->setMaximumSize(QSize(23, 23)); - numbersColorButton->setBaseSize(QSize(0, 0)); - numbersColorButton->setFocusPolicy(Qt::NoFocus); - numbersColorButton->setAutoDefault(false); - numbersColorButton->setFlat(false); - - gridLayout_2->addWidget(numbersColorButton, 3, 1, 1, 1); - - quotationItalicCheckBox = new QCheckBox(groupBox); - quotationItalicCheckBox->setObjectName(QString::fromUtf8("quotationItalicCheckBox")); - sizePolicy3.setHeightForWidth(quotationItalicCheckBox->sizePolicy().hasHeightForWidth()); - quotationItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(quotationItalicCheckBox, 9, 4, 1, 1); - - commentsColorButton = new QPushButton(groupBox); - commentsColorButton->setObjectName(QString::fromUtf8("commentsColorButton")); - sizePolicy1.setHeightForWidth(commentsColorButton->sizePolicy().hasHeightForWidth()); - commentsColorButton->setSizePolicy(sizePolicy1); - commentsColorButton->setMinimumSize(QSize(23, 23)); - commentsColorButton->setMaximumSize(QSize(23, 23)); - commentsColorButton->setBaseSize(QSize(0, 0)); - commentsColorButton->setFocusPolicy(Qt::NoFocus); - commentsColorButton->setAutoDefault(false); - commentsColorButton->setFlat(false); - - gridLayout_2->addWidget(commentsColorButton, 6, 1, 1, 1); - - labelsItalicCheckBox = new QCheckBox(groupBox); - labelsItalicCheckBox->setObjectName(QString::fromUtf8("labelsItalicCheckBox")); - sizePolicy3.setHeightForWidth(labelsItalicCheckBox->sizePolicy().hasHeightForWidth()); - labelsItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(labelsItalicCheckBox, 5, 4, 1, 1); - - memoryLabel = new QLabel(groupBox); - memoryLabel->setObjectName(QString::fromUtf8("memoryLabel")); - - gridLayout_2->addWidget(memoryLabel, 4, 0, 1, 1); - - iomacroLabel = new QLabel(groupBox); - iomacroLabel->setObjectName(QString::fromUtf8("iomacroLabel")); - - gridLayout_2->addWidget(iomacroLabel, 8, 0, 1, 1); - - keywordsItalicCheckBox = new QCheckBox(groupBox); - keywordsItalicCheckBox->setObjectName(QString::fromUtf8("keywordsItalicCheckBox")); - sizePolicy3.setHeightForWidth(keywordsItalicCheckBox->sizePolicy().hasHeightForWidth()); - keywordsItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(keywordsItalicCheckBox, 1, 4, 1, 1); - - verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout_2->addItem(verticalSpacer_3, 10, 1, 1, 1); - - registersLabel = new QLabel(groupBox); - registersLabel->setObjectName(QString::fromUtf8("registersLabel")); - - gridLayout_2->addWidget(registersLabel, 2, 0, 1, 1); - - commentsItalicCheckBox = new QCheckBox(groupBox); - commentsItalicCheckBox->setObjectName(QString::fromUtf8("commentsItalicCheckBox")); - sizePolicy3.setHeightForWidth(commentsItalicCheckBox->sizePolicy().hasHeightForWidth()); - commentsItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(commentsItalicCheckBox, 6, 4, 1, 1); - - labelsBoldCheckBox = new QCheckBox(groupBox); - labelsBoldCheckBox->setObjectName(QString::fromUtf8("labelsBoldCheckBox")); - sizePolicy3.setHeightForWidth(labelsBoldCheckBox->sizePolicy().hasHeightForWidth()); - labelsBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(labelsBoldCheckBox, 5, 3, 1, 1); - - registersItalicCheckBox = new QCheckBox(groupBox); - registersItalicCheckBox->setObjectName(QString::fromUtf8("registersItalicCheckBox")); - sizePolicy3.setHeightForWidth(registersItalicCheckBox->sizePolicy().hasHeightForWidth()); - registersItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(registersItalicCheckBox, 2, 4, 1, 1); - - systemBoldCheckBox = new QCheckBox(groupBox); - systemBoldCheckBox->setObjectName(QString::fromUtf8("systemBoldCheckBox")); - sizePolicy3.setHeightForWidth(systemBoldCheckBox->sizePolicy().hasHeightForWidth()); - systemBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(systemBoldCheckBox, 7, 3, 1, 1); - - memoryColorButton_2 = new QPushButton(groupBox); - memoryColorButton_2->setObjectName(QString::fromUtf8("memoryColorButton_2")); - sizePolicy1.setHeightForWidth(memoryColorButton_2->sizePolicy().hasHeightForWidth()); - memoryColorButton_2->setSizePolicy(sizePolicy1); - memoryColorButton_2->setMinimumSize(QSize(23, 23)); - memoryColorButton_2->setMaximumSize(QSize(23, 23)); - memoryColorButton_2->setBaseSize(QSize(0, 0)); - memoryColorButton_2->setFocusPolicy(Qt::NoFocus); - memoryColorButton_2->setAutoDefault(false); - memoryColorButton_2->setFlat(false); - - gridLayout_2->addWidget(memoryColorButton_2, 4, 2, 1, 1); - - registersColorButton = new QPushButton(groupBox); - registersColorButton->setObjectName(QString::fromUtf8("registersColorButton")); - sizePolicy1.setHeightForWidth(registersColorButton->sizePolicy().hasHeightForWidth()); - registersColorButton->setSizePolicy(sizePolicy1); - registersColorButton->setMinimumSize(QSize(23, 23)); - registersColorButton->setMaximumSize(QSize(23, 23)); - registersColorButton->setBaseSize(QSize(0, 0)); - registersColorButton->setFocusPolicy(Qt::NoFocus); - registersColorButton->setAutoDefault(false); - registersColorButton->setFlat(false); - - gridLayout_2->addWidget(registersColorButton, 2, 1, 1, 1); - - numbersColorButton_2 = new QPushButton(groupBox); - numbersColorButton_2->setObjectName(QString::fromUtf8("numbersColorButton_2")); - sizePolicy1.setHeightForWidth(numbersColorButton_2->sizePolicy().hasHeightForWidth()); - numbersColorButton_2->setSizePolicy(sizePolicy1); - numbersColorButton_2->setMinimumSize(QSize(23, 23)); - numbersColorButton_2->setMaximumSize(QSize(23, 23)); - numbersColorButton_2->setBaseSize(QSize(0, 0)); - numbersColorButton_2->setFocusPolicy(Qt::NoFocus); - numbersColorButton_2->setAutoDefault(false); - numbersColorButton_2->setFlat(false); - - gridLayout_2->addWidget(numbersColorButton_2, 3, 2, 1, 1); - - horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout_2->addItem(horizontalSpacer_7, 5, 5, 1, 1); - - - gridLayout->addWidget(groupBox, 0, 2, 1, 1); - - groupBox_2 = new QGroupBox(colorsTab); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); - verticalLayout_5 = new QVBoxLayout(groupBox_2); - verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5")); - gridLayout_4 = new QGridLayout(); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); - fontLabel_2 = new QLabel(groupBox_2); - fontLabel_2->setObjectName(QString::fromUtf8("fontLabel_2")); - - gridLayout_4->addWidget(fontLabel_2, 4, 0, 1, 1); - - fontColorButton = new QPushButton(groupBox_2); - fontColorButton->setObjectName(QString::fromUtf8("fontColorButton")); - sizePolicy1.setHeightForWidth(fontColorButton->sizePolicy().hasHeightForWidth()); - fontColorButton->setSizePolicy(sizePolicy1); - fontColorButton->setMinimumSize(QSize(23, 23)); - fontColorButton->setMaximumSize(QSize(23, 23)); - fontColorButton->setBaseSize(QSize(0, 0)); - fontColorButton->setFocusPolicy(Qt::NoFocus); - fontColorButton->setAutoDefault(false); - fontColorButton->setFlat(false); - - gridLayout_4->addWidget(fontColorButton, 4, 1, 1, 1); - - currentLineCheckBox = new QCheckBox(groupBox_2); - currentLineCheckBox->setObjectName(QString::fromUtf8("currentLineCheckBox")); - - gridLayout_4->addWidget(currentLineCheckBox, 5, 2, 1, 1); - - debugLineColorButton = new QPushButton(groupBox_2); - debugLineColorButton->setObjectName(QString::fromUtf8("debugLineColorButton")); - sizePolicy1.setHeightForWidth(debugLineColorButton->sizePolicy().hasHeightForWidth()); - debugLineColorButton->setSizePolicy(sizePolicy1); - debugLineColorButton->setMinimumSize(QSize(23, 23)); - debugLineColorButton->setMaximumSize(QSize(23, 23)); - debugLineColorButton->setBaseSize(QSize(0, 0)); - debugLineColorButton->setFocusPolicy(Qt::NoFocus); - debugLineColorButton->setAutoDefault(false); - debugLineColorButton->setFlat(false); - - gridLayout_4->addWidget(debugLineColorButton, 6, 1, 1, 1); - - currentLineLabel = new QLabel(groupBox_2); - currentLineLabel->setObjectName(QString::fromUtf8("currentLineLabel")); - - gridLayout_4->addWidget(currentLineLabel, 5, 0, 1, 1); - - debugLineLabel = new QLabel(groupBox_2); - debugLineLabel->setObjectName(QString::fromUtf8("debugLineLabel")); - - gridLayout_4->addWidget(debugLineLabel, 6, 0, 1, 1); - - currentLineColorButton = new QPushButton(groupBox_2); - currentLineColorButton->setObjectName(QString::fromUtf8("currentLineColorButton")); - sizePolicy1.setHeightForWidth(currentLineColorButton->sizePolicy().hasHeightForWidth()); - currentLineColorButton->setSizePolicy(sizePolicy1); - currentLineColorButton->setMinimumSize(QSize(23, 23)); - currentLineColorButton->setMaximumSize(QSize(23, 23)); - currentLineColorButton->setBaseSize(QSize(0, 0)); - currentLineColorButton->setFocusPolicy(Qt::NoFocus); - currentLineColorButton->setAutoDefault(false); - currentLineColorButton->setFlat(false); - - gridLayout_4->addWidget(currentLineColorButton, 5, 1, 1, 1); - - backgroundLabel = new QLabel(groupBox_2); - backgroundLabel->setObjectName(QString::fromUtf8("backgroundLabel")); - - gridLayout_4->addWidget(backgroundLabel, 1, 0, 1, 1); - - backgroundColorButton = new QPushButton(groupBox_2); - backgroundColorButton->setObjectName(QString::fromUtf8("backgroundColorButton")); - sizePolicy1.setHeightForWidth(backgroundColorButton->sizePolicy().hasHeightForWidth()); - backgroundColorButton->setSizePolicy(sizePolicy1); - backgroundColorButton->setMinimumSize(QSize(23, 23)); - backgroundColorButton->setMaximumSize(QSize(23, 23)); - backgroundColorButton->setBaseSize(QSize(0, 0)); - backgroundColorButton->setFocusPolicy(Qt::NoFocus); - backgroundColorButton->setAutoDefault(false); - backgroundColorButton->setFlat(false); - - gridLayout_4->addWidget(backgroundColorButton, 1, 1, 1, 1); - - lineNumberPanelLabel = new QLabel(groupBox_2); - lineNumberPanelLabel->setObjectName(QString::fromUtf8("lineNumberPanelLabel")); - - gridLayout_4->addWidget(lineNumberPanelLabel, 2, 0, 1, 1); - - lineNumberPanelColorButton = new QPushButton(groupBox_2); - lineNumberPanelColorButton->setObjectName(QString::fromUtf8("lineNumberPanelColorButton")); - sizePolicy1.setHeightForWidth(lineNumberPanelColorButton->sizePolicy().hasHeightForWidth()); - lineNumberPanelColorButton->setSizePolicy(sizePolicy1); - lineNumberPanelColorButton->setMinimumSize(QSize(23, 23)); - lineNumberPanelColorButton->setMaximumSize(QSize(23, 23)); - lineNumberPanelColorButton->setBaseSize(QSize(0, 0)); - lineNumberPanelColorButton->setFocusPolicy(Qt::NoFocus); - lineNumberPanelColorButton->setAutoDefault(false); - lineNumberPanelColorButton->setFlat(false); - - gridLayout_4->addWidget(lineNumberPanelColorButton, 2, 1, 1, 1); - - lineNumberFontLabel = new QLabel(groupBox_2); - lineNumberFontLabel->setObjectName(QString::fromUtf8("lineNumberFontLabel")); - - gridLayout_4->addWidget(lineNumberFontLabel, 3, 0, 1, 1); - - lineNumberFontColorButton = new QPushButton(groupBox_2); - lineNumberFontColorButton->setObjectName(QString::fromUtf8("lineNumberFontColorButton")); - sizePolicy1.setHeightForWidth(lineNumberFontColorButton->sizePolicy().hasHeightForWidth()); - lineNumberFontColorButton->setSizePolicy(sizePolicy1); - lineNumberFontColorButton->setMinimumSize(QSize(23, 23)); - lineNumberFontColorButton->setMaximumSize(QSize(23, 23)); - lineNumberFontColorButton->setBaseSize(QSize(0, 0)); - lineNumberFontColorButton->setFocusPolicy(Qt::NoFocus); - lineNumberFontColorButton->setAutoDefault(false); - lineNumberFontColorButton->setFlat(false); - - gridLayout_4->addWidget(lineNumberFontColorButton, 3, 1, 1, 1); - - - verticalLayout_5->addLayout(gridLayout_4); - - label_8 = new QLabel(groupBox_2); - label_8->setObjectName(QString::fromUtf8("label_8")); - label_8->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout_5->addWidget(label_8); - - horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - verticalLayout_5->addItem(horizontalSpacer_6); - - verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_5->addItem(verticalSpacer_4); - - - gridLayout->addWidget(groupBox_2, 0, 0, 1, 1); - - tabWidget->addTab(colorsTab, QString()); - buildTab = new QWidget(); - buildTab->setObjectName(QString::fromUtf8("buildTab")); - verticalLayout_6 = new QVBoxLayout(buildTab); - verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6")); - formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); - formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); - formLayout->setHorizontalSpacing(12); - formLayout->setVerticalSpacing(12); - formLayout->setContentsMargins(-1, -1, -1, 0); - modeLabel = new QLabel(buildTab); - modeLabel->setObjectName(QString::fromUtf8("modeLabel")); - - formLayout->setWidget(0, QFormLayout::LabelRole, modeLabel); - - horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); - x86RadioButton = new QRadioButton(buildTab); - buttonGroup_2 = new QButtonGroup(SettingsWindow); - buttonGroup_2->setObjectName(QString::fromUtf8("buttonGroup_2")); - buttonGroup_2->addButton(x86RadioButton); - x86RadioButton->setObjectName(QString::fromUtf8("x86RadioButton")); - x86RadioButton->setChecked(true); - - horizontalLayout_3->addWidget(x86RadioButton); - - x64RadioButton = new QRadioButton(buildTab); - buttonGroup_2->addButton(x64RadioButton); - x64RadioButton->setObjectName(QString::fromUtf8("x64RadioButton")); - x64RadioButton->setChecked(false); - - horizontalLayout_3->addWidget(x64RadioButton); - - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_3->addItem(horizontalSpacer); - - - formLayout->setLayout(0, QFormLayout::FieldRole, horizontalLayout_3); - - assemblerLabel = new QLabel(buildTab); - assemblerLabel->setObjectName(QString::fromUtf8("assemblerLabel")); - - formLayout->setWidget(1, QFormLayout::LabelRole, assemblerLabel); - - horizontalLayout_6 = new QHBoxLayout(); - horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6")); - nasmRadioButton = new QRadioButton(buildTab); - buttonGroup = new QButtonGroup(SettingsWindow); - buttonGroup->setObjectName(QString::fromUtf8("buttonGroup")); - buttonGroup->addButton(nasmRadioButton); - nasmRadioButton->setObjectName(QString::fromUtf8("nasmRadioButton")); - nasmRadioButton->setChecked(true); - - horizontalLayout_6->addWidget(nasmRadioButton); - - gasRadioButton = new QRadioButton(buildTab); - buttonGroup->addButton(gasRadioButton); - gasRadioButton->setObjectName(QString::fromUtf8("gasRadioButton")); - - horizontalLayout_6->addWidget(gasRadioButton); - - fasmRadioButton = new QRadioButton(buildTab); - buttonGroup->addButton(fasmRadioButton); - fasmRadioButton->setObjectName(QString::fromUtf8("fasmRadioButton")); - - horizontalLayout_6->addWidget(fasmRadioButton); - - masmRadioButton = new QRadioButton(buildTab); - buttonGroup->addButton(masmRadioButton); - masmRadioButton->setObjectName(QString::fromUtf8("masmRadioButton")); - - horizontalLayout_6->addWidget(masmRadioButton); - - horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_6->addItem(horizontalSpacer_8); - - - formLayout->setLayout(1, QFormLayout::FieldRole, horizontalLayout_6); - - assemblyLabel = new QLabel(buildTab); - assemblyLabel->setObjectName(QString::fromUtf8("assemblyLabel")); - - formLayout->setWidget(2, QFormLayout::LabelRole, assemblyLabel); - - assemblyOptionsEdit = new QLineEdit(buildTab); - assemblyOptionsEdit->setObjectName(QString::fromUtf8("assemblyOptionsEdit")); - - formLayout->setWidget(2, QFormLayout::FieldRole, assemblyOptionsEdit); - - linkingLabel = new QLabel(buildTab); - linkingLabel->setObjectName(QString::fromUtf8("linkingLabel")); - - formLayout->setWidget(3, QFormLayout::LabelRole, linkingLabel); - - linkingOptionsEdit = new QLineEdit(buildTab); - linkingOptionsEdit->setObjectName(QString::fromUtf8("linkingOptionsEdit")); - - formLayout->setWidget(3, QFormLayout::FieldRole, linkingOptionsEdit); - - assemblerPathLabel = new QLabel(buildTab); - assemblerPathLabel->setObjectName(QString::fromUtf8("assemblerPathLabel")); - - formLayout->setWidget(4, QFormLayout::LabelRole, assemblerPathLabel); - - assemblerPathEdit = new QLineEdit(buildTab); - assemblerPathEdit->setObjectName(QString::fromUtf8("assemblerPathEdit")); - - formLayout->setWidget(4, QFormLayout::FieldRole, assemblerPathEdit); - - linkerPathLabel = new QLabel(buildTab); - linkerPathLabel->setObjectName(QString::fromUtf8("linkerPathLabel")); - - formLayout->setWidget(5, QFormLayout::LabelRole, linkerPathLabel); - - linkerPathEdit = new QLineEdit(buildTab); - linkerPathEdit->setObjectName(QString::fromUtf8("linkerPathEdit")); - - formLayout->setWidget(5, QFormLayout::FieldRole, linkerPathEdit); - - objectFileNameLabel = new QLabel(buildTab); - objectFileNameLabel->setObjectName(QString::fromUtf8("objectFileNameLabel")); - - formLayout->setWidget(6, QFormLayout::LabelRole, objectFileNameLabel); - - objectFileNameEdit = new QLineEdit(buildTab); - objectFileNameEdit->setObjectName(QString::fromUtf8("objectFileNameEdit")); - - formLayout->setWidget(6, QFormLayout::FieldRole, objectFileNameEdit); - - gdbPathLabel = new QLabel(buildTab); - gdbPathLabel->setObjectName(QString::fromUtf8("gdbPathLabel")); - - formLayout->setWidget(7, QFormLayout::LabelRole, gdbPathLabel); - - gdbPathEdit = new QLineEdit(buildTab); - gdbPathEdit->setObjectName(QString::fromUtf8("gdbPathEdit")); - - formLayout->setWidget(7, QFormLayout::FieldRole, gdbPathEdit); - - assemblerWorkingDirectoryLabel = new QLabel(buildTab); - assemblerWorkingDirectoryLabel->setObjectName(QString::fromUtf8("assemblerWorkingDirectoryLabel")); - - formLayout->setWidget(11, QFormLayout::LabelRole, assemblerWorkingDirectoryLabel); - - runInCurrentDirectoryCheckbox = new QCheckBox(buildTab); - runInCurrentDirectoryCheckbox->setObjectName(QString::fromUtf8("runInCurrentDirectoryCheckbox")); - runInCurrentDirectoryCheckbox->setEnabled(true); - - formLayout->setWidget(11, QFormLayout::FieldRole, runInCurrentDirectoryCheckbox); - - disableLinkingLabel = new QLabel(buildTab); - disableLinkingLabel->setObjectName(QString::fromUtf8("disableLinkingLabel")); - - formLayout->setWidget(12, QFormLayout::LabelRole, disableLinkingLabel); - - disableLinkingCheckbox = new QCheckBox(buildTab); - disableLinkingCheckbox->setObjectName(QString::fromUtf8("disableLinkingCheckbox")); - disableLinkingCheckbox->setEnabled(true); - - formLayout->setWidget(12, QFormLayout::FieldRole, disableLinkingCheckbox); - - gdbVerboseLabel = new QLabel(buildTab); - gdbVerboseLabel->setObjectName(QString::fromUtf8("gdbVerboseLabel")); - - formLayout->setWidget(10, QFormLayout::LabelRole, gdbVerboseLabel); - - sasmVerboseCheckBox = new QCheckBox(buildTab); - sasmVerboseCheckBox->setObjectName(QString::fromUtf8("sasmVerboseCheckBox")); - - formLayout->setWidget(10, QFormLayout::FieldRole, sasmVerboseCheckBox); - - MiModusLabel = new QLabel(buildTab); - MiModusLabel->setObjectName(QString::fromUtf8("MiModusLabel")); - - formLayout->setWidget(13, QFormLayout::LabelRole, MiModusLabel); - - MiModusCheckBox = new QCheckBox(buildTab); - MiModusCheckBox->setObjectName(QString::fromUtf8("MiModusCheckBox")); - - formLayout->setWidget(13, QFormLayout::FieldRole, MiModusCheckBox); - - - verticalLayout_6->addLayout(formLayout); - - infoLabel = new QLabel(buildTab); - infoLabel->setObjectName(QString::fromUtf8("infoLabel")); - infoLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); - - verticalLayout_6->addWidget(infoLabel); - - tabWidget->addTab(buildTab, QString()); - - verticalLayout->addWidget(tabWidget); - - buttonBox = new QDialogButtonBox(SettingsWindow); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); - buttonBox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok); - - verticalLayout->addWidget(buttonBox); - - QWidget::setTabOrder(startWindow, fontSizeSpinBox); - QWidget::setTabOrder(fontSizeSpinBox, fontComboBox); - QWidget::setTabOrder(fontComboBox, resetAllButton); - QWidget::setTabOrder(resetAllButton, language); - - retranslateUi(SettingsWindow); - - tabWidget->setCurrentIndex(2); - quotationColorButton->setDefault(false); - systemColorButton->setDefault(false); - commentsColorButton_2->setDefault(false); - keywordsColorButton->setDefault(false); - keywordsColorButton_2->setDefault(false); - iomacroColorButton_2->setDefault(false); - labelsColorButton->setDefault(false); - quotationColorButton_2->setDefault(false); - memoryColorButton->setDefault(false); - systemColorButton_2->setDefault(false); - labelsColorButton_2->setDefault(false); - iomacroColorButton->setDefault(false); - registersColorButton_2->setDefault(false); - numbersColorButton->setDefault(false); - commentsColorButton->setDefault(false); - memoryColorButton_2->setDefault(false); - registersColorButton->setDefault(false); - numbersColorButton_2->setDefault(false); - fontColorButton->setDefault(false); - debugLineColorButton->setDefault(false); - currentLineColorButton->setDefault(false); - backgroundColorButton->setDefault(false); - lineNumberPanelColorButton->setDefault(false); - lineNumberFontColorButton->setDefault(false); - - - QMetaObject::connectSlotsByName(SettingsWindow); - } // setupUi - - void retranslateUi(QWidget *SettingsWindow) - { - SettingsWindow->setWindowTitle(QApplication::translate("SettingsWindow", "Settings", nullptr)); - settingsLabel->setText(QApplication::translate("SettingsWindow", "SASM Options", nullptr)); - commonSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); - startWindowLabel->setText(QApplication::translate("SettingsWindow", "On start:", nullptr)); - startWindow->setItemText(0, QApplication::translate("SettingsWindow", "Open get started window", nullptr)); - startWindow->setItemText(1, QApplication::translate("SettingsWindow", "Restore previous session", nullptr)); - - languageLabel->setText(QApplication::translate("SettingsWindow", "Language:", nullptr)); - language->setItemText(6, QApplication::translate("SettingsWindow", "Polski", nullptr)); - language->setItemText(7, QApplication::translate("SettingsWindow", "\327\242\327\221\327\250\327\231\327\252", nullptr)); - language->setItemText(8, QApplication::translate("SettingsWindow", "Espa\303\261ol", nullptr)); - - label_4->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - registersLabel_2->setText(QApplication::translate("SettingsWindow", "Show all registers in debug:", nullptr)); - registersYesRadioButton->setText(QApplication::translate("SettingsWindow", "Yes", nullptr)); - registersNoRadioButton->setText(QApplication::translate("SettingsWindow", "No, show only general purpose", nullptr)); - insertDebugStringLabel->setText(QApplication::translate("SettingsWindow", "Insert debug string:", nullptr)); - insertDebugStringCheckBox->setText(QString()); - codeSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Code editor", nullptr)); - fontLabel->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); - fontSizeLabel->setText(QApplication::translate("SettingsWindow", "Size:", nullptr)); - label->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - label_2->setText(QApplication::translate("SettingsWindow", "Default code editor text:", nullptr)); - resetAllButton->setText(QApplication::translate("SettingsWindow", "Reset all (need a restart)...", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(commonTab), QApplication::translate("SettingsWindow", "Common", nullptr)); - groupBox->setTitle(QApplication::translate("SettingsWindow", "Syntax highlighting", nullptr)); - iomacroBoldCheckBox->setText(QString()); - systemLabel->setText(QApplication::translate("SettingsWindow", "System:", nullptr)); - quotationColorButton->setText(QString()); - systemColorButton->setText(QString()); - numbersItalicCheckBox->setText(QString()); - label_6->setText(QApplication::translate("SettingsWindow", "Bold:", nullptr)); - numbersBoldCheckBox->setText(QString()); - label_7->setText(QApplication::translate("SettingsWindow", "Italic:", nullptr)); - label_3->setText(QApplication::translate("SettingsWindow", "Foreground:", nullptr)); - systemItalicCheckBox->setText(QString()); - commentsColorButton_2->setText(QString()); - keywordsColorButton->setText(QString()); - commentsBoldCheckBox->setText(QString()); - keywordsColorButton_2->setText(QString()); - iomacroColorButton_2->setText(QString()); - memoryItalicCheckBox->setText(QString()); - keywordsLabel->setText(QApplication::translate("SettingsWindow", "Keywords:", nullptr)); - label_5->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); - labelsColorButton->setText(QString()); - numbersLabel->setText(QApplication::translate("SettingsWindow", "Numbers:", nullptr)); - quotationColorButton_2->setText(QString()); - labelsLabel->setText(QApplication::translate("SettingsWindow", "Labels:", nullptr)); - commentsLabel->setText(QApplication::translate("SettingsWindow", "Comments:", nullptr)); - memoryColorButton->setText(QString()); - systemColorButton_2->setText(QString()); - iomacroLabel_2->setText(QApplication::translate("SettingsWindow", "Quotation:", nullptr)); - labelsColorButton_2->setText(QString()); - registersBoldCheckBox->setText(QString()); - quotationBoldCheckBox->setText(QString()); - iomacroColorButton->setText(QString()); - iomacroItalicCheckBox->setText(QString()); - registersColorButton_2->setText(QString()); - keywordsBoldCheckBox->setText(QString()); - memoryBoldCheckBox->setText(QString()); - numbersColorButton->setText(QString()); - quotationItalicCheckBox->setText(QString()); - commentsColorButton->setText(QString()); - labelsItalicCheckBox->setText(QString()); - memoryLabel->setText(QApplication::translate("SettingsWindow", "Memory:", nullptr)); - iomacroLabel->setText(QApplication::translate("SettingsWindow", "I/O macro:", nullptr)); - keywordsItalicCheckBox->setText(QString()); - registersLabel->setText(QApplication::translate("SettingsWindow", "Registers:", nullptr)); - commentsItalicCheckBox->setText(QString()); - labelsBoldCheckBox->setText(QString()); - registersItalicCheckBox->setText(QString()); - systemBoldCheckBox->setText(QString()); - memoryColorButton_2->setText(QString()); - registersColorButton->setText(QString()); - numbersColorButton_2->setText(QString()); - groupBox_2->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); - fontLabel_2->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); - fontColorButton->setText(QString()); - currentLineCheckBox->setText(QApplication::translate("SettingsWindow", "Enable highlighting", nullptr)); - debugLineColorButton->setText(QString()); - currentLineLabel->setText(QApplication::translate("SettingsWindow", "Current line:", nullptr)); - debugLineLabel->setText(QApplication::translate("SettingsWindow", "Debugging line:", nullptr)); - currentLineColorButton->setText(QString()); - backgroundLabel->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); - backgroundColorButton->setText(QString()); - lineNumberPanelLabel->setText(QApplication::translate("SettingsWindow", "Line number panel:", nullptr)); - lineNumberPanelColorButton->setText(QString()); - lineNumberFontLabel->setText(QApplication::translate("SettingsWindow", "Line number font:", nullptr)); - lineNumberFontColorButton->setText(QString()); - label_8->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(colorsTab), QApplication::translate("SettingsWindow", "Colors", nullptr)); - modeLabel->setText(QApplication::translate("SettingsWindow", "Mode:", nullptr)); - x86RadioButton->setText(QApplication::translate("SettingsWindow", "x86", nullptr)); - x64RadioButton->setText(QApplication::translate("SettingsWindow", "x64", nullptr)); - assemblerLabel->setText(QApplication::translate("SettingsWindow", "Assembler:", nullptr)); - nasmRadioButton->setText(QApplication::translate("SettingsWindow", "NASM", nullptr)); - gasRadioButton->setText(QApplication::translate("SettingsWindow", "GAS", nullptr)); - fasmRadioButton->setText(QApplication::translate("SettingsWindow", "FASM", nullptr)); - masmRadioButton->setText(QApplication::translate("SettingsWindow", "MASM", nullptr)); - assemblyLabel->setText(QApplication::translate("SettingsWindow", "Assembly options:", nullptr)); - linkingLabel->setText(QApplication::translate("SettingsWindow", "Linking options:", nullptr)); - assemblerPathLabel->setText(QApplication::translate("SettingsWindow", "Assembler path:", nullptr)); - linkerPathLabel->setText(QApplication::translate("SettingsWindow", "Linker path:", nullptr)); - objectFileNameLabel->setText(QApplication::translate("SettingsWindow", "Object file name:", nullptr)); - gdbPathLabel->setText(QApplication::translate("SettingsWindow", "GDB path (Unix only):", nullptr)); - assemblerWorkingDirectoryLabel->setText(QApplication::translate("SettingsWindow", "Build in current directory:", nullptr)); - runInCurrentDirectoryCheckbox->setText(QString()); - disableLinkingLabel->setText(QApplication::translate("SettingsWindow", "Disable linking:", nullptr)); - disableLinkingCheckbox->setText(QString()); - gdbVerboseLabel->setText(QApplication::translate("SettingsWindow", "SASM verbose mode:", nullptr)); - sasmVerboseCheckBox->setText(QString()); - MiModusLabel->setText(QApplication::translate("SettingsWindow", "MI-Mode:", nullptr)); - MiModusCheckBox->setText(QString()); - infoLabel->setText(QString()); - tabWidget->setTabText(tabWidget->indexOf(buildTab), QApplication::translate("SettingsWindow", "Build", nullptr)); - } // retranslateUi - -}; - -namespace Ui { - class SettingsWindow: public Ui_SettingsWindow {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_SETTINGS_H From ffd9bc2713ef2f368073afda2bab82cb35f119d4 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Thu, 4 Feb 2021 23:00:20 +0100 Subject: [PATCH 10/86] fixed deadlock for normal mode --- debugger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 4ca12c2a..6053fd27 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -261,7 +261,7 @@ void Debugger::processMessage(QString output, QString error) //determine run of program //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () - if (c == 2 && output.indexOf(QString(" in ")) != -1) { + if (c == 2 && (output.indexOf(QString(" in ")) != -1 || output.indexOf(QString(" at \\")) != -1)) { //set accordance between program in memory and program in file //in example we need 0x00401390 @@ -296,7 +296,7 @@ void Debugger::processMessage(QString output, QString error) //determine run of program //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () - if (c == 2 && output.indexOf(QString(" in ")) != -1) { + if (c == 2 && (output.indexOf(QString(" in ")) != -1 || output.indexOf(QString(" at \\")) != -1)) { c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); @@ -661,7 +661,7 @@ void Debugger::processMessageMiMode(QString output, QString error) //determine run of program //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () - if (c == 2 && output.indexOf(QString(" in ")) != -1) { + if (c == 2 && output.indexOf(QString("*stopped,reason=\"breakpoint-hit")) != -1) { c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); From 0059b02f190dccd2aeddcba6ea5610ad8535fccd Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 5 Feb 2021 10:37:29 +0100 Subject: [PATCH 11/86] fixed Bug for Normalmode --- debugger.cpp | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 6053fd27..e4e0cadf 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -258,10 +258,19 @@ void Debugger::processMessage(QString output, QString error) gdb_cmd_run(); //perform Debugger::run(), that run program and open I/O files return; } + + if (c == 2 && output.indexOf(QString("Breakpoint 1 at ")) != -1){ + QRegExp r = QRegExp("0x[0-9a-fA-F]{5,16}"); + int index = r.indexIn(output); + //take offset in hexadecimal representation (10 symbols) from string and convert it to int + offset = output.mid(index, r.matchedLength()).toULongLong(0, 16); + c++; + return; + } //determine run of program //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () - if (c == 2 && (output.indexOf(QString(" in ")) != -1 || output.indexOf(QString(" at \\")) != -1)) { + if (c == 3 && output.indexOf(QString(" in ")) != -1) { //set accordance between program in memory and program in file //in example we need 0x00401390 @@ -276,9 +285,16 @@ void Debugger::processMessage(QString output, QString error) actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); } + + if (c == 3 && output.indexOf(QString(" at /")) != -1) { + processLst(); //count accordance + c++; + actionTypeQueue.enqueue(ni); + doInput("info inferiors\n", none); + } //if an error with the wrong name of the section has occurred - if ((c == 2 && output.indexOf(QString("Make breakpoint pending on future shared library load")) != -1) + if ((c == 3 && output.indexOf(QString("Make breakpoint pending on future shared library load")) != -1) || (c == 1 && output == " ")) { actionTypeQueue.enqueue(anyAction); processAction(tr("An error has occurred in the debugger. Please check the names of the sections.")); @@ -294,9 +310,23 @@ void Debugger::processMessage(QString output, QString error) return; } + if (c == 2 && output.indexOf(QString("Breakpoint 1 at ")) != -1){ + QRegExp r = QRegExp("0x[0-9a-fA-F]{5,16}"); + int index = r.indexIn(output); + //take offset in hexadecimal representation (10 symbols) from string and convert it to int + offset = output.mid(index, r.matchedLength()).toULongLong(0, 16); + c++; + return; + } + //determine run of program //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () - if (c == 2 && (output.indexOf(QString(" in ")) != -1 || output.indexOf(QString(" at \\")) != -1)) { + if (c == 3 && output.indexOf(QString(" in ")) != -1) { + c++; + actionTypeQueue.enqueue(ni); + doInput("info inferiors\n", none); + } + if (c == 3 && output.indexOf(QString(" at /")) != -1) { c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); @@ -330,7 +360,7 @@ void Debugger::processMessage(QString output, QString error) } //process all actions after start - if (c == 3) + if (c == 4) if (output.indexOf(QString("$1 =")) == -1) //input file processAction(output, error); } From 526d9f36d59d4f4c5644dc956a5fbb828a65607e Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 5 Feb 2021 11:57:32 +0100 Subject: [PATCH 12/86] removed \n for registerInfo and removed last changes for normalmode --- debugger.cpp | 45 ++++++++------------------------------------- 1 file changed, 8 insertions(+), 37 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index e4e0cadf..98930ad1 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -221,7 +221,7 @@ void Debugger::processMessage(QString output, QString error) done. (gdb)*/ -#if 0 + #if 0 // not required anymore, since GDB can be specified if (output.indexOf(QString(") 8.1.")) != -1) { actionTypeQueue.enqueue(anyAction); @@ -230,7 +230,7 @@ void Debugger::processMessage(QString output, QString error) emit finished(); return; } -#endif + #endif c++; doInput(QString("disas main\n"), none); @@ -258,19 +258,10 @@ void Debugger::processMessage(QString output, QString error) gdb_cmd_run(); //perform Debugger::run(), that run program and open I/O files return; } - - if (c == 2 && output.indexOf(QString("Breakpoint 1 at ")) != -1){ - QRegExp r = QRegExp("0x[0-9a-fA-F]{5,16}"); - int index = r.indexIn(output); - //take offset in hexadecimal representation (10 symbols) from string and convert it to int - offset = output.mid(index, r.matchedLength()).toULongLong(0, 16); - c++; - return; - } //determine run of program //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () - if (c == 3 && output.indexOf(QString(" in ")) != -1) { + if (c == 2 && output.indexOf(QString(" in ")) != -1) { //set accordance between program in memory and program in file //in example we need 0x00401390 @@ -285,16 +276,9 @@ void Debugger::processMessage(QString output, QString error) actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); } - - if (c == 3 && output.indexOf(QString(" at /")) != -1) { - processLst(); //count accordance - c++; - actionTypeQueue.enqueue(ni); - doInput("info inferiors\n", none); - } //if an error with the wrong name of the section has occurred - if ((c == 3 && output.indexOf(QString("Make breakpoint pending on future shared library load")) != -1) + if ((c == 2 && output.indexOf(QString("Make breakpoint pending on future shared library load")) != -1) || (c == 1 && output == " ")) { actionTypeQueue.enqueue(anyAction); processAction(tr("An error has occurred in the debugger. Please check the names of the sections.")); @@ -310,23 +294,9 @@ void Debugger::processMessage(QString output, QString error) return; } - if (c == 2 && output.indexOf(QString("Breakpoint 1 at ")) != -1){ - QRegExp r = QRegExp("0x[0-9a-fA-F]{5,16}"); - int index = r.indexIn(output); - //take offset in hexadecimal representation (10 symbols) from string and convert it to int - offset = output.mid(index, r.matchedLength()).toULongLong(0, 16); - c++; - return; - } - //determine run of program //wait for message like this: Breakpoint 1, 0x00401390 in sasmStartL () - if (c == 3 && output.indexOf(QString(" in ")) != -1) { - c++; - actionTypeQueue.enqueue(ni); - doInput("info inferiors\n", none); - } - if (c == 3 && output.indexOf(QString(" at /")) != -1) { + if (c == 2 && output.indexOf(QString(" in ")) != -1) { c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); @@ -360,7 +330,7 @@ void Debugger::processMessage(QString output, QString error) } //process all actions after start - if (c == 4) + if (c == 3) if (output.indexOf(QString("$1 =")) == -1) //input file processAction(output, error); } @@ -604,6 +574,7 @@ void Debugger::processAction(QString output, QString error) emit printLog(output); } + void Debugger::processMessageMiMode(QString output, QString error) { if (error.indexOf("PC register is not available") != -1) { @@ -896,7 +867,7 @@ void Debugger::processActionMiMode(QString output, QString error) QStringList tmp; for (QString s : output.split(QChar('\n'), QString::SkipEmptyParts)){ if (s.at(0) == QChar('~')) - tmp.append(s.remove(QRegExp("\"|~|\n"))); + tmp.append(s.mid(2, s.size()-5)); } QString filteredoutput = tmp.join(QString("\n")); QTextStream registersStream(&filteredoutput); From 26e100b9ff04c876555135d82f2bfd5a85cec35a Mon Sep 17 00:00:00 2001 From: ge69dal Date: Thu, 11 Feb 2021 12:45:51 +0100 Subject: [PATCH 13/86] fixed Compilingbug for Windows --- debugger.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 98930ad1..97eb63a4 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -56,7 +56,6 @@ namespace { Debugger::Debugger(QTextEdit *tEdit, const QString &i_path, const QString &tmp, Assembler *i_assembler, const QString &i_gdbpath, QWidget *parent, bool i_verbose, bool i_mimode) : QObject(parent) { - QSettings settings("SASM Project", "SASM"); c = 0; pid = 0; firstAction = true; @@ -75,6 +74,7 @@ bool Debugger::run() #ifdef Q_OS_WIN32 QString gdb; QString objdump; + QSettings settings("SASM Project", "SASM"); if (settings.value("mode", QString("x86")).toString() == "x86") { gdb = QCoreApplication::applicationDirPath() + "/MinGW/bin/gdb.exe"; objdump = QCoreApplication::applicationDirPath() + "/MinGW/bin/objdump.exe"; @@ -718,6 +718,9 @@ void Debugger::processActionMiMode(QString output, QString error) QString msg = output.left(output.lastIndexOf(QChar('~'))); //program output msg.remove(0,2); //rm first view whitespace + QRegExp threadMsg("=thread"); + while (threadMsg.indexIn(msg) != -1) + msg.remove(threadMsg.indexIn(msg), msg.indexOf(QChar('\n'), threadMsg.indexIn(msg)) + 7); emit printOutput(msg); //exit from debugging @@ -771,11 +774,12 @@ void Debugger::processActionMiMode(QString output, QString error) if (index > 1) { QString msg = output.left(output.indexOf(QChar('~'))); //left part - probably output of program; QRegExp breakpointMsg("=breakpoint"); - QRegExp threadMsg("\\[Switching to Thread [^\\]]*\\]\r?\n");//todo + QRegExp threadMsg("=thread"); QRegExp signalMsg("\r?\n(Program received signal.*)");//todo if (breakpointMsg.indexIn(msg) != -1) msg.remove(breakpointMsg.indexIn(msg), msg.indexOf(QChar('\n'), breakpointMsg.indexIn(msg)) + 5); - msg.remove(threadMsg); + if (threadMsg.indexIn(msg) != -1) + msg.remove(threadMsg.indexIn(msg), msg.indexOf(QChar('\n'), threadMsg.indexIn(msg)) + 7); if (signalMsg.indexIn(msg) != -1) { QString recievedSignal = signalMsg.cap(1); if (QRegExp("SIG(TRAP|INT)").indexIn(recievedSignal) == -1) { From 2c4188b949c0725a5557645247358f65e70db6ac Mon Sep 17 00:00:00 2001 From: ge69dal Date: Thu, 11 Feb 2021 17:24:46 +0100 Subject: [PATCH 14/86] removed warnings --- codeeditor.cpp | 2 +- debugger.cpp | 9 ++++----- finddialog.cpp | 4 ++-- mainwindow.cpp | 6 +++--- mainwindow.h | 3 ++- watchsettingswidget.cpp | 4 ++-- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/codeeditor.cpp b/codeeditor.cpp index db546c5c..fd849c85 100644 --- a/codeeditor.cpp +++ b/codeeditor.cpp @@ -77,7 +77,7 @@ int CodeEditor::lineNumberAreaWidth() ++digits; } - int space = fontMetrics().width(QLatin1Char('9')) * digits + debugAreaWidth; + int space = fontMetrics().horizontalAdvance(QLatin1Char('9')) * digits + debugAreaWidth; return space; } diff --git a/debugger.cpp b/debugger.cpp index 97eb63a4..05ce03b7 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -705,7 +705,6 @@ void Debugger::processActionMiMode(QString output, QString error) { bool backtrace = (output.indexOf(QRegExp("#\\d+ 0x[0-9a-fA-F]{8,16} in .* ()")) != -1); - if (output.indexOf(exitMessage) != -1 && !backtrace) { doInput("c\n", none); return; @@ -720,7 +719,7 @@ void Debugger::processActionMiMode(QString output, QString error) msg.remove(0,2); //rm first view whitespace QRegExp threadMsg("=thread"); while (threadMsg.indexIn(msg) != -1) - msg.remove(threadMsg.indexIn(msg), msg.indexOf(QChar('\n'), threadMsg.indexIn(msg)) + 7); + msg.remove(threadMsg.indexIn(msg), msg.indexOf(QChar('\n'), threadMsg.indexIn(msg) + 7)); emit printOutput(msg); //exit from debugging @@ -778,8 +777,8 @@ void Debugger::processActionMiMode(QString output, QString error) QRegExp signalMsg("\r?\n(Program received signal.*)");//todo if (breakpointMsg.indexIn(msg) != -1) msg.remove(breakpointMsg.indexIn(msg), msg.indexOf(QChar('\n'), breakpointMsg.indexIn(msg)) + 5); - if (threadMsg.indexIn(msg) != -1) - msg.remove(threadMsg.indexIn(msg), msg.indexOf(QChar('\n'), threadMsg.indexIn(msg)) + 7); + while (threadMsg.indexIn(msg) != -1) + msg.remove(threadMsg.indexIn(msg), msg.indexOf(QChar('\n'), threadMsg.indexIn(msg) + 7)); if (signalMsg.indexIn(msg) != -1) { QString recievedSignal = signalMsg.cap(1); if (QRegExp("SIG(TRAP|INT)").indexIn(recievedSignal) == -1) { @@ -869,7 +868,7 @@ void Debugger::processActionMiMode(QString output, QString error) output.remove(QString("&\"info registers\\n\"")); output.remove(QString("^done")); QStringList tmp; - for (QString s : output.split(QChar('\n'), QString::SkipEmptyParts)){ + for (QString s : output.split(QChar('\n'), Qt::SkipEmptyParts)){ if (s.at(0) == QChar('~')) tmp.append(s.mid(2, s.size()-5)); } diff --git a/finddialog.cpp b/finddialog.cpp index 96d8d162..e8bc2261 100644 --- a/finddialog.cpp +++ b/finddialog.cpp @@ -98,8 +98,8 @@ FindDialog::FindDialog(QWidget *parent) searchLayout = new QHBoxLayout; searchLayout->addWidget(searchLabel); searchSpacer = new QSpacerItem( - replaceLabel->fontMetrics().width(tr("Replace with:")) - - searchLabel->fontMetrics().width(tr("Find what:")), + replaceLabel->fontMetrics().horizontalAdvance(tr("Replace with:")) - + searchLabel->fontMetrics().horizontalAdvance(tr("Find what:")), 0, QSizePolicy::Fixed, QSizePolicy::Fixed); searchLayout->addSpacerItem(searchSpacer); searchLayout->addWidget(searchEdit); diff --git a/mainwindow.cpp b/mainwindow.cpp index ff5e24ca..93d02b28 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1571,7 +1571,7 @@ void MainWindow::findNext(const QString &pattern, Qt::CaseSensitivity cs, bool a if (cs == Qt::CaseSensitive) newCursor = document->find(pattern, newCursor, QTextDocument::FindCaseSensitively); else - newCursor = document->find(pattern, newCursor, 0); + newCursor = document->find(pattern, newCursor); //! Replace mode if (replace && i == tabs->currentIndex()) { newCursor.removeSelectedText(); @@ -1603,13 +1603,13 @@ void MainWindow::findNext(const QString &pattern, Qt::CaseSensitivity cs, bool a if (cs == Qt::CaseSensitive) newCursor = document->find(pattern, newCursor, QTextDocument::FindCaseSensitively); else - newCursor = document->find(pattern, newCursor, 0); + newCursor = document->find(pattern, newCursor); //! Continue from start if (newCursor.isNull()) { if (cs == Qt::CaseSensitive) newCursor = document->find(pattern, newCursor, QTextDocument::FindCaseSensitively); else - newCursor = document->find(pattern, newCursor, 0); + newCursor = document->find(pattern, newCursor); } if (!newCursor.isNull()) { selection.cursor = newCursor; diff --git a/mainwindow.h b/mainwindow.h index 46a37ccb..80cf9ff9 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -165,7 +166,7 @@ class MainWindow : public QMainWindow QProcess *runProcess; CodeEditor *prevCodeEditor; QTimer *timer; - QTime programExecutionTime; + QElapsedTimer programExecutionTime; Debugger *debugger; bool programIsBuilded; QPointer registersWindow; diff --git a/watchsettingswidget.cpp b/watchsettingswidget.cpp index 8f9c4a69..8556a941 100644 --- a/watchsettingswidget.cpp +++ b/watchsettingswidget.cpp @@ -93,14 +93,14 @@ WatchSettingsWidget::WatchSettingsWidget(QWidget *parent) : int WatchSettingsWidget::sumSize() { return typeComboBox->sizeHint().width() + sizeComboBox->sizeHint().width() - + arraySizeEdit->fontMetrics().width(arraySizeEdit->placeholderText()) + + arraySizeEdit->fontMetrics().horizontalAdvance(arraySizeEdit->placeholderText()) + addressCheckbox->sizeHint().width() + 50; } QSize WatchSettingsWidget::sizeHint() const { return QSize(typeComboBox->sizeHint().width() + sizeComboBox->sizeHint().width() - + arraySizeEdit->fontMetrics().width(arraySizeEdit->placeholderText()) + + arraySizeEdit->fontMetrics().horizontalAdvance(arraySizeEdit->placeholderText()) + addressCheckbox->sizeHint().width() + 50, 0); } From 1407e25deed2e0e32514b93f580ed1eeb42e2ea7 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Thu, 11 Feb 2021 17:45:18 +0100 Subject: [PATCH 15/86] extended ReadMe --- README.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.txt b/README.txt index 3ac13353..7b3996ee 100644 --- a/README.txt +++ b/README.txt @@ -36,7 +36,8 @@ Further print commands: 1) "qmake" (For installing in specific directory on Linux - print: "qmake PREFIX=". By default SASM installs in "/usr/bin" and "usr/share") 2) "make" for Linux and "mingw32-make" for Windows. 3) For Linux: "make install" (command "sasm" will open SASM) or run "sasm" from folder right away or put "sasm" executable file to folder "Linux" (from this folder you can run the program). - For Windows: Put "sasm.exe" executable file to folder "Windows". From this folder you can run the program. Also you can run program right away from compilation folder. + For Windows: Put "sasm.exe" executable file to folder "Windows". From this folder you can run the program. Also you can run program right away from SASM folder. + If the program does not start after successful compilation and the error message (0xc000007b) appears, check that the path to GNU Compiler is set correctly in the environment variables. =========================================================================== Also you can download already compiled packages From 5af9700aed9a3bad0da084e06d8a1e0ad49009cb Mon Sep 17 00:00:00 2001 From: Martin SCHREIBER Date: Thu, 11 Feb 2021 18:33:21 +0100 Subject: [PATCH 16/86] updated README to markup --- README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..da0d21ff --- /dev/null +++ b/README.md @@ -0,0 +1,75 @@ +SASM (SimpleASM) - простая кроссплатформенная среда разработки для языков ассемблера NASM, MASM, GAS, FASM с подсветкой синтаксиса и отладчиком. В SASM Вы можете легко разрабатывать и выполнять программы, написанные на языках ассемблера NASM, MASM, GAS, FASM. Вводите код в форму и запускайте приложение. Программа работает "из коробки" и хорошо подойдет для начинающих изучать язык ассемблера. +Основана на Qt. Распространяется по свободной лицензии GNU GPL v3.0. + +SASM (SimpleASM) - simple Open Source crossplatform IDE for NASM, MASM, GAS, FASM assembly languages. +SASM has syntax highlighting and debugger. The program works out of the box and is great for beginners to learn assembly language. SASM is translated into Russian, English, Turkish (thanks Ali Goren), Chinese (thanks Ahmed Zetao Yang), German (thanks Sebastian Fischer), Italian (thanks Carlo Dapor), Polish (thanks Krzysztof Rossa), Hebrew (thanks Elian Kamal), Spanish (thanks Mariano Cordoba). +Licensed under the GNU GPL v3.0. Based on the Qt. + + + +# How to build and run SASM: + +You need: + +* On Windows: + + * For building: + * C++ compiler (e.g. gcc from MinGW) + * make (e.g. mingw32-make from MinGW) + * Qt 5 + + * For running: + * Everything needed is included. + + + +* On Linux + * For building: + * gcc (x86) or gcc-multilib (x64) + * gdb + * nasm + + * For QT4, install + * qt4-qmake + * libqt4-dev + * libqt4-core + * libqt4-gui + * libxcb1 + * libxcb-render0 + * libxcb-icccm4 + + * For QT5 building: + * build-essential + * qtbase5-dev + * qt5-default + + * For running: + * gcc-multilib (x64 OS) or gcc (x86 OS) + * gdb + * nasm + + +* Instructions: + * Download sources and unpack them. + * Go to directory with their: "cd " + * 1) "qmake" (For installing in specific directory on Linux - print: "qmake PREFIX=". By default SASM installs in "/usr/bin" and "usr/share") + * 2) "make" for Linux and "mingw32-make" for Windows. + + * For Linux: + * "make install" (command "sasm" will open SASM) or run "sasm" from folder right away or put "sasm" executable file to folder "Linux" (from this folder you can run the program). + * For Windows: + * Put "sasm.exe" executable file to folder "Windows". From this folder you can run the program. + * Also you can run program right away from SASM folder. + * If the program does not start after successful compilation and the error message (0xc000007b) appears, check that the path to GNU Compiler is set correctly in the environment variables. + + +# Prebuild packages + +Also you can download already compiled packages +from site https://dman95.github.io/SASM/ or +from OBS repository https://download.opensuse.org/repositories/home:/Dman95/ + +More help info in file help.html +Also SASM supports doxygen: run "doxygen configfile" to generate documentation. In this documentation you can also find a small developer guide which includes information about adding new assemblers and languages support. + +Copyright © 2013 Dmitriy Manushin From 60ffbf3dfe578cbd4bd73d263d1b2f1c7f50eeac Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sun, 14 Feb 2021 14:02:40 +0100 Subject: [PATCH 17/86] registerInfo fixed --- debugger.cpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 97eb63a4..4a528f74 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -697,7 +697,7 @@ void Debugger::processMessageMiMode(QString output, QString error) //process all actions after start if (c == 3) //if (output.indexOf(QString("$1 =")) == -1 && output.indexOf(QString("&\"si")) == -1 && output.indexOf(QString("&\"ni")) == -1 &&) //input file - if (output.indexOf(QRegExp("$1 =|&\"si|&\"ni|&\"c")) == -1 || output.indexOf(QString("&\"clear")) != -1) + if (output.indexOf(QRegExp("$1 =|&\"si|&\"ni|&\"c|&\"p")) == -1 || output.indexOf(QString("&\"clear")) != -1) processActionMiMode(output, error); } @@ -866,15 +866,7 @@ void Debugger::processActionMiMode(QString output, QString error) } if (actionType == infoRegisters) { - output.remove(QString("&\"info registers\\n\"")); - output.remove(QString("^done")); - QStringList tmp; - for (QString s : output.split(QChar('\n'), QString::SkipEmptyParts)){ - if (s.at(0) == QChar('~')) - tmp.append(s.mid(2, s.size()-5)); - } - QString filteredoutput = tmp.join(QString("\n")); - QTextStream registersStream(&filteredoutput); + QTextStream registersStream(&output); QList registers; registersInfo info; QSettings settings("SASM Project", "SASM"); @@ -891,6 +883,7 @@ void Debugger::processActionMiMode(QString output, QString error) QRegExp xmm("xmm\\d+"); QRegExp ymm("ymm\\d+"); QRegExp fpu_stack("st\\d+"); + bool first = true; if (settings.value("mode", QString("x86")).toString() == "x86") { //x86 @@ -912,11 +905,19 @@ void Debugger::processActionMiMode(QString output, QString error) break; } + if (info.name.at(0) != QChar('~')) { + continue; + } + first = false; + info.name.remove(QString("~\"")); + if (general.contains(info.name) || segment.contains(info.name) || fpu_info.contains(info.name) || info.name == ip || flags.contains(info.name) || fpu_stack.exactMatch(info.name)) { registersStream >> info.hexValue; + info.hexValue.remove(QRegExp("~|\"|\\\\n|\\\\t")); registersStream.skipWhiteSpace(); info.decValue = registersStream.readLine(); + info.decValue.remove(QRegExp("~|\"|\\\\n|\\\\t")); } else if (mmx.exactMatch(info.name) || xmm.exactMatch(info.name) || ymm.exactMatch(info.name)) { QMap fields; @@ -942,7 +943,7 @@ void Debugger::processActionMiMode(QString output, QString error) } registers.append(info); - if (i == 0 && info.name != "eax" && info.name != "rax" && registersOk) { + if (first && info.name != "eax" && info.name != "rax" && registersOk) { doInput(QString("info registers\n"), infoRegisters); registersOk = false; return; From cd14fa370297dd5e317d2028ff969f9973a3aa8a Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sun, 14 Feb 2021 14:13:39 +0100 Subject: [PATCH 18/86] registerInfo fixed --- debugger.cpp | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 9cca92e4..e727fe84 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -865,19 +865,7 @@ void Debugger::processActionMiMode(QString output, QString error) } if (actionType == infoRegisters) { -<<<<<<< HEAD QTextStream registersStream(&output); -======= - output.remove(QString("&\"info registers\\n\"")); - output.remove(QString("^done")); - QStringList tmp; - for (QString s : output.split(QChar('\n'), Qt::SkipEmptyParts)){ - if (s.at(0) == QChar('~')) - tmp.append(s.mid(2, s.size()-5)); - } - QString filteredoutput = tmp.join(QString("\n")); - QTextStream registersStream(&filteredoutput); ->>>>>>> 1407e25deed2e0e32514b93f580ed1eeb42e2ea7 QList registers; registersInfo info; QSettings settings("SASM Project", "SASM"); From d20ec4ce1aa2f0caf33bf1e880cb21daffa075ea Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sun, 14 Feb 2021 14:35:18 +0100 Subject: [PATCH 19/86] registerInfo fixed --- debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugger.cpp b/debugger.cpp index e727fe84..0d32cdfe 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -904,7 +904,7 @@ void Debugger::processActionMiMode(QString output, QString error) break; } - if (info.name.at(0) != QChar('~')) { + if (info.name.at(0) != QChar('~')||info.name != QString("~\"\\n\"")) { continue; } first = false; From 657b0711599c38d64eec1f19e1c817913798c9b2 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sun, 14 Feb 2021 14:58:48 +0100 Subject: [PATCH 20/86] fixed Registers --- debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugger.cpp b/debugger.cpp index 0d32cdfe..57df5b71 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -904,7 +904,7 @@ void Debugger::processActionMiMode(QString output, QString error) break; } - if (info.name.at(0) != QChar('~')||info.name != QString("~\"\\n\"")) { + if (info.name.at(0) != QChar('~')||info.name.indexOf(QString("~\"\\n\""))!=-1) { continue; } first = false; From e1ef22a32333ad9ec426dbedec0925201968e497 Mon Sep 17 00:00:00 2001 From: Martin SCHREIBER Date: Mon, 15 Feb 2021 15:16:30 +0100 Subject: [PATCH 21/86] u --- README.txt | 75 ------------------------------------------------------ 1 file changed, 75 deletions(-) delete mode 100644 README.txt diff --git a/README.txt b/README.txt deleted file mode 100644 index da0d21ff..00000000 --- a/README.txt +++ /dev/null @@ -1,75 +0,0 @@ -SASM (SimpleASM) - простая кроссплатформенная среда разработки для языков ассемблера NASM, MASM, GAS, FASM с подсветкой синтаксиса и отладчиком. В SASM Вы можете легко разрабатывать и выполнять программы, написанные на языках ассемблера NASM, MASM, GAS, FASM. Вводите код в форму и запускайте приложение. Программа работает "из коробки" и хорошо подойдет для начинающих изучать язык ассемблера. -Основана на Qt. Распространяется по свободной лицензии GNU GPL v3.0. - -SASM (SimpleASM) - simple Open Source crossplatform IDE for NASM, MASM, GAS, FASM assembly languages. -SASM has syntax highlighting and debugger. The program works out of the box and is great for beginners to learn assembly language. SASM is translated into Russian, English, Turkish (thanks Ali Goren), Chinese (thanks Ahmed Zetao Yang), German (thanks Sebastian Fischer), Italian (thanks Carlo Dapor), Polish (thanks Krzysztof Rossa), Hebrew (thanks Elian Kamal), Spanish (thanks Mariano Cordoba). -Licensed under the GNU GPL v3.0. Based on the Qt. - - - -# How to build and run SASM: - -You need: - -* On Windows: - - * For building: - * C++ compiler (e.g. gcc from MinGW) - * make (e.g. mingw32-make from MinGW) - * Qt 5 - - * For running: - * Everything needed is included. - - - -* On Linux - * For building: - * gcc (x86) or gcc-multilib (x64) - * gdb - * nasm - - * For QT4, install - * qt4-qmake - * libqt4-dev - * libqt4-core - * libqt4-gui - * libxcb1 - * libxcb-render0 - * libxcb-icccm4 - - * For QT5 building: - * build-essential - * qtbase5-dev - * qt5-default - - * For running: - * gcc-multilib (x64 OS) or gcc (x86 OS) - * gdb - * nasm - - -* Instructions: - * Download sources and unpack them. - * Go to directory with their: "cd " - * 1) "qmake" (For installing in specific directory on Linux - print: "qmake PREFIX=". By default SASM installs in "/usr/bin" and "usr/share") - * 2) "make" for Linux and "mingw32-make" for Windows. - - * For Linux: - * "make install" (command "sasm" will open SASM) or run "sasm" from folder right away or put "sasm" executable file to folder "Linux" (from this folder you can run the program). - * For Windows: - * Put "sasm.exe" executable file to folder "Windows". From this folder you can run the program. - * Also you can run program right away from SASM folder. - * If the program does not start after successful compilation and the error message (0xc000007b) appears, check that the path to GNU Compiler is set correctly in the environment variables. - - -# Prebuild packages - -Also you can download already compiled packages -from site https://dman95.github.io/SASM/ or -from OBS repository https://download.opensuse.org/repositories/home:/Dman95/ - -More help info in file help.html -Also SASM supports doxygen: run "doxygen configfile" to generate documentation. In this documentation you can also find a small developer guide which includes information about adding new assemblers and languages support. - -Copyright © 2013 Dmitriy Manushin From 4d98547d095f7bb997b3dc2c1bb061c34e91b80b Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 15 Feb 2021 18:05:06 +0100 Subject: [PATCH 22/86] fixed Linefeedbug under windows --- debugger.cpp | 9 ++++++--- debugger.h | 1 + 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 57df5b71..63eac0bf 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -67,6 +67,7 @@ Debugger::Debugger(QTextEdit *tEdit, const QString &i_path, const QString &tmp, assembler = i_assembler; verbose = i_verbose; mimode = i_mimode; + wincrflag = 0; } bool Debugger::run() @@ -75,6 +76,7 @@ bool Debugger::run() QString gdb; QString objdump; QSettings settings("SASM Project", "SASM"); + wincrflag++; if (settings.value("mode", QString("x86")).toString() == "x86") { gdb = QCoreApplication::applicationDirPath() + "/MinGW/bin/gdb.exe"; objdump = QCoreApplication::applicationDirPath() + "/MinGW/bin/objdump.exe"; @@ -769,9 +771,10 @@ void Debugger::processActionMiMode(QString output, QString error) //scan line number in memory QRegExp r = QRegExp("addr=\"0x[0-9a-fA-F]{8,16}"); int index = r.indexIn(output); + int msgIndex = output.indexOf(QChar('~')); //print output - if (index > 1) { - QString msg = output.left(output.indexOf(QChar('~'))); //left part - probably output of program; + if (msgIndex > 2+wincrflag) { + QString msg = output.left(msgIndex); //left part - probably output of program; QRegExp breakpointMsg("=breakpoint"); QRegExp threadMsg("=thread"); QRegExp signalMsg("\r?\n(Program received signal.*)");//todo @@ -786,7 +789,7 @@ void Debugger::processActionMiMode(QString output, QString error) } msg.remove(signalMsg); } - msg.remove(0,2); //rm first view whitespace + msg.remove(0,2+wincrflag); //rm first view whitespace emit printOutput(msg); } diff --git a/debugger.h b/debugger.h index 4b3f6ca6..5b3931dc 100644 --- a/debugger.h +++ b/debugger.h @@ -117,6 +117,7 @@ class Debugger : public QObject bool verbose; bool mimode; bool con; + int wincrflag; QProcess *process; QTextEdit *textEdit; From 3eca126eb9a0caad5726678f875add51a69c1706 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 16 Feb 2021 12:33:52 +0100 Subject: [PATCH 23/86] fix --- debugger.cpp | 8 +++++++- debugger.h | 1 + 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/debugger.cpp b/debugger.cpp index 63eac0bf..31d70ff3 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -68,6 +68,7 @@ Debugger::Debugger(QTextEdit *tEdit, const QString &i_path, const QString &tmp, verbose = i_verbose; mimode = i_mimode; wincrflag = 0; + firstPrint = true; } bool Debugger::run() @@ -697,9 +698,14 @@ void Debugger::processMessageMiMode(QString output, QString error) } } + if (output.indexOf(QString("&\"p"))!=-1 && firstPrint){ + firstPrint = false; + return; + } + //process all actions after start if (c == 3) //if (output.indexOf(QString("$1 =")) == -1 && output.indexOf(QString("&\"si")) == -1 && output.indexOf(QString("&\"ni")) == -1 &&) //input file - if (output.indexOf(QRegExp("$1 =|&\"si|&\"ni|&\"c|&\"p")) == -1 || output.indexOf(QString("&\"clear")) != -1) + if (output.indexOf(QRegExp("$1 =|&\"si|&\"ni|&\"c")) == -1 || output.indexOf(QString("&\"clear")) != -1) processActionMiMode(output, error); } diff --git a/debugger.h b/debugger.h index 5b3931dc..e52ab5d7 100644 --- a/debugger.h +++ b/debugger.h @@ -117,6 +117,7 @@ class Debugger : public QObject bool verbose; bool mimode; bool con; + bool firstPrint; int wincrflag; QProcess *process; From 466f24cd48f617d75120f433200599fd301774f1 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 16 Feb 2021 15:34:44 +0100 Subject: [PATCH 24/86] fixed memoryInfo for windows --- debugger.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debugger.cpp b/debugger.cpp index 31d70ff3..e047e964 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -852,6 +852,17 @@ void Debugger::processActionMiMode(QString output, QString error) if (index == -1) isValid = false; else { + QStringList tmpList; + bool firstElement = true; + for(QString t : output.split(QString("~\""), Qt::SkipEmptyParts)){ + if (firstElement){ + firstElement = false; + continue; + } + tmpList.append(t.left(t.indexOf(QChar('\"')))); + } + output = tmpList.join(QString("")); + printLog(output); output = output.right(output.length() - index); output = output.right(output.length() - output.indexOf(QChar('=')) - 1); output = output.left(output.indexOf(QString("\\n"))); From 6b4b9ee4e983ab9e9929e888cfb3ed454e82e196 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 23 Feb 2021 13:34:41 +0100 Subject: [PATCH 25/86] fixed run --- debugger.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/debugger.cpp b/debugger.cpp index 12b2de03..5fc0d134 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -75,6 +75,7 @@ Debugger::Debugger(QTextEdit *tEdit, verbose = i_verbose; mimode = i_mimode; wincrflag = 0; + run(); } bool Debugger::run() From 43c76a0b4bd3e35347579444f94ff747ff38e7a0 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 23 Feb 2021 15:40:08 +0100 Subject: [PATCH 26/86] addet AsyncMsg --- debugger.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 5fc0d134..c30e2876 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -788,13 +788,12 @@ void Debugger::processActionMiMode(QString output, QString error) //print output if (msgIndex > 2+wincrflag) { QString msg = output.left(msgIndex); //left part - probably output of program; - QRegExp breakpointMsg("=breakpoint"); - QRegExp threadMsg("=thread"); - QRegExp signalMsg("\r?\n(Program received signal.*)");//todo - if (breakpointMsg.indexIn(msg) != -1) - msg.remove(breakpointMsg.indexIn(msg), msg.indexOf(QChar('\n'), breakpointMsg.indexIn(msg)) + 5); - while (threadMsg.indexIn(msg) != -1) - msg.remove(threadMsg.indexIn(msg), msg.indexOf(QChar('\n'), threadMsg.indexIn(msg) + 7)); + QRegExp asyncMsg("=thread|\\*running|\\*stopped|=library-|=traceframe-|=tsv-|=breakpoint|=record|=cmd-|=memory"); + QRegExp signalMsg("\r?\n(Program received signal.*)"); + while (asyncMsg.indexIn(msg) != -1){ + msg.remove(asyncMsg.indexIn(msg), msg.indexOf(QChar('\n'), asyncMsg.indexIn(msg) + 7)); + printLog("yes"); + } if (signalMsg.indexIn(msg) != -1) { QString recievedSignal = signalMsg.cap(1); if (QRegExp("SIG(TRAP|INT)").indexIn(recievedSignal) == -1) { From 3e6aed5c4bd034ef27ce64fc99e46cc55a6e88e7 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 23 Feb 2021 18:37:58 +0100 Subject: [PATCH 27/86] fixed MemoryInfo in MiMode --- debugger.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index c30e2876..53719ab3 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -861,14 +861,14 @@ void Debugger::processActionMiMode(QString output, QString error) QStringList tmpList; bool firstElement = true; for(QString t : output.split(QString("~\""), QString::SkipEmptyParts)){ - if (firstElement){ - firstElement = false; - continue; - } - tmpList.append(t.left(t.indexOf(QChar('\"')))); - } + if (firstElement){ + firstElement = false; + continue; + } + tmpList.append(t.left(t.indexOf(QChar('\"')))); + } output = tmpList.join(QString("")); - printLog(output); + index = output.indexOf(QRegExp("\\$\\d+ = .*")); output = output.right(output.length() - index); output = output.right(output.length() - output.indexOf(QChar('=')) - 1); output = output.left(output.indexOf(QString("\\n"))); From f75b5b6b6a767c5868aa8537d46dfafc71f89e9c Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 23 Feb 2021 19:09:15 +0100 Subject: [PATCH 28/86] debugger.cpp --- debugger.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debugger.cpp b/debugger.cpp index 53719ab3..9cb91cb0 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -712,7 +712,7 @@ void Debugger::processMessageMiMode(QString output, QString error) //process all actions after start if (c == 3) //if (output.indexOf(QString("$1 =")) == -1 && output.indexOf(QString("&\"si")) == -1 && output.indexOf(QString("&\"ni")) == -1 &&) //input file - if (output.indexOf(QRegExp("$1 =|&\"si|&\"ni|&\"c")) == -1 || output.indexOf(QString("&\"clear")) != -1) + if (output.indexOf(QRegExp("\\$1 =|&\"si|&\"ni|&\"c")) == -1 || output.indexOf(QString("&\"clear")) != -1) processActionMiMode(output, error); } From 74bb5e4fd966fe42976dbd1745328b1e312cf4a7 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 23 Feb 2021 20:16:52 +0100 Subject: [PATCH 29/86] removed warning --- debugger.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/debugger.cpp b/debugger.cpp index 9cb91cb0..9a739f0d 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -860,7 +860,10 @@ void Debugger::processActionMiMode(QString output, QString error) else { QStringList tmpList; bool firstElement = true; - for(QString t : output.split(QString("~\""), QString::SkipEmptyParts)){ + for(QString t : output.split(QString("~\""))){ + if (t.isEmpty()){ + continue; + } if (firstElement){ firstElement = false; continue; From 24cabc308b5f1639fd74f20bc72a9357ffd3555e Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 13 Apr 2021 15:45:06 +0200 Subject: [PATCH 30/86] Added StackView --- debugger.cpp | 152 ++++++++++++++++++++++++++++++++++++++++++- debugger.h | 9 ++- debugtablewidget.cpp | 61 +++++++++++++++++ debugtablewidget.h | 11 +++- mainwindow.cpp | 81 +++++++++++++++++++++++ mainwindow.h | 5 ++ 6 files changed, 316 insertions(+), 3 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 9a739f0d..7fab01d7 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -65,6 +65,7 @@ Debugger::Debugger(QTextEdit *tEdit, { c = 0; pid = 0; + firstStack = true; firstAction = true; textEdit = tEdit; exePath = exePathParam; @@ -75,6 +76,7 @@ Debugger::Debugger(QTextEdit *tEdit, verbose = i_verbose; mimode = i_mimode; wincrflag = 0; + sizeStack = 1; run(); } @@ -575,6 +577,74 @@ void Debugger::processAction(QString output, QString error) emit printRegisters(registers); return; } + + if (actionType == infoStack) { + QTextStream stackStream(&output); + QList stacks; + QRegExp r = QRegExp("0x[0-9a-fA-F]{6,12}"); + int index; + if (firstStack){ + firstStack = false; + index = r.indexIn(output); + if(index != -1) + stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - 8; + //emit printLog("Startaddress: " + QString::number(stackBottom)); + return; + } + QString info; + quint64 address; + quint64 value; + index = output.indexOf(QString("Cannot access memory")); + if (index != -1){ + emit printLog(QString("Error showing stack"), Qt::red); + return; + } + for (int i = 0; !stackStream.atEnd(); i++) { + stackStream >> info; + index = r.indexIn(info); + address = info.mid(index, r.matchedLength()).toULongLong(0, 16); + if (index == -1 || address >= stackBottom) { + break; + } + if(sizeStack>1){ + for(int j = 0; j < 4; j++){ + stackStream >> info; + index = r.indexIn(info); + value = info.mid(index, r.matchedLength()).toULongLong(0, 16); + for(int k = 0; k < 2; k++){ //per line + if(sizeStack==2) + stacks.append(QString("0x") + QString::number((value >> 16*k)&0xffff, 16)); + else + stacks.append(QString::number((value >> 16*k)&0xffff, 10)); + if (address + 2 + 2*k + j*4 >= stackBottom) { + emit printStack(stacks); + return; + } + } + } + } else { + for(int j = 0; j < 4; j++){ //per line + stackStream >> info; + index = r.indexIn(info); + value = info.mid(index, r.matchedLength()).toULongLong(0, 16); + for(int k = 0; k < 4; k++){ + if(sizeStack==0) + stacks.append(QString("0x") + QString::number((value >> 8*k)&0xff, 16)); + else + stacks.append(QString::number((value >> 8*k)&0xff, 10)); + if (address + 1 + k + j*4 >= stackBottom) { + emit printStack(stacks); + return; + } + } + } + } + } + if(stacks.size()>=100) + stacks.append(QString("...")); + emit printStack(stacks); + return; + } if (output == QString("\r\n") || output == QString("\n") || output == QString("\r\n\n") || output == QString("\n\n")) //if empty @@ -947,6 +1017,7 @@ void Debugger::processActionMiMode(QString output, QString error) info.decValue = registersStream.readLine(); info.decValue.remove(QRegExp("~|\"|\\\\n|\\\\t")); } else if (mmx.exactMatch(info.name) || xmm.exactMatch(info.name) || ymm.exactMatch(info.name)) { + //TODO QMap fields; if (!readStruct(registersStream, &fields)) { @@ -981,7 +1052,81 @@ void Debugger::processActionMiMode(QString output, QString error) emit printRegisters(registers); return; } - //todo + + if (actionType == infoStack) { + QTextStream stackStream(&output); + QList stacks; + QRegExp r = QRegExp("0x[0-9a-fA-F]{6,12}"); + int index; + if (firstStack){ + firstStack = false; + index = r.indexIn(output); + if(index != -1) + stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - 8; + return; + } + QString info; + quint64 address; + quint64 value; + index = output.indexOf(QString("Cannot access memory")); + if (index != -1){ + emit printLog(QString("Error showing stack"), Qt::red); + return; + } + for (int i = 0; !stackStream.atEnd(); i++) { + stackStream >> info; + if (info.at(0) != QChar('~')||info.indexOf(QString("~\"\\n\""))!=-1) { + continue; + } + //info.remove(QRegExp("~|\"|\\\\n")); + QList stackLine = info.split(QString("\\t")); + index = r.indexIn(info); + address = info.mid(index, r.matchedLength()).toULongLong(0, 16); + if (index == -1 || address >= stackBottom) { + break; + } + if(sizeStack>1){ + for(int j = 0; j < stackLine.size()-1; j++){ + //emit printLog(info); + info = stackLine[j+1]; + index = r.indexIn(info); + value = info.mid(index, r.matchedLength()).toULongLong(0, 16); + for(int k = 0; k < 2; k++){ //per line + if(sizeStack==2) + stacks.append(QString("0x") + QString::number((value >> 16*k)&0xffff, 16)); + else + stacks.append(QString::number((value >> 16*k)&0xffff, 10)); + if (address + 2 + 2*k + j*4 >= stackBottom) { + emit printStack(stacks); + return; + } + } + } + } else { + for(int j = 0; j < stackLine.size()-1; j++){ //per line + info = stackLine[j+1]; + index = r.indexIn(info); + value = info.mid(index, r.matchedLength()).toULongLong(0, 16); + for(int k = 0; k < 4; k++){ + if(sizeStack==0) + stacks.append(QString("0x") + QString::number((value >> 8*k)&0xff, 16)); + else + stacks.append(QString::number((value >> 8*k)&0xff, 10)); + if (address + 1 + k + j*4 >= stackBottom) { + emit printStack(stacks); + return; + } + } + } + } + } + if(stacks.size()>=100) + stacks.append(QString("...")); + emit printStack(stacks); + return; + } + + if (output == QString("\r\n") || output == QString("\n") || output == QString("\r\n\n") || output == QString("\n\n")||output.at(0)=='*') //if empty or starts with * return; @@ -1032,6 +1177,11 @@ void Debugger::setWatchesCount(int count) watchesCount = count; } +void Debugger::setStackSizeFormat(int size) +{ + sizeStack = size; +} + void Debugger::processLst() { //set accordance with .lst file and program in memory diff --git a/debugger.h b/debugger.h index a1666833..f50ca1e0 100644 --- a/debugger.h +++ b/debugger.h @@ -68,7 +68,7 @@ * Defines the debugger. */ -enum DebugActionType {ni, si, showLine, infoRegisters, infoMemory, anyAction, none, breakpoint}; +enum DebugActionType {ni, si, showLine, infoRegisters, infoMemory, infoStack, anyAction, none, breakpoint}; /** @@ -178,8 +178,13 @@ class Debugger : public QObject bool stopped; quint64 pid; bool dbgSymbols; + bool firstStack; quint64 entryPoint; + + // save Stackbottom + quint64 stackBottom; + int sizeStack; public slots: void readOutputToBuffer(); @@ -191,6 +196,7 @@ public slots: void doInput(QString command, DebugActionType actionType); void changeBreakpoint(quint64 lineNumber, bool isAdded); void emitStarted(); + void setStackSizeFormat(int size); signals: //! Highlight the current debug line. @@ -199,6 +205,7 @@ public slots: //! Signal is emited when debugger is ready to get commands like step into and etc. void started(); void printRegisters(QList); + void printStack(QList); void printMemory(QList); void printLog(QString msg, QColor color = QColor(Qt::black)); void printOutput(QString msg); diff --git a/debugtablewidget.cpp b/debugtablewidget.cpp index 42cc8c2f..a4c14c08 100644 --- a/debugtablewidget.cpp +++ b/debugtablewidget.cpp @@ -49,6 +49,8 @@ QByteArray DebugTableWidget::memoryHeaderState; bool DebugTableWidget::geometryRegistersSaved; bool DebugTableWidget::geometryMemorySaved; QByteArray DebugTableWidget::registerWindowState; +bool DebugTableWidget::geometryStackSaved; +QByteArray DebugTableWidget::stackWindowState; DebugTableWidget::DebugTableWidget(int rows, int columns, DebugTableWidgetType widgetType, QWidget *parent) : QTableWidget(rows, columns, parent) @@ -78,8 +80,37 @@ DebugTableWidget::DebugTableWidget(int rows, int columns, DebugTableWidgetType w if (geometryRegistersSaved) restoreGeometry(registerWindowState); } + + if (type == stackTable) { + setSelectionMode(QAbstractItemView::NoSelection); + QStringList header; + header << "Stack"; + setHorizontalHeaderLabels(header); + horizontalHeader()->setStretchLastSection(true); + setWindowTitle(tr("Stack")); + resizeColumnsToContents(); + if (geometryStackSaved) + restoreGeometry(stackWindowState); + } +} + +void DebugTableWidget::initializeStackWindow() +{ + if (type == stackTable) { + typeComboBox = new QComboBox; + QStringList comboBoxList; + comboBoxList << tr("Hex 32") << tr("Bin 32") << tr("Hex 64") << tr("Bin 64"); + typeComboBox->insertItems(0, comboBoxList); + insertRow(0); + setCellWidget(0, 0, typeComboBox); + addStack(QString("Bottom")); + + // ??? + //connect(typeComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(settingsChanged())); + } } + void DebugTableWidget::initializeMemoryWindow(const QList &watches) { if (type == memoryTable) { @@ -111,6 +142,19 @@ void DebugTableWidget::setValuesFromDebugger(QList regi } } +void DebugTableWidget::setValuesFromDebugger(QList stacks) //the stack +{ + setRowCount(1); + addStack(QString("Bottom")); + for (int i = stacks.size()-1; i >= 0; i--) + addStack(stacks[i]); + show(); + if (firstTime) { + firstTime = false; + activateWindow(); + } +} + void DebugTableWidget::changeMemoryWindow(int row, int column) { disconnect(this, SIGNAL(cellChanged(int,int)), this, SLOT(changeMemoryWindow(int,int))); @@ -214,6 +258,19 @@ void DebugTableWidget::addRegister(const QString &name, const QString &hexValue, } } +void DebugTableWidget::addStack(const QString &hexValue) +{ + empty = false; + if (type == stackTable) { + QTableWidgetItem *hexValueItem = new QTableWidgetItem(hexValue); + QFont monoFont("Courier"); + monoFont.setStyleHint(QFont::Monospace); + hexValueItem->setFont(monoFont); + insertRow(1); + setItem(1, 0, hexValueItem); + } +} + bool DebugTableWidget::isEmpty() { return empty; @@ -263,4 +320,8 @@ DebugTableWidget::~DebugTableWidget() registerWindowState = saveGeometry(); geometryRegistersSaved = true; } + if (type == stackTable) { + stackWindowState = saveGeometry(); + geometryStackSaved = true; + } } diff --git a/debugtablewidget.h b/debugtablewidget.h index 0a042def..f334ac24 100644 --- a/debugtablewidget.h +++ b/debugtablewidget.h @@ -17,7 +17,7 @@ * Defines the debugging window (memory or registers table). */ -enum DebugTableWidgetType {registersTable, memoryTable}; +enum DebugTableWidgetType {registersTable, memoryTable, stackTable}; /** @@ -36,10 +36,16 @@ class DebugTableWidget : public QTableWidget ~DebugTableWidget(); bool isEmpty(); void initializeMemoryWindow(const QList &watches); + void initializeStackWindow(); static QByteArray memoryHeaderState; static QByteArray registerWindowState; + static QByteArray stackWindowState; static bool geometryMemorySaved; static bool geometryRegistersSaved; + static bool geometryStackSaved; + QComboBox *typeComboBox; + QComboBox *typeComboBox2; + QCheckBox *signCheckbox; protected: void closeEvent(QCloseEvent *); @@ -56,15 +62,18 @@ public slots: void addVariable(const RuQPlainTextEdit::Watch &variable, int rowNumber = -1); void changeVariableValue(const QString &value, int rowNumber, bool isValid); void addRegister(const QString &name, const QString &hexValue, const QString &decValue, int rowNumber); + void addStack(const QString &hexValue); void changeMemoryWindow(int row, int column); void setValuesFromDebugger(QList watches); void setValuesFromDebugger(QList registers); + void setValuesFromDebugger(QList stacks); private: int contextMenuLineNumber; DebugTableWidgetType type; bool empty; bool firstTime; + QHBoxLayout *layout; }; #endif // DEBUGTABLEWIDGET_H diff --git a/mainwindow.cpp b/mainwindow.cpp index 164d00a1..23c35fbb 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -65,12 +65,14 @@ MainWindow::MainWindow(const QStringList &args, QWidget *parent) help = 0; registersWindow = 0; memoryWindow = 0; + stackWindow = 0; debugger = 0; programStopped = true; highlighter = 0; tabs = 0; memoryDock = 0; registersDock = 0; + stackDock = 0; //! Initialize assembler assembler = 0; @@ -229,6 +231,7 @@ void MainWindow::createMenus() debugMenu->addAction(debugToggleBreakpointAction); debugMenu->addAction(debugShowRegistersAction); debugMenu->addAction(debugShowMemoryAction); + debugMenu->addAction(debugShowStackAction); debugMenu->addSeparator(); debugMenu->addAction(stopAction); settingsMenu = menuBar()->addMenu(tr("Settings")); @@ -460,6 +463,18 @@ void MainWindow::createActions() debugShowMemoryAction->setShortcut(key); debugShowMemoryAction->setCheckable(true); connect(debugShowMemoryAction, SIGNAL(toggled(bool)), this, SLOT(debugShowMemory()), Qt::QueuedConnection); + + //neu: + debugShowStackAction = new QAction("Show stack", this); + /* + key = keySettings.value("showMemory", "default").toString(); + stdKey = QKeySequence(QString("Ctrl+M")); + if (key == "default") + key = stdKey.toString(); + debugShowMemoryAction->setShortcut(key); + */ + debugShowStackAction->setCheckable(true); + connect(debugShowStackAction, SIGNAL(toggled(bool)), this, SLOT(debugShowStack()), Qt::QueuedConnection); disableDebugActions(true); @@ -749,6 +764,11 @@ void MainWindow::closeAllChildWindows() delete memoryWindow; memoryWindow = 0; } + if (stackWindow) { + stackWindow->close(); + delete stackWindow; + stackWindow = 0; + } } bool MainWindow::deleteTab(int index, bool saveFileName) @@ -1229,6 +1249,7 @@ void MainWindow::changeDebugActionToStart() else { debugShowRegisters(); debugShowMemory(); + debugShowStack(); } } @@ -1249,6 +1270,7 @@ void MainWindow::enableDebugActions() debugNextNiAction->setEnabled(true); debugShowRegistersAction->setEnabled(true); debugShowMemoryAction->setEnabled(true); + debugShowStackAction->setEnabled(true); stopAction->setEnabled(true); //! Change stopAction @@ -1262,6 +1284,7 @@ void MainWindow::enableDebugActions() //! Restore windows debugShowRegistersAction->setChecked(settings.value("debugregisters", false).toBool()); debugShowMemoryAction->setChecked(settings.value("debugmemory", false).toBool()); + debugShowStackAction->setChecked(settings.value("debugstack", false).toBool()); } void MainWindow::disableDebugActions(bool start) @@ -1274,6 +1297,7 @@ void MainWindow::disableDebugActions(bool start) debugNextNiAction->setEnabled(false); debugShowRegistersAction->setEnabled(false); debugShowMemoryAction->setEnabled(false); + debugShowStackAction->setEnabled(false); stopAction->setEnabled(false); //! Change stopAction @@ -1337,6 +1361,8 @@ void MainWindow::debugShowMemory() restoreState(settings.value("debugstate").toByteArray()); if (registersDock) registersDock->show(); + if (stackDock) + stackDock->show(); if (memoryDock) memoryDock->show(); @@ -1399,6 +1425,51 @@ void MainWindow::debugShowMemory() } } +void MainWindow::debugShowStack() +{ + if (debugShowStackAction->isChecked()) { + if (!stackWindow) { + stackDock = new QDockWidget(tr("Stack"), this); + stackDock->setAllowedAreas(Qt::AllDockWidgetAreas); + + stackWindow = new DebugTableWidget(0, 1, stackTable, stackDock); + connect(stackWindow, SIGNAL(closeSignal()), this, SLOT(setShowStackToUnchecked())); + connect(debugger, SIGNAL(printStack(QList)), + stackWindow, SLOT(setValuesFromDebugger(QList))); + + stackDock->setWidget(stackWindow); + stackDock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); + addDockWidget(Qt::LeftDockWidgetArea, stackDock); + stackDock->setObjectName("stackDock"); + + restoreState(settings.value("debugstate").toByteArray()); + if (registersDock) + registersDock->show(); + if (memoryDock) + memoryDock->show(); + if (stackDock) + stackDock->show(); + stackWindow->initializeStackWindow(); + connect(stackWindow->typeComboBox, SIGNAL(currentTextChanged(const QString)), this, SLOT(debugShowStack()), Qt::QueuedConnection); + debugger->doInput(QString("info f 0\n"), infoStack); + } + if (debugger->isStopped()) { + int size = stackWindow->typeComboBox->currentIndex(); + debugger->setStackSizeFormat(size); + debugger->doInput(QString("x/100x $sp\n"), infoStack); + } + } else + if (stackWindow) { + stackWindow->close(); + stackWindow->clear(); + delete stackWindow; + stackWindow = 0; + stackDock->close(); + delete stackDock; + stackDock = 0; + } +} + void MainWindow::saveWatches(DebugTableWidget *table) { watches.clear(); @@ -1461,6 +1532,8 @@ void MainWindow::debugShowRegisters() registersDock->show(); if (memoryDock) memoryDock->show(); + if (stackDock) + stackDock->show(); } static SignalLocker locker; if (debugger->isStopped() && locker.tryLock()) { @@ -1488,10 +1561,16 @@ void MainWindow::setShowRegistersToUnchecked() debugShowRegistersAction->setChecked(false); } +void MainWindow::setShowStackToUnchecked() +{ + debugShowStackAction->setChecked(false); +} + void MainWindow::debugExit() { settings.setValue("debugregisters", debugShowRegistersAction->isChecked()); settings.setValue("debugmemory", debugShowMemoryAction->isChecked()); + settings.setValue("debugstack", debugShowStackAction->isChecked()); settings.setValue("debugstate", saveState()); CodeEditor *code = ((Tab *) tabs->currentWidget())->code; disconnect(code, SIGNAL(addWatchSignal(const RuQPlainTextEdit::Watch &)), @@ -1505,6 +1584,7 @@ void MainWindow::debugExit() closeAnyCommandWidget(); debugShowRegistersAction->setChecked(false); debugShowMemoryAction->setChecked(false); + debugShowStackAction->setChecked(false); printLogWithTime(tr("Debugging finished.") + '\n', Qt::darkGreen); disableDebugActions(); } @@ -2242,6 +2322,7 @@ void MainWindow::changeActionsState(int widgetIndex) debugNextAction->setEnabled(false); debugNextNiAction->setEnabled(false); debugShowRegistersAction->setEnabled(false); + debugShowStackAction->setEnabled(false); debugToggleBreakpointAction->setEnabled(false); debugShowMemoryAction->setEnabled(false); } else { diff --git a/mainwindow.h b/mainwindow.h index 7f8c7a5f..e6fe341b 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -152,6 +152,7 @@ class MainWindow : public QMainWindow QAction *debugToggleBreakpointAction; QAction *debugShowRegistersAction; QAction *debugShowMemoryAction; + QAction *debugShowStackAction; QAction *settingsAction; QAction *helpAction; QAction *aboutAction; @@ -173,6 +174,8 @@ class MainWindow : public QMainWindow QDockWidget *registersDock; QPointer memoryWindow; QDockWidget *memoryDock; + QPointer stackWindow; + QDockWidget *stackDock; QList watches; DebugAnyCommandWidget *debugAnyCommandWidget; bool programStopped; @@ -258,9 +261,11 @@ public slots: void debugToggleBreakpoint(); void debugShowRegisters(); void debugShowMemory(); + void debugShowStack(); void debugRunCommand(QString command, bool print); void saveWatches(DebugTableWidget *table); void setShowRegistersToUnchecked(); + void setShowStackToUnchecked(); void setShowMemoryToUnchecked(); void setShowMemoryToChecked(const RuQPlainTextEdit::Watch &variable); void showAnyCommandWidget(); From da14313ab7d180b903244531e28c13a5ea7c1c6e Mon Sep 17 00:00:00 2001 From: ge69dal Date: Wed, 14 Apr 2021 22:04:53 +0200 Subject: [PATCH 31/86] updated StackView --- SASM.pro | 8 ++- debugger.cpp | 105 ++++++++++++++++++++++++++-------------- debugger.h | 12 +++-- debugtablewidget.cpp | 26 ++-------- debugtablewidget.h | 6 +-- mainwindow.cpp | 14 +++--- mainwindow.h | 3 +- stacksettingswidget.cpp | 87 +++++++++++++++++++++++++++++++++ stacksettingswidget.h | 67 +++++++++++++++++++++++++ stackwidget.cpp | 70 +++++++++++++++++++++++++++ stackwidget.h | 72 +++++++++++++++++++++++++++ 11 files changed, 393 insertions(+), 77 deletions(-) create mode 100644 stacksettingswidget.cpp create mode 100644 stacksettingswidget.h create mode 100644 stackwidget.cpp create mode 100644 stackwidget.h diff --git a/SASM.pro b/SASM.pro index 37aacd4d..fd3925c1 100644 --- a/SASM.pro +++ b/SASM.pro @@ -70,7 +70,9 @@ SOURCES += main.cpp\ fasm.cpp \ signallocker.cpp \ masm.cpp \ - gccbasedassembler.cpp + gccbasedassembler.cpp \ + stacksettingswidget.cpp \ + stackwidget.cpp HEADERS += mainwindow.h \ tab.h \ @@ -91,7 +93,9 @@ HEADERS += mainwindow.h \ fasm.h \ signallocker.h \ masm.h \ - gccbasedassembler.h + gccbasedassembler.h \ + stacksettingswidget.h \ + stackwidget.h FORMS += settings.ui diff --git a/debugger.cpp b/debugger.cpp index 7fab01d7..c12e6cea 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -76,7 +76,9 @@ Debugger::Debugger(QTextEdit *tEdit, verbose = i_verbose; mimode = i_mimode; wincrflag = 0; - sizeStack = 1; + bitStack = 0; + systemStack = 16; + signStack = false; run(); } @@ -543,6 +545,7 @@ void Debugger::processAction(QString output, QString error) registersStream.skipWhiteSpace(); info.decValue = registersStream.readLine(); } else if (mmx.exactMatch(info.name) || xmm.exactMatch(info.name) || ymm.exactMatch(info.name)) { + //TODO QMap fields; if (!readStruct(registersStream, &fields)) { @@ -581,6 +584,7 @@ void Debugger::processAction(QString output, QString error) if (actionType == infoStack) { QTextStream stackStream(&output); QList stacks; + QList stacks2; QRegExp r = QRegExp("0x[0-9a-fA-F]{6,12}"); int index; if (firstStack){ @@ -606,40 +610,37 @@ void Debugger::processAction(QString output, QString error) if (index == -1 || address >= stackBottom) { break; } - if(sizeStack>1){ - for(int j = 0; j < 4; j++){ - stackStream >> info; - index = r.indexIn(info); - value = info.mid(index, r.matchedLength()).toULongLong(0, 16); - for(int k = 0; k < 2; k++){ //per line - if(sizeStack==2) - stacks.append(QString("0x") + QString::number((value >> 16*k)&0xffff, 16)); - else - stacks.append(QString::number((value >> 16*k)&0xffff, 10)); - if (address + 2 + 2*k + j*4 >= stackBottom) { - emit printStack(stacks); - return; - } - } + + for(int j = 0; j < 2; j++){ + stackStream >> info; + index = r.indexIn(info); + value = info.mid(index, r.matchedLength()).toULongLong(0, 16); + stackStream >> info; + index = r.indexIn(info); + value += (info.mid(index, r.matchedLength()).toULongLong(0, 16)) << 32; + for(int k = 0; k < 8; k++){ //per line + if (address + k + j*8 >= stackBottom) { + goto exit; + } + stacks2.append((value >> 8*k)&0xff); } - } else { - for(int j = 0; j < 4; j++){ //per line - stackStream >> info; - index = r.indexIn(info); - value = info.mid(index, r.matchedLength()).toULongLong(0, 16); - for(int k = 0; k < 4; k++){ - if(sizeStack==0) - stacks.append(QString("0x") + QString::number((value >> 8*k)&0xff, 16)); - else - stacks.append(QString::number((value >> 8*k)&0xff, 10)); - if (address + 1 + k + j*4 >= stackBottom) { - emit printStack(stacks); - return; - } - } + } + } + exit: + quint64 stackelem; + for (int i = stacks2.size()-1; i >= 0; i-=bitStack){ + stackelem = stacks2[i]; + emit printLog(QString(" ")+QString::number(stacks2[i])); + for (int j = 1; j < bitStack; j++){ + if (i-j<0){ + stacks.append(QString("(+") + QString::number(bitStack-j) + QString(" unused Byte) ") + QString::number(stackelem, systemStack)); + goto exit2; } + stackelem = (stackelem << 8) + stacks2[i-j]; } + stacks.append(QString::number(stackelem, systemStack)); } + exit2: if(stacks.size()>=100) stacks.append(QString("...")); emit printStack(stacks); @@ -1053,7 +1054,7 @@ void Debugger::processActionMiMode(QString output, QString error) return; } - if (actionType == infoStack) { + if (actionType == infoStack) {/* QTextStream stackStream(&output); QList stacks; QRegExp r = QRegExp("0x[0-9a-fA-F]{6,12}"); @@ -1073,7 +1074,7 @@ void Debugger::processActionMiMode(QString output, QString error) emit printLog(QString("Error showing stack"), Qt::red); return; } - for (int i = 0; !stackStream.atEnd(); i++) { + for (int i = 0; !stackStream.atEnd(); i++) { stackStream >> info; if (info.at(0) != QChar('~')||info.indexOf(QString("~\"\\n\""))!=-1) { continue; @@ -1122,7 +1123,7 @@ void Debugger::processActionMiMode(QString output, QString error) } if(stacks.size()>=100) stacks.append(QString("...")); - emit printStack(stacks); + emit printStack(stacks);*/ return; } @@ -1177,9 +1178,39 @@ void Debugger::setWatchesCount(int count) watchesCount = count; } -void Debugger::setStackSizeFormat(int size) -{ - sizeStack = size; +void Debugger::setBitStack(int bit){ + switch (bit) { + case 0: + bitStack = 1; + break; + case 1: + bitStack = 2; + break; + case 2: + bitStack = 4; + break; + case 3: + default: + bitStack = 8; + } +} + +void Debugger::setSystemStack(int system){ + switch (system) { + case 0: + systemStack = 16; + break; + case 1: + systemStack = 10; + break; + case 2: + default: + systemStack = 2; + } +} + +void Debugger::setSignStack(bool sign){ + signStack = sign; } void Debugger::processLst() diff --git a/debugger.h b/debugger.h index f50ca1e0..2257b444 100644 --- a/debugger.h +++ b/debugger.h @@ -117,7 +117,7 @@ class Debugger : public QObject // start debugger bool run(); - + private: void processLst(); void gdb_cmd_run(); @@ -182,9 +182,11 @@ class Debugger : public QObject quint64 entryPoint; - // save Stackbottom + // save Stack quint64 stackBottom; - int sizeStack; + int bitStack; + int systemStack; + bool signStack; public slots: void readOutputToBuffer(); @@ -196,7 +198,9 @@ public slots: void doInput(QString command, DebugActionType actionType); void changeBreakpoint(quint64 lineNumber, bool isAdded); void emitStarted(); - void setStackSizeFormat(int size); + void setBitStack(int bit); + void setSystemStack(int system); + void setSignStack(bool sign); signals: //! Highlight the current debug line. diff --git a/debugtablewidget.cpp b/debugtablewidget.cpp index a4c14c08..daa6ec45 100644 --- a/debugtablewidget.cpp +++ b/debugtablewidget.cpp @@ -88,29 +88,13 @@ DebugTableWidget::DebugTableWidget(int rows, int columns, DebugTableWidgetType w setHorizontalHeaderLabels(header); horizontalHeader()->setStretchLastSection(true); setWindowTitle(tr("Stack")); + addStack(QString("Bottom")); resizeColumnsToContents(); if (geometryStackSaved) restoreGeometry(stackWindowState); } } -void DebugTableWidget::initializeStackWindow() -{ - if (type == stackTable) { - typeComboBox = new QComboBox; - QStringList comboBoxList; - comboBoxList << tr("Hex 32") << tr("Bin 32") << tr("Hex 64") << tr("Bin 64"); - typeComboBox->insertItems(0, comboBoxList); - insertRow(0); - setCellWidget(0, 0, typeComboBox); - addStack(QString("Bottom")); - - // ??? - //connect(typeComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(settingsChanged())); - } -} - - void DebugTableWidget::initializeMemoryWindow(const QList &watches) { if (type == memoryTable) { @@ -144,9 +128,9 @@ void DebugTableWidget::setValuesFromDebugger(QList regi void DebugTableWidget::setValuesFromDebugger(QList stacks) //the stack { - setRowCount(1); + setRowCount(0); addStack(QString("Bottom")); - for (int i = stacks.size()-1; i >= 0; i--) + for (int i = 0; i < stacks.size(); i++) addStack(stacks[i]); show(); if (firstTime) { @@ -266,8 +250,8 @@ void DebugTableWidget::addStack(const QString &hexValue) QFont monoFont("Courier"); monoFont.setStyleHint(QFont::Monospace); hexValueItem->setFont(monoFont); - insertRow(1); - setItem(1, 0, hexValueItem); + insertRow(0); + setItem(0, 0, hexValueItem); } } diff --git a/debugtablewidget.h b/debugtablewidget.h index f334ac24..00e95ad0 100644 --- a/debugtablewidget.h +++ b/debugtablewidget.h @@ -10,6 +10,7 @@ #include #include "debugger.h" #include "watchsettingswidget.h" +#include "stacksettingswidget.h" #include "ruqplaintextedit.h" /** @@ -36,16 +37,12 @@ class DebugTableWidget : public QTableWidget ~DebugTableWidget(); bool isEmpty(); void initializeMemoryWindow(const QList &watches); - void initializeStackWindow(); static QByteArray memoryHeaderState; static QByteArray registerWindowState; static QByteArray stackWindowState; static bool geometryMemorySaved; static bool geometryRegistersSaved; static bool geometryStackSaved; - QComboBox *typeComboBox; - QComboBox *typeComboBox2; - QCheckBox *signCheckbox; protected: void closeEvent(QCloseEvent *); @@ -73,7 +70,6 @@ public slots: DebugTableWidgetType type; bool empty; bool firstTime; - QHBoxLayout *layout; }; #endif // DEBUGTABLEWIDGET_H diff --git a/mainwindow.cpp b/mainwindow.cpp index 23c35fbb..86e65267 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1432,10 +1432,11 @@ void MainWindow::debugShowStack() stackDock = new QDockWidget(tr("Stack"), this); stackDock->setAllowedAreas(Qt::AllDockWidgetAreas); - stackWindow = new DebugTableWidget(0, 1, stackTable, stackDock); + stackWindow = new StackWidget; connect(stackWindow, SIGNAL(closeSignal()), this, SLOT(setShowStackToUnchecked())); connect(debugger, SIGNAL(printStack(QList)), - stackWindow, SLOT(setValuesFromDebugger(QList))); + stackWindow->stackContent, SLOT(setValuesFromDebugger(QList))); + connect(stackWindow->settings, SIGNAL(stacksettingsChanged()), this, SLOT(debugShowStack()), Qt::QueuedConnection); stackDock->setWidget(stackWindow); stackDock->setFeatures(QDockWidget::DockWidgetFloatable | QDockWidget::DockWidgetMovable); @@ -1449,19 +1450,18 @@ void MainWindow::debugShowStack() memoryDock->show(); if (stackDock) stackDock->show(); - stackWindow->initializeStackWindow(); - connect(stackWindow->typeComboBox, SIGNAL(currentTextChanged(const QString)), this, SLOT(debugShowStack()), Qt::QueuedConnection); debugger->doInput(QString("info f 0\n"), infoStack); } if (debugger->isStopped()) { - int size = stackWindow->typeComboBox->currentIndex(); - debugger->setStackSizeFormat(size); + debugger->setSystemStack(stackWindow->settings->typeComboBox->currentIndex()); + debugger->setBitStack(stackWindow->settings->sizeComboBox->currentIndex()); + debugger->setSignStack(stackWindow->settings->signCheckbox->isChecked()); debugger->doInput(QString("x/100x $sp\n"), infoStack); } } else if (stackWindow) { stackWindow->close(); - stackWindow->clear(); + //stackWindow->clear(); delete stackWindow; stackWindow = 0; stackDock->close(); diff --git a/mainwindow.h b/mainwindow.h index e6fe341b..7c1ca670 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -75,6 +75,7 @@ #include "fasm.h" #include "signallocker.h" #include "masm.h" +#include "stackwidget.h" #define SASM_VERSION "3.12.1" @@ -174,7 +175,7 @@ class MainWindow : public QMainWindow QDockWidget *registersDock; QPointer memoryWindow; QDockWidget *memoryDock; - QPointer stackWindow; + QPointer stackWindow; QDockWidget *stackDock; QList watches; DebugAnyCommandWidget *debugAnyCommandWidget; diff --git a/stacksettingswidget.cpp b/stacksettingswidget.cpp new file mode 100644 index 00000000..e2ad1771 --- /dev/null +++ b/stacksettingswidget.cpp @@ -0,0 +1,87 @@ +/**************************************************************************** +** SASM - simple IDE for assembler development +** Copyright (C) 2013 Dmitriy Manushin +** Contact: site: http://dman95.github.io/SASM/ +** e-mail: Dman1095@gmail.com +** +** This file is part of SASM. +** +** SASM is free software: you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation, either version 3 of the License, or +** (at your option) any later version. +** +** SASM is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with SASM. If not, see . +** +** Этот файл — часть SASM. +** +** SASM - свободная программа: вы можете перераспространять ее и/или +** изменять ее на условиях Стандартной общественной лицензии GNU в том виде, +** в каком она была опубликована Фондом свободного программного обеспечения; +** либо версии 3 лицензии, либо (по вашему выбору) любой более поздней +** версии. +** +** SASM распространяется в надежде, что она будет полезной, +** но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА +** или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Стандартной +** общественной лицензии GNU. +** +** Вы должны были получить копию Стандартной общественной лицензии GNU +** вместе с этой программой. Если это не так, см. +** .) +** +****************************************************************************/ + +#include "stacksettingswidget.h" + +/*! \brief This defines the layout such as spacing and items of the stack + * + * + * First, the parent widget is passed to the class. Next, the form items are added + * and spaced appropriately. The form items are then further defined and then connected. +*/ +StackSettingsWidget::StackSettingsWidget(QWidget *parent) : + QWidget(parent) +{ + layout = new QHBoxLayout(this); + typeComboBox = new QComboBox; + sizeComboBox = new QComboBox; + signCheckbox = new QCheckBox(tr("Signed/Unsigned")); + layout->addWidget(typeComboBox); + layout->addWidget(sizeComboBox); + //layout->addSpacing(1); + layout->addWidget(signCheckbox); + + QStringList comboBoxList; + comboBoxList << tr("Hex") << QString("Dec") << tr("Bin"); + typeComboBox->insertItems(0, comboBoxList); + + QStringList sizeBoxList; + sizeBoxList << QString("8") << QString("16") << QString("32") << QString("64"); + sizeComboBox->insertItems(0, sizeBoxList); + + signCheckbox->setChecked(false); + + layout->setSpacing(0); + layout->setMargin(0); + + connect(typeComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(stacksettingsChanged())); + connect(sizeComboBox, SIGNAL(currentIndexChanged(int)), this, SIGNAL(stacksettingsChanged())); + connect(signCheckbox, SIGNAL(stateChanged(int)), this, SIGNAL(stacksettingsChanged())); + + setLayout(layout); +} + +StackSettingsWidget::~StackSettingsWidget() +{ + delete typeComboBox; + delete sizeComboBox; + delete signCheckbox; + delete layout; +} diff --git a/stacksettingswidget.h b/stacksettingswidget.h new file mode 100644 index 00000000..a2f16b2c --- /dev/null +++ b/stacksettingswidget.h @@ -0,0 +1,67 @@ +/**************************************************************************** +** SASM - simple IDE for assembler development +** Copyright (C) 2013 Dmitriy Manushin +** Contact: site: http://dman95.github.io/SASM/ +** e-mail: Dman1095@gmail.com +** +** This file is part of SASM. +** +** SASM is free software: you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation, either version 3 of the License, or +** (at your option) any later version. +** +** SASM is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with SASM. If not, see . +** +** Этот файл — часть SASM. +** +** SASM - свободная программа: вы можете перераспространять ее и/или +** изменять ее на условиях Стандартной общественной лицензии GNU в том виде, +** в каком она была опубликована Фондом свободного программного обеспечения; +** либо версии 3 лицензии, либо (по вашему выбору) любой более поздней +** версии. +** +** SASM распространяется в надежде, что она будет полезной, +** но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА +** или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Стандартной +** общественной лицензии GNU. +** +** Вы должны были получить копию Стандартной общественной лицензии GNU +** вместе с этой программой. Если это не так, см. +** .) +** +****************************************************************************/ + +#ifndef STACKSETTINGSWIDGET_H +#define STACKSETTINGSWIDGET_H + +#include +#include +#include +#include + + +class StackSettingsWidget : public QWidget +{ + Q_OBJECT +public: + explicit StackSettingsWidget(QWidget *parent = 0); + ~StackSettingsWidget(); + QComboBox *typeComboBox; + QComboBox *sizeComboBox; + QCheckBox *signCheckbox; + +private: + QHBoxLayout *layout; + +signals: + void stacksettingsChanged(void); +}; + +#endif // WATCHSETTINGSWIDGET_H diff --git a/stackwidget.cpp b/stackwidget.cpp new file mode 100644 index 00000000..542c7efd --- /dev/null +++ b/stackwidget.cpp @@ -0,0 +1,70 @@ +/**************************************************************************** +** SASM - simple IDE for assembler development +** Copyright (C) 2013 Dmitriy Manushin +** Contact: site: http://dman95.github.io/SASM/ +** e-mail: Dman1095@gmail.com +** +** This file is part of SASM. +** +** SASM is free software: you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation, either version 3 of the License, or +** (at your option) any later version. +** +** SASM is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with SASM. If not, see . +** +** Этот файл — часть SASM. +** +** SASM - свободная программа: вы можете перераспространять ее и/или +** изменять ее на условиях Стандартной общественной лицензии GNU в том виде, +** в каком она была опубликована Фондом свободного программного обеспечения; +** либо версии 3 лицензии, либо (по вашему выбору) любой более поздней +** версии. +** +** SASM распространяется в надежде, что она будет полезной, +** но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА +** или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Стандартной +** общественной лицензии GNU. +** +** Вы должны были получить копию Стандартной общественной лицензии GNU +** вместе с этой программой. Если это не так, см. +** .) +** +****************************************************************************/ + +#include "stackwidget.h" + + +StackWidget::StackWidget(QWidget *parent) : + QWidget(parent) +{ + layout = new QVBoxLayout(this); + stackContent = new DebugTableWidget(0, 1, stackTable, this);; + settings = new StackSettingsWidget; + + layout->addWidget(settings); + layout->addWidget(stackContent); + + layout->setSpacing(0); + layout->setMargin(0); + + setLayout(layout); +} + +void StackWidget::closeEvent(QCloseEvent *) { + emit closeSignal(); +} + +StackWidget::~StackWidget() +{ + delete stackContent; + stackContent = 0; + delete settings; + delete layout; +} diff --git a/stackwidget.h b/stackwidget.h new file mode 100644 index 00000000..0e636693 --- /dev/null +++ b/stackwidget.h @@ -0,0 +1,72 @@ +/**************************************************************************** +** SASM - simple IDE for assembler development +** Copyright (C) 2013 Dmitriy Manushin +** Contact: site: http://dman95.github.io/SASM/ +** e-mail: Dman1095@gmail.com +** +** This file is part of SASM. +** +** SASM is free software: you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation, either version 3 of the License, or +** (at your option) any later version. +** +** SASM is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with SASM. If not, see . +** +** Этот файл — часть SASM. +** +** SASM - свободная программа: вы можете перераспространять ее и/или +** изменять ее на условиях Стандартной общественной лицензии GNU в том виде, +** в каком она была опубликована Фондом свободного программного обеспечения; +** либо версии 3 лицензии, либо (по вашему выбору) любой более поздней +** версии. +** +** SASM распространяется в надежде, что она будет полезной, +** но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА +** или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Стандартной +** общественной лицензии GNU. +** +** Вы должны были получить копию Стандартной общественной лицензии GNU +** вместе с этой программой. Если это не так, см. +** .) +** +****************************************************************************/ + +#ifndef STACKWIDGET_H +#define STACKWIDGET_H + +#include +#include +#include +#include +#include "stacksettingswidget.h" +#include "debugtablewidget.h" + + +class StackWidget : public QWidget +{ + Q_OBJECT +public: + explicit StackWidget(QWidget *parent = 0); + ~StackWidget(); + QPointer stackContent; + StackSettingsWidget *settings; + +protected: + void closeEvent(QCloseEvent *); + +private: + QVBoxLayout *layout; + +signals: + void stacksettingsChanged(void); + void closeSignal(); +}; + +#endif From 83f4f770c9ba1c59da8ac57a144e895b95891079 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Thu, 15 Apr 2021 12:52:39 +0200 Subject: [PATCH 32/86] added signed Flag for Stack --- debugger.cpp | 114 ++++++++++++++++++++++++++++--------------- debugger.h | 1 + debugtablewidget.cpp | 2 + mainwindow.cpp | 1 - 4 files changed, 78 insertions(+), 40 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index c12e6cea..4fdb2677 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -289,6 +289,7 @@ void Debugger::processMessage(QString output, QString error) c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); + doInput(QString("info f 0\n"), infoStack); } //if an error with the wrong name of the section has occurred @@ -314,6 +315,7 @@ void Debugger::processMessage(QString output, QString error) c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); + doInput(QString("info f 0\n"), infoStack); } } @@ -592,7 +594,6 @@ void Debugger::processAction(QString output, QString error) index = r.indexIn(output); if(index != -1) stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - 8; - //emit printLog("Startaddress: " + QString::number(stackBottom)); return; } QString info; @@ -630,7 +631,6 @@ void Debugger::processAction(QString output, QString error) quint64 stackelem; for (int i = stacks2.size()-1; i >= 0; i-=bitStack){ stackelem = stacks2[i]; - emit printLog(QString(" ")+QString::number(stacks2[i])); for (int j = 1; j < bitStack; j++){ if (i-j<0){ stacks.append(QString("(+") + QString::number(bitStack-j) + QString(" unused Byte) ") + QString::number(stackelem, systemStack)); @@ -638,7 +638,24 @@ void Debugger::processAction(QString output, QString error) } stackelem = (stackelem << 8) + stacks2[i-j]; } - stacks.append(QString::number(stackelem, systemStack)); + if (signStack) { + switch (bitStack) { + case 1: + stacks.append(QString::number(((qint8) stackelem), systemStack)); + break; + case 2: + stacks.append(QString::number(stackelem, systemStack)); + break; + case 4: + stacks.append(QString::number(stackelem, systemStack)); + break; + case 8: + default: + stacks.append(QString::number(stackelem, systemStack)); + } + } else { + stacks.append(QString::number(stackelem, systemStack)); + } } exit2: if(stacks.size()>=100) @@ -722,6 +739,7 @@ void Debugger::processMessageMiMode(QString output, QString error) c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); + doInput(QString("info f 0\n"), infoStack); } //if an error with the wrong name of the section has occurred @@ -747,6 +765,7 @@ void Debugger::processMessageMiMode(QString output, QString error) c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); + doInput(QString("info f 0\n"), infoStack); } } @@ -1054,9 +1073,10 @@ void Debugger::processActionMiMode(QString output, QString error) return; } - if (actionType == infoStack) {/* - QTextStream stackStream(&output); + if (actionType == infoStack) { + QTextStream stackStream(&output); QList stacks; + QList stacks2; QRegExp r = QRegExp("0x[0-9a-fA-F]{6,12}"); int index; if (firstStack){ @@ -1074,56 +1094,54 @@ void Debugger::processActionMiMode(QString output, QString error) emit printLog(QString("Error showing stack"), Qt::red); return; } - for (int i = 0; !stackStream.atEnd(); i++) { + for (int i = 0; !stackStream.atEnd(); i++) { stackStream >> info; if (info.at(0) != QChar('~')||info.indexOf(QString("~\"\\n\""))!=-1) { continue; } - //info.remove(QRegExp("~|\"|\\\\n")); + info.remove(QRegExp("~|\"|\\\\n")); QList stackLine = info.split(QString("\\t")); index = r.indexIn(info); address = info.mid(index, r.matchedLength()).toULongLong(0, 16); if (index == -1 || address >= stackBottom) { break; } - if(sizeStack>1){ - for(int j = 0; j < stackLine.size()-1; j++){ - //emit printLog(info); - info = stackLine[j+1]; - index = r.indexIn(info); - value = info.mid(index, r.matchedLength()).toULongLong(0, 16); - for(int k = 0; k < 2; k++){ //per line - if(sizeStack==2) - stacks.append(QString("0x") + QString::number((value >> 16*k)&0xffff, 16)); - else - stacks.append(QString::number((value >> 16*k)&0xffff, 10)); - if (address + 2 + 2*k + j*4 >= stackBottom) { - emit printStack(stacks); - return; - } - } + + for(int j = 0; j < 2; j++){ + info = stackLine[j*2+1]; + index = r.indexIn(info); + value = info.mid(index, r.matchedLength()).toULongLong(0, 16); + info = stackLine[j*2+2]; + index = r.indexIn(info); + value += (info.mid(index, r.matchedLength()).toULongLong(0, 16)) << 32; + for(int k = 0; k < 8; k++){ //per line + if (address + k + j*8 >= stackBottom) { + goto exit; + } + stacks2.append((value >> 8*k)&0xff); } - } else { - for(int j = 0; j < stackLine.size()-1; j++){ //per line - info = stackLine[j+1]; - index = r.indexIn(info); - value = info.mid(index, r.matchedLength()).toULongLong(0, 16); - for(int k = 0; k < 4; k++){ - if(sizeStack==0) - stacks.append(QString("0x") + QString::number((value >> 8*k)&0xff, 16)); - else - stacks.append(QString::number((value >> 8*k)&0xff, 10)); - if (address + 1 + k + j*4 >= stackBottom) { - emit printStack(stacks); - return; - } - } + } + } + exit: + quint64 stackelem; + for (int i = stacks2.size()-1; i >= 0; i-=bitStack){ + stackelem = stacks2[i]; + for (int j = 1; j < bitStack; j++){ + if (i-j<0){ + stacks.append(QString("(+") + QString::number(bitStack-j) + QString(" unused Byte) ") + QString::number(stackelem, systemStack)); + goto exit2; } + stackelem = (stackelem << 8) + stacks2[i-j]; } + if (signStack) + stacks.append(signedNumberStack(stackelem)); + else + stacks.append(QString::number(stackelem, systemStack)); } + exit2: if(stacks.size()>=100) stacks.append(QString("...")); - emit printStack(stacks);*/ + emit printStack(stacks); return; } @@ -1136,6 +1154,24 @@ void Debugger::processActionMiMode(QString output, QString error) emit printLog(output); } +// convert unsinged to signed and add - +QString Debugger::signedNumberStack(quint64 value) { + if ((value&(1<<(bitStack*8-1))) > 0) { + switch (bitStack) { + case 1: + return QString("-") + QString::number(((-1*((qint8)value))&0xff), systemStack); + case 2: + return QString("-") + QString::number(((-1*((qint16)value))&0xffff), systemStack); + case 4: + return QString("-") + QString::number(((-1*((qint32)value))&0xffffffff), systemStack); + case 8: + default: + return QString("-") + QString::number((-1*((qint64)value)), systemStack); + } + } + return QString::number(value, systemStack); +} + bool Debugger::isStopped() { return stopped; diff --git a/debugger.h b/debugger.h index 2257b444..7e78ebba 100644 --- a/debugger.h +++ b/debugger.h @@ -201,6 +201,7 @@ public slots: void setBitStack(int bit); void setSystemStack(int system); void setSignStack(bool sign); + QString signedNumberStack(quint64 value); signals: //! Highlight the current debug line. diff --git a/debugtablewidget.cpp b/debugtablewidget.cpp index daa6ec45..1611d2eb 100644 --- a/debugtablewidget.cpp +++ b/debugtablewidget.cpp @@ -249,7 +249,9 @@ void DebugTableWidget::addStack(const QString &hexValue) QTableWidgetItem *hexValueItem = new QTableWidgetItem(hexValue); QFont monoFont("Courier"); monoFont.setStyleHint(QFont::Monospace); + hexValueItem->setTextAlignment(Qt::AlignCenter); hexValueItem->setFont(monoFont); + hexValueItem->setFlags(Qt::ItemIsEnabled); insertRow(0); setItem(0, 0, hexValueItem); } diff --git a/mainwindow.cpp b/mainwindow.cpp index 86e65267..8fdf9dbf 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1450,7 +1450,6 @@ void MainWindow::debugShowStack() memoryDock->show(); if (stackDock) stackDock->show(); - debugger->doInput(QString("info f 0\n"), infoStack); } if (debugger->isStopped()) { debugger->setSystemStack(stackWindow->settings->typeComboBox->currentIndex()); From eef9943c6b43f1e1137a1e73dcfe58fd09710b64 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 16 Apr 2021 11:02:06 +0200 Subject: [PATCH 33/86] fixed signedFlag --- debugger.cpp | 52 ++++++++++++++++++++++------------------------------ 1 file changed, 22 insertions(+), 30 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 4fdb2677..24ea0dff 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -638,24 +638,10 @@ void Debugger::processAction(QString output, QString error) } stackelem = (stackelem << 8) + stacks2[i-j]; } - if (signStack) { - switch (bitStack) { - case 1: - stacks.append(QString::number(((qint8) stackelem), systemStack)); - break; - case 2: - stacks.append(QString::number(stackelem, systemStack)); - break; - case 4: - stacks.append(QString::number(stackelem, systemStack)); - break; - case 8: - default: - stacks.append(QString::number(stackelem, systemStack)); - } - } else { - stacks.append(QString::number(stackelem, systemStack)); - } + if (signStack) + stacks.append(signedNumberStack(stackelem)); + else + stacks.append(QString::number(stackelem, systemStack)); } exit2: if(stacks.size()>=100) @@ -1156,18 +1142,24 @@ void Debugger::processActionMiMode(QString output, QString error) // convert unsinged to signed and add - QString Debugger::signedNumberStack(quint64 value) { - if ((value&(1<<(bitStack*8-1))) > 0) { - switch (bitStack) { - case 1: - return QString("-") + QString::number(((-1*((qint8)value))&0xff), systemStack); - case 2: - return QString("-") + QString::number(((-1*((qint16)value))&0xffff), systemStack); - case 4: - return QString("-") + QString::number(((-1*((qint32)value))&0xffffffff), systemStack); - case 8: - default: - return QString("-") + QString::number((-1*((qint64)value)), systemStack); - } + switch (bitStack) { + case 1: + if ((value&0x80) > 0) + return QString("-") + QString::number(((-1*((qint8)value))&0xff), systemStack); + break; + case 2: + if ((value&0x8000) > 0) + return QString("-") + QString::number(((-1*((qint16)value))&0xffff), systemStack); + break; + case 4: + if ((value&0x80000000) > 0) + return QString("-") + QString::number(((-1*((qint32)value))&0xffffffff), systemStack); + break; + case 8: + default: + if ((value&0x8000000000000000) > 0) + return QString("-") + QString::number((-1*((qint64)value)), systemStack); + break; } return QString::number(value, systemStack); } From bcbe84adefab919897d01d6722818e395e10e5bd Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 16 Apr 2021 13:47:54 +0200 Subject: [PATCH 34/86] fixedStack for x86 Mode --- debugger.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 24ea0dff..266fe8cc 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -1068,8 +1068,12 @@ void Debugger::processActionMiMode(QString output, QString error) if (firstStack){ firstStack = false; index = r.indexIn(output); - if(index != -1) - stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - 8; + if(index != -1){ + if (settings.value("mode", QString("x86")).toString() == "x86") + stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - 8; + else + stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - 4; + } return; } QString info; @@ -1158,7 +1162,7 @@ QString Debugger::signedNumberStack(quint64 value) { case 8: default: if ((value&0x8000000000000000) > 0) - return QString("-") + QString::number((-1*((qint64)value)), systemStack); + return QString("-") + QString::number((-1*((qint64)value)), systemStack); //falls mit führender Null: QStringLiteral("%1").arg((-1*((qint64)value)), 63, systemStack, QLatin1Char('0')); break; } return QString::number(value, systemStack); From 424e651add0f5ef3f79a437b0e02296380ad7715 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 16 Apr 2021 13:52:19 +0200 Subject: [PATCH 35/86] fixedStack for x86 Mode --- debugger.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 266fe8cc..9ef09117 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -84,10 +84,14 @@ Debugger::Debugger(QTextEdit *tEdit, bool Debugger::run() { + QSettings settings("SASM Project", "SASM"); + if (settings.value("mode", QString("x86")).toString() == "x86") + addressSizeOffset = 4; + else + addressSizeOffset = 8; #ifdef Q_OS_WIN32 QString gdb; QString objdump; - QSettings settings("SASM Project", "SASM"); wincrflag++; if (settings.value("mode", QString("x86")).toString() == "x86") { gdb = QCoreApplication::applicationDirPath() + "/MinGW/bin/gdb.exe"; @@ -593,7 +597,7 @@ void Debugger::processAction(QString output, QString error) firstStack = false; index = r.indexIn(output); if(index != -1) - stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - 8; + stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - addressSizeOffset; return; } QString info; @@ -1068,12 +1072,8 @@ void Debugger::processActionMiMode(QString output, QString error) if (firstStack){ firstStack = false; index = r.indexIn(output); - if(index != -1){ - if (settings.value("mode", QString("x86")).toString() == "x86") - stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - 8; - else - stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - 4; - } + if(index != -1) + stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - addressSizeOffset; return; } QString info; From 4effd6837c7e3dbeae5498e8e3aa62f3b988e535 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 16 Apr 2021 13:52:31 +0200 Subject: [PATCH 36/86] fixedStack for x86 Mode --- debugger.h | 1 + 1 file changed, 1 insertion(+) diff --git a/debugger.h b/debugger.h index 7e78ebba..4b668482 100644 --- a/debugger.h +++ b/debugger.h @@ -187,6 +187,7 @@ class Debugger : public QObject int bitStack; int systemStack; bool signStack; + int addressSizeOffset; public slots: void readOutputToBuffer(); From 32182f6764b4f62b4ff04adad38cf1d84632da29 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 16 Apr 2021 14:01:58 +0200 Subject: [PATCH 37/86] fixed address overflow --- debugger.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index 9ef09117..b3c6f658 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -603,13 +603,13 @@ void Debugger::processAction(QString output, QString error) QString info; quint64 address; quint64 value; - index = output.indexOf(QString("Cannot access memory")); - if (index != -1){ - emit printLog(QString("Error showing stack"), Qt::red); - return; - } for (int i = 0; !stackStream.atEnd(); i++) { stackStream >> info; + index = info.indexOf(QString("Cannot access memory")); + if (index != -1){ + emit printLog(QString("Error showing stack"), Qt::red); + return; + } index = r.indexIn(info); address = info.mid(index, r.matchedLength()).toULongLong(0, 16); if (index == -1 || address >= stackBottom) { @@ -1079,13 +1079,13 @@ void Debugger::processActionMiMode(QString output, QString error) QString info; quint64 address; quint64 value; - index = output.indexOf(QString("Cannot access memory")); - if (index != -1){ - emit printLog(QString("Error showing stack"), Qt::red); - return; - } for (int i = 0; !stackStream.atEnd(); i++) { stackStream >> info; + index = info.indexOf(QString("Cannot access memory")); + if (index != -1){ + emit printLog(QString("Error showing stack"), Qt::red); + return; + } if (info.at(0) != QChar('~')||info.indexOf(QString("~\"\\n\""))!=-1) { continue; } From 69dfabb5b49132eb6d9624eed9959ff5856bca76 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Thu, 22 Apr 2021 20:08:31 +0200 Subject: [PATCH 38/86] added addresses for stackcontent --- debugger.cpp | 98 +++++++++++++++++++++++++++----------------- debugger.h | 7 +++- debugtablewidget.cpp | 20 +++++---- debugtablewidget.h | 4 +- mainwindow.cpp | 4 +- stackwidget.cpp | 2 +- 6 files changed, 84 insertions(+), 51 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index b3c6f658..b5d10de8 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -589,7 +589,7 @@ void Debugger::processAction(QString output, QString error) if (actionType == infoStack) { QTextStream stackStream(&output); - QList stacks; + QList stacks; QList stacks2; QRegExp r = QRegExp("0x[0-9a-fA-F]{6,12}"); int index; @@ -600,29 +600,29 @@ void Debugger::processAction(QString output, QString error) stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - addressSizeOffset; return; } - QString info; + stackInfo info; quint64 address; quint64 value; for (int i = 0; !stackStream.atEnd(); i++) { - stackStream >> info; - index = info.indexOf(QString("Cannot access memory")); + stackStream >> info.value; + index = info.value.indexOf(QString("Cannot access memory")); if (index != -1){ emit printLog(QString("Error showing stack"), Qt::red); return; } - index = r.indexIn(info); - address = info.mid(index, r.matchedLength()).toULongLong(0, 16); + index = r.indexIn(info.value); + address = info.value.mid(index, r.matchedLength()).toULongLong(0, 16); if (index == -1 || address >= stackBottom) { break; } for(int j = 0; j < 2; j++){ - stackStream >> info; - index = r.indexIn(info); - value = info.mid(index, r.matchedLength()).toULongLong(0, 16); - stackStream >> info; - index = r.indexIn(info); - value += (info.mid(index, r.matchedLength()).toULongLong(0, 16)) << 32; + stackStream >> info.value; + index = r.indexIn(info.value); + value = info.value.mid(index, r.matchedLength()).toULongLong(0, 16); + stackStream >> info.value; + index = r.indexIn(info.value); + value += (info.value.mid(index, r.matchedLength()).toULongLong(0, 16)) << 32; for(int k = 0; k < 8; k++){ //per line if (address + k + j*8 >= stackBottom) { goto exit; @@ -633,23 +633,34 @@ void Debugger::processAction(QString output, QString error) } exit: quint64 stackelem; + stackInfo bottom; + bottom.address = QString("0x") + QString::number(stackBottom, 16); + bottom.value = QString("Bottom"); + stacks.append(bottom); for (int i = stacks2.size()-1; i >= 0; i-=bitStack){ stackelem = stacks2[i]; for (int j = 1; j < bitStack; j++){ if (i-j<0){ - stacks.append(QString("(+") + QString::number(bitStack-j) + QString(" unused Byte) ") + QString::number(stackelem, systemStack)); + info.value = QString("(+") + QString::number(bitStack-j) + QString(" unused Byte) ") + QString::number(stackelem, systemStack); + info.address = QString("0x") + QString::number(stackBottom-bitStack-(stacks2.size()-1-i), 16); + stacks.append(info); goto exit2; } stackelem = (stackelem << 8) + stacks2[i-j]; } if (signStack) - stacks.append(signedNumberStack(stackelem)); + info.value = signedNumberStack(stackelem); else - stacks.append(QString::number(stackelem, systemStack)); + info.value = QString::number(stackelem, systemStack); + info.address = QString("0x") + QString::number(stackBottom-bitStack-(stacks2.size()-1-i), 16); + stacks.append(info); } exit2: - if(stacks.size()>=100) - stacks.append(QString("...")); + if(stacks.size()>=100){ + info.address = QString(""); + info.value = QString("..."); + stacks.append(info); + } emit printStack(stacks); return; } @@ -1065,7 +1076,7 @@ void Debugger::processActionMiMode(QString output, QString error) if (actionType == infoStack) { QTextStream stackStream(&output); - QList stacks; + QList stacks; QList stacks2; QRegExp r = QRegExp("0x[0-9a-fA-F]{6,12}"); int index; @@ -1076,34 +1087,34 @@ void Debugger::processActionMiMode(QString output, QString error) stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - addressSizeOffset; return; } - QString info; + stackInfo info; quint64 address; quint64 value; for (int i = 0; !stackStream.atEnd(); i++) { - stackStream >> info; - index = info.indexOf(QString("Cannot access memory")); + stackStream >> info.value; + index = info.value.indexOf(QString("Cannot access memory")); if (index != -1){ emit printLog(QString("Error showing stack"), Qt::red); return; } - if (info.at(0) != QChar('~')||info.indexOf(QString("~\"\\n\""))!=-1) { + if (info.value.at(0) != QChar('~')||info.value.indexOf(QString("~\"\\n\"")) != -1) { continue; } - info.remove(QRegExp("~|\"|\\\\n")); - QList stackLine = info.split(QString("\\t")); - index = r.indexIn(info); - address = info.mid(index, r.matchedLength()).toULongLong(0, 16); + info.value.remove(QRegExp("~|\"|\\\\n")); + QList stackLine = info.value.split(QString("\\t")); + index = r.indexIn(info.value); + address = info.value.mid(index, r.matchedLength()).toULongLong(0, 16); if (index == -1 || address >= stackBottom) { break; } for(int j = 0; j < 2; j++){ - info = stackLine[j*2+1]; - index = r.indexIn(info); - value = info.mid(index, r.matchedLength()).toULongLong(0, 16); - info = stackLine[j*2+2]; - index = r.indexIn(info); - value += (info.mid(index, r.matchedLength()).toULongLong(0, 16)) << 32; + info.value = stackLine[j*2+1]; + index = r.indexIn(info.value); + value = info.value.mid(index, r.matchedLength()).toULongLong(0, 16); + info.value = stackLine[j*2+2]; + index = r.indexIn(info.value); + value += (info.value.mid(index, r.matchedLength()).toULongLong(0, 16)) << 32; for(int k = 0; k < 8; k++){ //per line if (address + k + j*8 >= stackBottom) { goto exit; @@ -1114,25 +1125,36 @@ void Debugger::processActionMiMode(QString output, QString error) } exit: quint64 stackelem; + stackInfo bottom; + bottom.address = QString("0x") + QString::number(stackBottom, 16); + bottom.value = QString("Bottom"); + stacks.append(bottom); for (int i = stacks2.size()-1; i >= 0; i-=bitStack){ stackelem = stacks2[i]; for (int j = 1; j < bitStack; j++){ if (i-j<0){ - stacks.append(QString("(+") + QString::number(bitStack-j) + QString(" unused Byte) ") + QString::number(stackelem, systemStack)); + info.value = QString("(+") + QString::number(bitStack-j) + QString(" unused Byte) ") + QString::number(stackelem, systemStack); + info.address = QString("0x") + QString::number(stackBottom-bitStack-(stacks2.size()-1-i), 16); + stacks.append(info); goto exit2; } stackelem = (stackelem << 8) + stacks2[i-j]; } if (signStack) - stacks.append(signedNumberStack(stackelem)); + info.value = signedNumberStack(stackelem); else - stacks.append(QString::number(stackelem, systemStack)); + info.value = QString::number(stackelem, systemStack); + info.address = QString("0x") + QString::number(stackBottom-bitStack-(stacks2.size()-1-i), 16); + stacks.append(info); } exit2: - if(stacks.size()>=100) - stacks.append(QString("...")); + if(stacks.size()>=100){ + info.address = QString(""); + info.value = QString("..."); + stacks.append(info); + } emit printStack(stacks); - return; + return; } diff --git a/debugger.h b/debugger.h index 4b668482..a10a702e 100644 --- a/debugger.h +++ b/debugger.h @@ -104,6 +104,11 @@ class Debugger : public QObject bool isValid; }; + struct stackInfo { + QString value; + QString address; + }; + typedef Assembler::LineNum LineNum; bool isStopped(); @@ -211,7 +216,7 @@ public slots: //! Signal is emited when debugger is ready to get commands like step into and etc. void started(); void printRegisters(QList); - void printStack(QList); + void printStack(QList); void printMemory(QList); void printLog(QString msg, QColor color = QColor(Qt::black)); void printOutput(QString msg); diff --git a/debugtablewidget.cpp b/debugtablewidget.cpp index 1611d2eb..cc9ee713 100644 --- a/debugtablewidget.cpp +++ b/debugtablewidget.cpp @@ -84,11 +84,12 @@ DebugTableWidget::DebugTableWidget(int rows, int columns, DebugTableWidgetType w if (type == stackTable) { setSelectionMode(QAbstractItemView::NoSelection); QStringList header; - header << "Stack"; + header << "Address" << "Stack-top"; setHorizontalHeaderLabels(header); + //setResizeMode(QHeaderView::ResizeToContents) horizontalHeader()->setStretchLastSection(true); setWindowTitle(tr("Stack")); - addStack(QString("Bottom")); + addStack(QString(" -- "), QString("Bottom")); resizeColumnsToContents(); if (geometryStackSaved) restoreGeometry(stackWindowState); @@ -126,12 +127,11 @@ void DebugTableWidget::setValuesFromDebugger(QList regi } } -void DebugTableWidget::setValuesFromDebugger(QList stacks) //the stack +void DebugTableWidget::setValuesFromDebugger(QList stacks) //the stack { setRowCount(0); - addStack(QString("Bottom")); for (int i = 0; i < stacks.size(); i++) - addStack(stacks[i]); + addStack(stacks[i].value, stacks[i].address); show(); if (firstTime) { firstTime = false; @@ -242,7 +242,7 @@ void DebugTableWidget::addRegister(const QString &name, const QString &hexValue, } } -void DebugTableWidget::addStack(const QString &hexValue) +void DebugTableWidget::addStack(const QString &hexValue, const QString &address) { empty = false; if (type == stackTable) { @@ -252,9 +252,15 @@ void DebugTableWidget::addStack(const QString &hexValue) hexValueItem->setTextAlignment(Qt::AlignCenter); hexValueItem->setFont(monoFont); hexValueItem->setFlags(Qt::ItemIsEnabled); + QTableWidgetItem *addressItem = new QTableWidgetItem(address); + addressItem->setTextAlignment(Qt::AlignCenter); + addressItem->setFont(monoFont); + addressItem->setFlags(Qt::ItemIsEnabled); insertRow(0); - setItem(0, 0, hexValueItem); + setItem(0, 1, hexValueItem); + setItem(0, 0, addressItem); } + resizeColumnsToContents(); } bool DebugTableWidget::isEmpty() diff --git a/debugtablewidget.h b/debugtablewidget.h index 00e95ad0..1bcc6cd0 100644 --- a/debugtablewidget.h +++ b/debugtablewidget.h @@ -59,11 +59,11 @@ public slots: void addVariable(const RuQPlainTextEdit::Watch &variable, int rowNumber = -1); void changeVariableValue(const QString &value, int rowNumber, bool isValid); void addRegister(const QString &name, const QString &hexValue, const QString &decValue, int rowNumber); - void addStack(const QString &hexValue); + void addStack(const QString &hexValue, const QString &address); void changeMemoryWindow(int row, int column); void setValuesFromDebugger(QList watches); void setValuesFromDebugger(QList registers); - void setValuesFromDebugger(QList stacks); + void setValuesFromDebugger(QList stacks); private: int contextMenuLineNumber; diff --git a/mainwindow.cpp b/mainwindow.cpp index 8fdf9dbf..08e7e869 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1434,8 +1434,8 @@ void MainWindow::debugShowStack() stackWindow = new StackWidget; connect(stackWindow, SIGNAL(closeSignal()), this, SLOT(setShowStackToUnchecked())); - connect(debugger, SIGNAL(printStack(QList)), - stackWindow->stackContent, SLOT(setValuesFromDebugger(QList))); + connect(debugger, SIGNAL(printStack(QList)), + stackWindow->stackContent, SLOT(setValuesFromDebugger(QList))); connect(stackWindow->settings, SIGNAL(stacksettingsChanged()), this, SLOT(debugShowStack()), Qt::QueuedConnection); stackDock->setWidget(stackWindow); diff --git a/stackwidget.cpp b/stackwidget.cpp index 542c7efd..a2e68baf 100644 --- a/stackwidget.cpp +++ b/stackwidget.cpp @@ -45,7 +45,7 @@ StackWidget::StackWidget(QWidget *parent) : QWidget(parent) { layout = new QVBoxLayout(this); - stackContent = new DebugTableWidget(0, 1, stackTable, this);; + stackContent = new DebugTableWidget(0, 2, stackTable, this);; settings = new StackSettingsWidget; layout->addWidget(settings); From d2ac446ca851e22db9cff4699220cc78b0c83362 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Thu, 6 May 2021 09:59:52 +0200 Subject: [PATCH 39/86] first attemp for display under Linux --- Linux/share/sasm/NASM/macro.c | 39 +++++++++++ Linux/share/sasm/include/io64.inc | 8 +++ SASM.pro | 6 +- displayWindow.cpp | 104 ++++++++++++++++++++++++++++++ displayWindow.h | 82 +++++++++++++++++++++++ mainwindow.cpp | 31 +++++++-- mainwindow.h | 12 ++++ 7 files changed, 275 insertions(+), 7 deletions(-) create mode 100644 displayWindow.cpp create mode 100644 displayWindow.h diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index d73ccf78..2ab6dd5c 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -1,5 +1,44 @@ #include #include + +#include +#include + FILE *get_stdin(void) { return stdin; } FILE *get_stdout(void) { return stdout; } void sasm_replace_stdin(void) {dup2(open("input.txt",0),0);} + +struct mesg_buffer { + long mesg_type; + char mesg_text[1024]; +} message; + +int msgid = 0; + +/*void setup(){ + key = ftok("progfile", 65); + msgid = msgget(key, 0666 | IPC_CREAT); + message.mesg_type = 1; + strcpy(message.mesg_text, "Hi"); +} + +void update(){ + msgsnd(msgid, &message, sizeof(message), 0); +}*/ + +void update(char* data){ + if (msgid == 0){ + msgid = msgget(ftok("progfile", 65), 0666 | IPC_CREAT); + message.mesg_type = 1; + strcpy(message.mesg_text, "empty"); + } + strcpy(message.mesg_text, data); + msgsnd(msgid, &message, sizeof(message), 0); +} + +void printSomething(char* a){ + printf("Geben Sie ein paar Wörter ein: %s\n", a); + //scanf("%9s", &string[0]); + + //printf("Ihre Eingabe: %s\n",string); +} diff --git a/Linux/share/sasm/include/io64.inc b/Linux/share/sasm/include/io64.inc index a65814a8..10670975 100644 --- a/Linux/share/sasm/include/io64.inc +++ b/Linux/share/sasm/include/io64.inc @@ -44,6 +44,14 @@ CEXTERN fflush CEXTERN get_stdin CEXTERN get_stdout +CEXTERN printSomething +CEXTERN update +%macro updateDisplay 1.nolist + mov rdi, %1 + call update +%endmacro + + ; Make stack be 16 bytes aligned %macro ALIGN_STACK 0.nolist enter 0, 0 diff --git a/SASM.pro b/SASM.pro index fd3925c1..563988de 100644 --- a/SASM.pro +++ b/SASM.pro @@ -72,7 +72,8 @@ SOURCES += main.cpp\ masm.cpp \ gccbasedassembler.cpp \ stacksettingswidget.cpp \ - stackwidget.cpp + stackwidget.cpp \ + displayWindow.cpp HEADERS += mainwindow.h \ tab.h \ @@ -95,7 +96,8 @@ HEADERS += mainwindow.h \ masm.h \ gccbasedassembler.h \ stacksettingswidget.h \ - stackwidget.h + stackwidget.h \ + displayWindow.h FORMS += settings.ui diff --git a/displayWindow.cpp b/displayWindow.cpp new file mode 100644 index 00000000..70ba041a --- /dev/null +++ b/displayWindow.cpp @@ -0,0 +1,104 @@ +/**************************************************************************** +** SASM - simple IDE for assembler development +** Copyright (C) 2013 Dmitriy Manushin +** Contact: site: http://dman95.github.io/SASM/ +** e-mail: Dman1095@gmail.com +** +** This file is part of SASM. +** +** SASM is free software: you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation, either version 3 of the License, or +** (at your option) any later version. +** +** SASM is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with SASM. If not, see . +** +** Этот файл — часть SASM. +** +** SASM - свободная программа: вы можете перераспространять ее и/или +** изменять ее на условиях Стандартной общественной лицензии GNU в том виде, +** в каком она была опубликована Фондом свободного программного обеспечения; +** либо версии 3 лицензии, либо (по вашему выбору) любой более поздней +** версии. +** +** SASM распространяется в надежде, что она будет полезной, +** но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА +** или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Стандартной +** общественной лицензии GNU. +** +** Вы должны были получить копию Стандартной общественной лицензии GNU +** вместе с этой программой. Если это не так, см. +** .) +** +****************************************************************************/ + +#include "displayWindow.h" + + +DisplayWindow::DisplayWindow(QWidget *parent) : + QWidget(parent) +{ + width = 500; + height = 500; + layout = new QVBoxLayout(this); + display = new QWidget; + display->setGeometry(0,0,width,height); + display->resize(maximumSize()); + settings = new QComboBox; + QStringList sizeBoxList; + sizeBoxList << QString("400x400") << QString("500x500") << QString("600x600"); + //sizeBoxList << QString::number(settings->iconSize().height()); + settings->insertItems(0, sizeBoxList); + + layout->addWidget(settings, 0, Qt::AlignTop); + layout->addWidget(display); + + layout->setSpacing(0); + layout->setMargin(0); + + setLayout(layout); +} + +void DisplayWindow::changeDisplay(int msgid){ + while(1){ + // msgrcv to receive message + msgrcv(msgid, &message, sizeof(message), 0, 0); + + if (message.mesg_type == 2){ + break; + } + // display the message + std::cout << "Data Received in :"; + for(int i = 0; i < 1024; i++){ + std::cout << message.mesg_text[i] << " "; + } + std::cout << "\n"; + } + msgctl(msgid, IPC_RMID, NULL); + emit closeDisplay(); +} + +void DisplayWindow::finish(int msgid){ + mesg_buffer end; + end.mesg_type = 2; + strcpy(end.mesg_text, "end"); + //send default message type == 2 means end + if(msgsnd(msgid, &end, sizeof(end), 0) < 0) + printf("error finish... "); +} + +void DisplayWindow::closeEvent(QCloseEvent *) { + emit closeSignal(); +} + +DisplayWindow::~DisplayWindow() +{ + delete display; + delete layout; +} diff --git a/displayWindow.h b/displayWindow.h new file mode 100644 index 00000000..2d79ec29 --- /dev/null +++ b/displayWindow.h @@ -0,0 +1,82 @@ +/**************************************************************************** +** SASM - simple IDE for assembler development +** Copyright (C) 2013 Dmitriy Manushin +** Contact: site: http://dman95.github.io/SASM/ +** e-mail: Dman1095@gmail.com +** +** This file is part of SASM. +** +** SASM is free software: you can redistribute it and/or modify +** it under the terms of the GNU General Public License as published by +** the Free Software Foundation, either version 3 of the License, or +** (at your option) any later version. +** +** SASM is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +** GNU General Public License for more details. +** +** You should have received a copy of the GNU General Public License +** along with SASM. If not, see . +** +** Этот файл — часть SASM. +** +** SASM - свободная программа: вы можете перераспространять ее и/или +** изменять ее на условиях Стандартной общественной лицензии GNU в том виде, +** в каком она была опубликована Фондом свободного программного обеспечения; +** либо версии 3 лицензии, либо (по вашему выбору) любой более поздней +** версии. +** +** SASM распространяется в надежде, что она будет полезной, +** но БЕЗО ВСЯКИХ ГАРАНТИЙ; даже без неявной гарантии ТОВАРНОГО ВИДА +** или ПРИГОДНОСТИ ДЛЯ ОПРЕДЕЛЕННЫХ ЦЕЛЕЙ. Подробнее см. в Стандартной +** общественной лицензии GNU. +** +** Вы должны были получить копию Стандартной общественной лицензии GNU +** вместе с этой программой. Если это не так, см. +** .) +** +****************************************************************************/ + +#ifndef DISPLAYWINDOW_H +#define DISPLAYWINDOW_H + +#include +#include +#include +#include +#include +#include +#include + +class DisplayWindow : public QWidget +{ + Q_OBJECT +public: + struct mesg_buffer { + long mesg_type; + char mesg_text[1024]; + } message; + + explicit DisplayWindow(QWidget *parent = 0); + ~DisplayWindow(); + void changeDisplay(int msgid); + void finish(int msgid); + +protected: + void closeEvent(QCloseEvent *); + +private: + QVBoxLayout *layout; + QWidget *display; + QComboBox *settings; + int height; + int width; + +signals: + void displayChanged(void); + void closeSignal(); + void closeDisplay(); +}; + +#endif diff --git a/mainwindow.cpp b/mainwindow.cpp index 08e7e869..fb213e16 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -769,6 +769,7 @@ void MainWindow::closeAllChildWindows() delete stackWindow; stackWindow = 0; } + } bool MainWindow::deleteTab(int index, bool saveFileName) @@ -1025,7 +1026,7 @@ void MainWindow::buildProgram(bool debugMode) programIsBuilded = true; } } - +//TODO void MainWindow::runProgram() { if (!programStopped) { @@ -1106,7 +1107,7 @@ void MainWindow::testStopOfProgram() timer->stop(); } } - +//TODO void MainWindow::runExeProgram() { if (!programIsBuilded) { @@ -1203,9 +1204,19 @@ void MainWindow::debug() //! Determine input path QString inputPath = Common::pathInTemp("input.txt"); inputPath.replace("\\", "/"); - + + // start display + key_t key = ftok("progfile", 65); + displaywdg = new DisplayWindow; + displaywdg->setWindowIcon(QIcon(":images/mainIcon.png")); + displaywdg->setFixedSize(500,525); + displaywdg->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); + displaywdg->show(); + msgid = msgget(key, 0666 | IPC_CREAT); + consumer = new std::thread(&DisplayWindow::changeDisplay, displaywdg, msgid); + debugger = new Debugger(compilerOut, exePath, workingDirectoryPath, inputPath, assembler, 0, settings.value("sasmverbose", false).toBool(), settings.value("mi", false).toBool()); -// connect print signals for output in Debugger + // connect print signals for output in Debugger connect(debugger, SIGNAL(printLog(QString,QColor)), this, SLOT(printLog(QString,QColor))); connect(debugger, SIGNAL(printOutput(QString)), this, SLOT(printOutput(QString))); connect(debugger, SIGNAL(highlightLine(int)), code, SLOT(updateDebugLine(int))); @@ -1564,7 +1575,7 @@ void MainWindow::setShowStackToUnchecked() { debugShowStackAction->setChecked(false); } - +//TODO void MainWindow::debugExit() { settings.setValue("debugregisters", debugShowRegistersAction->isChecked()); @@ -1579,6 +1590,9 @@ void MainWindow::debugExit() code->setDebugDisabled(); //! Many actions performed here - deleting of highlighting too delete debugger; + // close display: + connect(displaywdg, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); + displaywdg->finish(msgid); debugger = 0; closeAnyCommandWidget(); debugShowRegistersAction->setChecked(false); @@ -1588,6 +1602,13 @@ void MainWindow::debugExit() disableDebugActions(); } +void MainWindow::closeDisplay(){ + displaywdg->close(); + //TODO + //delete displaywdg; + //displaywdg = 0; +} + void MainWindow::showAnyCommandWidget() { debugAnyCommandWidget->show(); diff --git a/mainwindow.h b/mainwindow.h index 7c1ca670..44eb8630 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -59,6 +59,9 @@ #include #include #include +#include +#include +#include #include "tab.h" #include "highlighter.h" #include "debugger.h" @@ -76,6 +79,7 @@ #include "signallocker.h" #include "masm.h" #include "stackwidget.h" +#include "displayWindow.h" #define SASM_VERSION "3.12.1" @@ -226,6 +230,11 @@ class MainWindow : public QMainWindow //! About close bool closeFromCloseAll; void closeEvent(QCloseEvent *e); + + // display + DisplayWindow *displaywdg; + std::thread *consumer; + int msgid; public slots: //! Actions and Menus @@ -311,6 +320,9 @@ public slots: //! Single Application message void onMessageReceived(const QString &message); + + //display + void closeDisplay(); protected: void dragEnterEvent(QDragEnterEvent *event); From d9f087b84b42cf443efeb764df03d231cb7b9f67 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sat, 8 May 2021 09:46:16 +0200 Subject: [PATCH 40/86] added new displayWindow --- Linux/share/sasm/NASM/macro.c | 5 ++- Linux/share/sasm/Projects/NASMHellox64.asm | 1 - displayWindow.cpp | 45 ++++++++++++---------- displayWindow.h | 15 ++++---- mainwindow.cpp | 16 +++++++- mainwindow.h | 1 + 6 files changed, 51 insertions(+), 32 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index 2ab6dd5c..90e03388 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -10,7 +10,7 @@ void sasm_replace_stdin(void) {dup2(open("input.txt",0),0);} struct mesg_buffer { long mesg_type; - char mesg_text[1024]; + char mesg_text[256]; } message; int msgid = 0; @@ -32,7 +32,8 @@ void update(char* data){ message.mesg_type = 1; strcpy(message.mesg_text, "empty"); } - strcpy(message.mesg_text, data); + for(int i = 0; i < 1024; i++) + message.mesg_text[i] = data[i]; msgsnd(msgid, &message, sizeof(message), 0); } diff --git a/Linux/share/sasm/Projects/NASMHellox64.asm b/Linux/share/sasm/Projects/NASMHellox64.asm index 4aafacad..8bda95de 100644 --- a/Linux/share/sasm/Projects/NASMHellox64.asm +++ b/Linux/share/sasm/Projects/NASMHellox64.asm @@ -8,6 +8,5 @@ section .text CMAIN: mov rbp, rsp PRINT_STRING msg - NEWLINE xor rax, rax ret \ No newline at end of file diff --git a/displayWindow.cpp b/displayWindow.cpp index 70ba041a..bedc4a80 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -44,25 +44,21 @@ DisplayWindow::DisplayWindow(QWidget *parent) : QWidget(parent) { - width = 500; - height = 500; + this->setStyleSheet("background-color:grey;"); layout = new QVBoxLayout(this); - display = new QWidget; - display->setGeometry(0,0,width,height); - display->resize(maximumSize()); - settings = new QComboBox; - QStringList sizeBoxList; - sizeBoxList << QString("400x400") << QString("500x500") << QString("600x600"); - //sizeBoxList << QString::number(settings->iconSize().height()); - settings->insertItems(0, sizeBoxList); - layout->addWidget(settings, 0, Qt::AlignTop); - layout->addWidget(display); + // white = new QRgb(255, 255, 255); + // black = new QRgb(0, 0, 0); - layout->setSpacing(0); - layout->setMargin(0); + displayImageLabel = new QLabel(""); + displayPicture = new QImage(480, 480, QImage::Format_RGB32); + displayPicture->fill(qRgb(255, 255, 255)); + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + + layout->addWidget(displayImageLabel, Qt::AlignTop); setLayout(layout); + this->resize(displayPicture->size()); } void DisplayWindow::changeDisplay(int msgid){ @@ -73,12 +69,21 @@ void DisplayWindow::changeDisplay(int msgid){ if (message.mesg_type == 2){ break; } - // display the message - std::cout << "Data Received in :"; - for(int i = 0; i < 1024; i++){ - std::cout << message.mesg_text[i] << " "; + // display the message and print on display + //std::cout << "Data Received in :"; + displayPicture->fill(qRgb(255, 255, 255)); + for(int i = 0; i < 256; i++){ + //std::cout << + message.mesg_text[i] << " "; + if(message.mesg_text[i]) { + for(int j = 0; j < 60; j++){ + for(int k = 0; k < 60; k++){ + displayPicture->setPixel((i%8)*60+j, i/8*60+k, qRgb(0, 0, 0)); + }} + //displayPicture->setPixel((i%32)*15, i/32*15, qRgb(0, 0, 0)); + } } - std::cout << "\n"; + //std::cout << "\n"; + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); } msgctl(msgid, IPC_RMID, NULL); emit closeDisplay(); @@ -99,6 +104,6 @@ void DisplayWindow::closeEvent(QCloseEvent *) { DisplayWindow::~DisplayWindow() { - delete display; + delete displayImageLabel; delete layout; } diff --git a/displayWindow.h b/displayWindow.h index 2d79ec29..24b031c3 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -42,8 +42,9 @@ #define DISPLAYWINDOW_H #include -#include -#include +#include +#include +#include #include #include #include @@ -55,7 +56,7 @@ class DisplayWindow : public QWidget public: struct mesg_buffer { long mesg_type; - char mesg_text[1024]; + char mesg_text[256]; } message; explicit DisplayWindow(QWidget *parent = 0); @@ -67,11 +68,9 @@ class DisplayWindow : public QWidget void closeEvent(QCloseEvent *); private: - QVBoxLayout *layout; - QWidget *display; - QComboBox *settings; - int height; - int width; + QVBoxLayout *layout; + QImage* displayPicture; + QLabel* displayImageLabel; signals: void displayChanged(void); diff --git a/mainwindow.cpp b/mainwindow.cpp index fb213e16..e76cb63e 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1056,6 +1056,16 @@ void MainWindow::runProgram() QString program = Common::pathInTemp("SASMprog.exe"); runProcess->setStandardInputFile(input); + + // start display + key_t key = ftok("progfile", 65); + displaywdg = new DisplayWindow; + displaywdg->setWindowIcon(QIcon(":images/mainIcon.png")); + displaywdg->setFixedSize(500,525); + displaywdg->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); + displaywdg->show(); + msgid = msgget(key, 0666 | IPC_CREAT); + consumer = new std::thread(&DisplayWindow::changeDisplay, displaywdg, msgid); //! Run program in code directory if it exists QString codePath = currentTab->getCurrentFilePath(); @@ -1093,6 +1103,8 @@ void MainWindow::testStopOfProgram() stopAction->setEnabled(false); debugAction->setEnabled(true); buildAction->setEnabled(true); + connect(displaywdg, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); + displaywdg->finish(msgid); if (!programStopped) { if (runProcess->exitStatus() == QProcess::NormalExit) printLogWithTime(tr("The program finished normally. Execution time: %1 s") @@ -1209,7 +1221,7 @@ void MainWindow::debug() key_t key = ftok("progfile", 65); displaywdg = new DisplayWindow; displaywdg->setWindowIcon(QIcon(":images/mainIcon.png")); - displaywdg->setFixedSize(500,525); + //displaywdg->setFixedSize(500,525); displaywdg->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); displaywdg->show(); msgid = msgget(key, 0666 | IPC_CREAT); @@ -1603,7 +1615,9 @@ void MainWindow::debugExit() } void MainWindow::closeDisplay(){ + usleep(100); displaywdg->close(); + disconnect(displaywdg, SIGNAL(closeDisplay()), this, SLOT(closeDisplay())); //TODO //delete displaywdg; //displaywdg = 0; diff --git a/mainwindow.h b/mainwindow.h index 44eb8630..6356f45e 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -80,6 +80,7 @@ #include "masm.h" #include "stackwidget.h" #include "displayWindow.h" +#include #define SASM_VERSION "3.12.1" From cf0210b26417b32dc95bb4a0a01c0d584fc4cc84 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 10 May 2021 09:15:50 +0200 Subject: [PATCH 41/86] added Windows compile flag --- displayWindow.cpp | 3 +++ displayWindow.h | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index bedc4a80..b3a550bf 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -62,6 +62,8 @@ DisplayWindow::DisplayWindow(QWidget *parent) : } void DisplayWindow::changeDisplay(int msgid){ + #ifdef Q_OS_WIN32 + #else while(1){ // msgrcv to receive message msgrcv(msgid, &message, sizeof(message), 0, 0); @@ -87,6 +89,7 @@ void DisplayWindow::changeDisplay(int msgid){ } msgctl(msgid, IPC_RMID, NULL); emit closeDisplay(); + #endif } void DisplayWindow::finish(int msgid){ diff --git a/displayWindow.h b/displayWindow.h index 24b031c3..4f976ae7 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -45,10 +45,13 @@ #include #include #include -#include -#include #include #include +#ifdef Q_OS_WIN32 +#else +#include +#include +#endif class DisplayWindow : public QWidget { From aa41d6c29f17c24dfb4adef4944984c39962c856 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 10 May 2021 09:18:48 +0200 Subject: [PATCH 42/86] added Windows compile flag --- displayWindow.cpp | 3 +++ mainwindow.h | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index b3a550bf..ed68f0c5 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -93,12 +93,15 @@ void DisplayWindow::changeDisplay(int msgid){ } void DisplayWindow::finish(int msgid){ + #ifdef Q_OS_WIN32 + #else mesg_buffer end; end.mesg_type = 2; strcpy(end.mesg_text, "end"); //send default message type == 2 means end if(msgsnd(msgid, &end, sizeof(end), 0) < 0) printf("error finish... "); + #endif } void DisplayWindow::closeEvent(QCloseEvent *) { diff --git a/mainwindow.h b/mainwindow.h index 6356f45e..9f8e1740 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -60,8 +60,6 @@ #include #include #include -#include -#include #include "tab.h" #include "highlighter.h" #include "debugger.h" From ea89ba3d2997977607a927c71752a685594ffb74 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 10 May 2021 09:23:00 +0200 Subject: [PATCH 43/86] added Windows compile flag --- mainwindow.cpp | 5 ++++- mainwindow.h | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index e76cb63e..d632b000 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1217,7 +1217,9 @@ void MainWindow::debug() QString inputPath = Common::pathInTemp("input.txt"); inputPath.replace("\\", "/"); - // start display + // start display Linux + #ifdef Q_OS_WIN32 + #else key_t key = ftok("progfile", 65); displaywdg = new DisplayWindow; displaywdg->setWindowIcon(QIcon(":images/mainIcon.png")); @@ -1226,6 +1228,7 @@ void MainWindow::debug() displaywdg->show(); msgid = msgget(key, 0666 | IPC_CREAT); consumer = new std::thread(&DisplayWindow::changeDisplay, displaywdg, msgid); + #endif debugger = new Debugger(compilerOut, exePath, workingDirectoryPath, inputPath, assembler, 0, settings.value("sasmverbose", false).toBool(), settings.value("mi", false).toBool()); // connect print signals for output in Debugger diff --git a/mainwindow.h b/mainwindow.h index 9f8e1740..a1f9e06a 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -79,6 +79,11 @@ #include "stackwidget.h" #include "displayWindow.h" #include +#ifdef Q_OS_WIN32 +#else +#include +#include +#endif #define SASM_VERSION "3.12.1" From 268fa65bfade7ab67b869ebc0304e4cb04140b14 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 10 May 2021 09:25:56 +0200 Subject: [PATCH 44/86] added Windows compile flag --- mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index d632b000..08ab5b49 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1058,6 +1058,8 @@ void MainWindow::runProgram() runProcess->setStandardInputFile(input); // start display + #ifdef Q_OS_WIN32 + #else key_t key = ftok("progfile", 65); displaywdg = new DisplayWindow; displaywdg->setWindowIcon(QIcon(":images/mainIcon.png")); @@ -1066,7 +1068,8 @@ void MainWindow::runProgram() displaywdg->show(); msgid = msgget(key, 0666 | IPC_CREAT); consumer = new std::thread(&DisplayWindow::changeDisplay, displaywdg, msgid); - + #endif + //! Run program in code directory if it exists QString codePath = currentTab->getCurrentFilePath(); if (!codePath.isEmpty()) { From 94a87280da675e97254163d7aedc7510ab28a784 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 10 May 2021 14:56:40 +0200 Subject: [PATCH 45/86] a --- Linux/share/sasm/NASM/macro.c | 16 +--------------- Linux/share/sasm/NASM/macro.o | Bin 0 -> 6672 bytes 2 files changed, 1 insertion(+), 15 deletions(-) create mode 100644 Linux/share/sasm/NASM/macro.o diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index 90e03388..c262b1d9 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -1,6 +1,6 @@ #include #include - +#include #include #include @@ -15,17 +15,6 @@ struct mesg_buffer { int msgid = 0; -/*void setup(){ - key = ftok("progfile", 65); - msgid = msgget(key, 0666 | IPC_CREAT); - message.mesg_type = 1; - strcpy(message.mesg_text, "Hi"); -} - -void update(){ - msgsnd(msgid, &message, sizeof(message), 0); -}*/ - void update(char* data){ if (msgid == 0){ msgid = msgget(ftok("progfile", 65), 0666 | IPC_CREAT); @@ -39,7 +28,4 @@ void update(char* data){ void printSomething(char* a){ printf("Geben Sie ein paar Wörter ein: %s\n", a); - //scanf("%9s", &string[0]); - - //printf("Ihre Eingabe: %s\n",string); } diff --git a/Linux/share/sasm/NASM/macro.o b/Linux/share/sasm/NASM/macro.o new file mode 100644 index 0000000000000000000000000000000000000000..8efff9f93911b2503a718018caba0a9d89c694c9 GIT binary patch literal 6672 zcma)Adu$xV9iF}0wQv16KS^xob)j({3cgEBaGVDvFFQDK5{eUr2-3~@Ztr~fe0SXL zg@h8CU{XlkR6uD%A+3Z8f>ubSh^DQeRUl9(DlPq^DpDz;EvKegaM!WF zoc-wh`SS*a6Nm95CdA$||64UQ{*Ep^kDLj?Y5bkYjpFz?{jZVY@#h<*Y?8ZsV(&-4 z@B_oUHQ+rV9gm)_Y@yHkd>2U0fKYMS!xk9Pp#@z$1D3y!ZOfGK=vDqHB3$dY`9kX+VSSgt- z$9A7NRd($%1*>D7PK}t*7o3@xz2MA7T?qW4>6(Rwt~-QWpOOM0(rU*;{SbtHGjlm0 ztXHQX4r^7f1N2^sw8#>QLeOlxY z@6q-C_WLN(jZXlfH57ewRsnRCUM+`;%mH(szC6+cojC?Zzq~pN5av-NuJ@SVrObSQ zzbhpZF&9zOE15d;TNq4VC7DLkqS4ST@!n_r-2N920M*=!!+IG<}61#`8zo6Mg22LXfTMw(qe zb3ZgY&A*emq5TM$>&$)Dtb$&*YC0iHoBtrQPv$maK2D$E$eobo zMd$$XF{<0Y54)PjncLE6Z3!0D`W6^e>r~XSHkemE>xR+|U}|TvLeW6|$GRIPKfqmNMXWhsgN3E`?HJbEERchs>6>i!JF*U%e;{tBR4zY0?Q z4`X-p0Yb4$DM=pn^ z)kgMF_;YYtT@8y@nA`B9)z?s=dlM^xl#6g)Gzya5dte`Zc-Z8GuD zJ$X3a3tP>s>VfLB(zyd?K-(2k+Q~%Ph3MGHSdnUO!7PZ_wUZssFxzS=g+NJ#)}(bt zTWZ76Se@B6t7->Y@E|V`wY8sx1y*IDpu|uTyfUg9pv3+VsEV{` z;b?8G=dD3t)(3+1!n9^8Itr-;+O^2JPSXZjXkR}cLnL4qT@i4+s+~p+^O1L>k{is< zlQ+phjj2JKFZ2zyVddi5Rqg(?7PWJ(>)O7tp`By48aUJZ3Dfuz2qss6f*G|~r{*f` z2O?i!+7^sE(84s^;UGHVA~@bai#Otl4KNV1(Xlyb-U&|1Ke9<@u~lJl7L=xa7_G;z ze4%p#6BVbN$mfO=*;FcVptr~BS<#ix6)Fe1vV}@wRU%hN{}*Gd)3wx<-vOkv0sX)|JxW@FLqMq9#|4{FKn#=Hb%*BNU= zmo^)1VKZYyBYTYMjM2E&h=w|wjgG7ldD^IpEHiZ1h>4IMP8c18$Bns!cMTn&ZMoOb zU^i#P&?8$x-WaOF!Xl4cAuRyOau%;*yzGXGW41ezD`bT=utUyM&ZdCrNQsl&Z(BB; zoRMPLjq&y9{*rVWLgeoWy-c)wjB$8A~Avt6Ujn4m)K-Gqgczt(E6cm zi9yyu!Wl`H?Szwb#uD2h9Lx8V17ShD8463TA15T!y1-}5$>!35 z)$^9BQm8m~x|_SjDWQxkmRvzCJj!`;ZMi=(Q@JM?Bx7U!Z_cG{3o}n*E7XFrLNWbP zGJS=R8gExG%*J+{WY!Dr?Iy!pTpDl9czr7rv34U#WTWybR$Q@p`>xo=FtSiWn*2Lq;s&48bK)(D^6FXa5KuY%S{gF zZ3jxnO{PY>aAS1slv^x!;bG*y`ifLO>5Ta5T(JN}Dih#QUDzuxbM7@ZV;BJ|C9f8} z#q_GQTWbBSrKK!Jxe>*ZjpEoZv-0ahR{GTP!d^Zn(mrq)aPROZ4~@ygW->Y-5>_t8 zD&>TJ;9b3F>xKeN{-s*NOUs;jt^4q$X#h0yE;)!{Z@szDY zH_)*oJjG5^hQmv=qO)nYTr0F&BigJwUB3$_9?xiYHoiecUo>(ww4vS@dI1)mju&MA z4Le;QgYE`&|5ZJy-!vXBzi>vzpv_@)|1J=;2|ei<(dJ=v|4tFK$*4Gu(7%Mv#(A+( z_PV5|WQv^xOmnj7;@$I;42ZB?oheCJu3nJG>oCy5f;X|L78bZ31X@^rSxyPUf}e6z zEi88^$k$IXpu)Ht23uG(1zG6vCJ(gm_Gf00PT2XK7g=t);f-8}Q%Xho4negVJF2EXDsuKBMG|l{`*4Zgd+c@4&a3k`Dn* z94LE$IyRY?Zyg85VIb|k1Z3Q=0L{5VJV=E7LqI(y#FNDNLOe}5^v?p9;v@MLh36FV zYm)l8KQ^@ro&pIVurI7!dAiqapMxmqdu)^aCA5i$H!lx8ItMFF}f3NVY!uJ%0u$COJ zLE&tLOBAkDxKZI&g=K|@6yC4!dkRk}d`{up3i)prju*j8jM%C$rtmU_y$bsk4k_d} zG5u~MqOQgje>V~J_I1UdBx0#~#&tYizy&Xks|qf7xSuH=UwCm`{YrM(J?Mq8M{ti#jv+|4T&$EZ`~SPW z56j>il+Qi3LCi$Qu_Esg*dj6AZY^ZK9gew4yLq7TD9CdMAU2@~ziFvs!%->UtLw<1 zEk+V=0y!>9N5*6PPIUTE#`c&Wz+ z_kBQ$1Zuw$5cnkD^*&9zhw*I0NT}xPz6w4#?i1L2K8qZe??!*zM?m{NAjR{DHyRN5 z&JJkKi^<1h{bID pKkXU>$JIjKJ!r>uXRN?7h&+V6BlyjqBcI)%9S8f^Hv;;0{{cxaA;SOw literal 0 HcmV?d00001 From 86e7578103b77fe6d011033b83802c3c2387cacc Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 21 May 2021 09:35:27 +0200 Subject: [PATCH 46/86] upgraded display --- Linux/share/sasm/NASM/macro.c | 53 +++++++++++++++----- Linux/share/sasm/include/io64.inc | 16 +++++- displayWindow.cpp | 82 ++++++++++++++++++++++++------- displayWindow.h | 7 +-- mainwindow.cpp | 59 +++++++++++++--------- mainwindow.h | 3 +- 6 files changed, 162 insertions(+), 58 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index c262b1d9..ad199a0b 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -10,22 +10,51 @@ void sasm_replace_stdin(void) {dup2(open("input.txt",0),0);} struct mesg_buffer { long mesg_type; - char mesg_text[256]; + char mesg_text[768]; } message; -int msgid = 0; +int msgid_snd = 0; +int msgid_rcv = 0; +char res_x = 8; +char res_y = 8; +char mode = 0; +const int max_byte = 16384; -void update(char* data){ - if (msgid == 0){ - msgid = msgget(ftok("progfile", 65), 0666 | IPC_CREAT); - message.mesg_type = 1; - strcpy(message.mesg_text, "empty"); +void setup(char x, char y, char mode_){ + res_x = x; + res_y = y; + mode = mode_; + if (msgid_snd == 0){ + msgid_snd = msgget(ftok("/tmp", 65), 0666 | IPC_CREAT); + message.mesg_type = 3; + message.mesg_text[0] = res_x; + message.mesg_text[1] = res_y; + message.mesg_text[2] = mode; + msgsnd(msgid_snd, &message, sizeof(message), 0); } - for(int i = 0; i < 1024; i++) - message.mesg_text[i] = data[i]; - msgsnd(msgid, &message, sizeof(message), 0); } -void printSomething(char* a){ - printf("Geben Sie ein paar Wörter ein: %s\n", a); +int min(int x, int y) { + if(x>y) + return y; + return x; +} + +void update(char* data){ + if (msgid_snd == 0){ + msgid_snd = msgget(ftok("/tmp", 65), 0666 | IPC_CREAT); + } + if (msgid_rcv == 0){ + msgid_rcv = msgget(ftok("/tmp", 66), 0666 | IPC_CREAT); + } + message.mesg_type = 1; + int needed_bytes = res_x*res_y; + if(mode) + needed_bytes *=3; + for(int j = 0; j < 768; j+=768){ + for(int i = 0; i < min(768, needed_bytes-j); i++) + message.mesg_text[i+j] = data[i+j]; + msgsnd(msgid_snd, &message, sizeof(message), 0); + } + msgrcv(msgid_rcv, &message, sizeof(message), 0, 0); } diff --git a/Linux/share/sasm/include/io64.inc b/Linux/share/sasm/include/io64.inc index 10670975..cf6a0c15 100644 --- a/Linux/share/sasm/include/io64.inc +++ b/Linux/share/sasm/include/io64.inc @@ -44,13 +44,27 @@ CEXTERN fflush CEXTERN get_stdin CEXTERN get_stdout -CEXTERN printSomething CEXTERN update %macro updateDisplay 1.nolist + push rdi mov rdi, %1 call update + pop rdi %endmacro +CEXTERN setup +%macro setupDisplay 3.nolist + push rdi + push rsi + push rdx + mov rdi, %1 + mov rsi, %2 + mov rdx, %3 + call setup + pop rdx + pop rsi + pop rdi +%endmacro ; Make stack be 16 bytes aligned %macro ALIGN_STACK 0.nolist diff --git a/displayWindow.cpp b/displayWindow.cpp index ed68f0c5..012a3245 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -46,10 +46,6 @@ DisplayWindow::DisplayWindow(QWidget *parent) : { this->setStyleSheet("background-color:grey;"); layout = new QVBoxLayout(this); - - // white = new QRgb(255, 255, 255); - // black = new QRgb(0, 0, 0); - displayImageLabel = new QLabel(""); displayPicture = new QImage(480, 480, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); @@ -59,35 +55,89 @@ DisplayWindow::DisplayWindow(QWidget *parent) : setLayout(layout); this->resize(displayPicture->size()); + this->setFixedSize(500,525); } -void DisplayWindow::changeDisplay(int msgid){ +void DisplayWindow::changeDisplay(int msgid, int msgidsnd){ + this->setFixedSize(500,525); + displayPicture = new QImage(480, 480, QImage::Format_RGB32); + displayPicture->fill(qRgb(255, 255, 255)); + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); #ifdef Q_OS_WIN32 #else + char res_x = 8; + char res_y = 8; + char mode = 0; + memset(&message.mesg_text[0], 0xff, sizeof(message.mesg_text)); + displayPicture->fill(qRgb(0, 0, 0)); + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); while(1){ // msgrcv to receive message msgrcv(msgid, &message, sizeof(message), 0, 0); - if (message.mesg_type == 2){ + if (message.mesg_type == 2){ // type = 1 (default) -> normal message | -> 2 finish | -> 3 setup break; } + if (message.mesg_type == 3){ + res_x = message.mesg_text[0]; + res_y = message.mesg_text[1]; + mode = message.mesg_text[2]; + displayPicture = new QImage(res_x*60, res_y*60, QImage::Format_RGB32); + displayPicture->fill(qRgb(0, 0, 0)); + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + this->setFixedSize(displayPicture->size()); + continue; + } + // display the message and print on display - //std::cout << "Data Received in :"; - displayPicture->fill(qRgb(255, 255, 255)); - for(int i = 0; i < 256; i++){ - //std::cout << + message.mesg_text[i] << " "; - if(message.mesg_text[i]) { + int needed_pixel = res_x*res_y; + if(mode) + needed_pixel *= 3; + for(int i = 0; i < std::min(768, needed_pixel); i++){ + // pixel makieren + for(int k = 0; k < 60; k++){ + displayPicture->setPixel((i%res_x)*60+k, (i/res_x)*60, qRgb(255, 0, 0)); + displayPicture->setPixel((i%res_x)*60+k, (i/res_x)*60+1, qRgb(255, 0, 0)); + } + for(int k = 2; k < 57; k++){ + displayPicture->setPixel((i%res_x)*60, (i/res_x)*60+k, qRgb(255, 0, 0)); + displayPicture->setPixel((i%res_x)*60+1, (i/res_x)*60+k, qRgb(255, 0, 0)); + displayPicture->setPixel((i%res_x)*60+58, (i/res_x)*60+k, qRgb(255, 0, 0)); + displayPicture->setPixel((i%res_x)*60+59, (i/res_x)*60+k, qRgb(255, 0, 0)); + } + for(int k = 0; k < 60; k++) { + displayPicture->setPixel((i%res_x)*60+k, (i/res_x)*60+58, qRgb(255, 0, 0)); + displayPicture->setPixel((i%res_x)*60+k, (i/res_x)*60+59, qRgb(255, 0, 0)); + } + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + usleep(105000); + + if (mode){ for(int j = 0; j < 60; j++){ for(int k = 0; k < 60; k++){ - displayPicture->setPixel((i%8)*60+j, i/8*60+k, qRgb(0, 0, 0)); + displayPicture->setPixel((i%res_x)*60+j, (i/res_x)*60+k, qRgb(message.mesg_text[i], message.mesg_text[i+1], message.mesg_text[i+2])); }} - //displayPicture->setPixel((i%32)*15, i/32*15, qRgb(0, 0, 0)); + i+=2; + } else { + printf("i: %d value: %d", i, message.mesg_text[i]); + if(message.mesg_text[i]) { + for(int j = 0; j < 60; j++){ + for(int k = 0; k < 60; k++){ + displayPicture->setPixel((i%res_x)*60+j, i/res_x*60+k, qRgb(255, 255, 255)); + }} + } else { + for(int j = 0; j < 60; j++){ + for(int k = 0; k < 60; k++){ + displayPicture->setPixel((i%res_x)*60+j, i/res_x*60+k, qRgb(0, 0, 0)); + }} + } } } - //std::cout << "\n"; displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + msgsnd(msgidsnd, &message, sizeof(message), 0); } msgctl(msgid, IPC_RMID, NULL); + msgctl(msgidsnd, IPC_RMID, NULL); emit closeDisplay(); #endif } @@ -97,10 +147,8 @@ void DisplayWindow::finish(int msgid){ #else mesg_buffer end; end.mesg_type = 2; - strcpy(end.mesg_text, "end"); //send default message type == 2 means end - if(msgsnd(msgid, &end, sizeof(end), 0) < 0) - printf("error finish... "); + msgsnd(msgid, &end, sizeof(end), 0); #endif } diff --git a/displayWindow.h b/displayWindow.h index 4f976ae7..896c7c67 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -47,6 +47,7 @@ #include #include #include +#include #ifdef Q_OS_WIN32 #else #include @@ -59,12 +60,12 @@ class DisplayWindow : public QWidget public: struct mesg_buffer { long mesg_type; - char mesg_text[256]; + char mesg_text[768]; } message; - + explicit DisplayWindow(QWidget *parent = 0); ~DisplayWindow(); - void changeDisplay(int msgid); + void changeDisplay(int msgid, int msgidsnd); void finish(int msgid); protected: diff --git a/mainwindow.cpp b/mainwindow.cpp index 08ab5b49..276a7a6f 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1060,14 +1060,19 @@ void MainWindow::runProgram() // start display #ifdef Q_OS_WIN32 #else - key_t key = ftok("progfile", 65); - displaywdg = new DisplayWindow; - displaywdg->setWindowIcon(QIcon(":images/mainIcon.png")); - displaywdg->setFixedSize(500,525); - displaywdg->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); - displaywdg->show(); + if (!displayWindow) { + displayWindow = new DisplayWindow; + displayWindow->setWindowIcon(QIcon(":images/mainIcon.png")); + //displayWindow->setFixedSize(500,525); + displayWindow->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); + displayWindow->activateWindow(); + //displaywdg->setParent(this); + } + displayWindow->show(); + key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); - consumer = new std::thread(&DisplayWindow::changeDisplay, displaywdg, msgid); + int msgid_recv = msgget(ftok("/tmp", 66), 0666 | IPC_CREAT); + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid, msgid_recv); #endif //! Run program in code directory if it exists @@ -1106,8 +1111,8 @@ void MainWindow::testStopOfProgram() stopAction->setEnabled(false); debugAction->setEnabled(true); buildAction->setEnabled(true); - connect(displaywdg, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); - displaywdg->finish(msgid); + connect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); + displayWindow->finish(msgid); if (!programStopped) { if (runProcess->exitStatus() == QProcess::NormalExit) printLogWithTime(tr("The program finished normally. Execution time: %1 s") @@ -1223,14 +1228,20 @@ void MainWindow::debug() // start display Linux #ifdef Q_OS_WIN32 #else - key_t key = ftok("progfile", 65); - displaywdg = new DisplayWindow; - displaywdg->setWindowIcon(QIcon(":images/mainIcon.png")); - //displaywdg->setFixedSize(500,525); - displaywdg->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); - displaywdg->show(); + if (!displayWindow) { + displayWindow = new DisplayWindow; + displayWindow->setWindowIcon(QIcon(":images/mainIcon.png")); + //displayWindow->setFixedSize(500,525); + //displayWindow->setFixedSize(600,625); + displayWindow->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); + displayWindow->activateWindow(); + //displaywdg->setParent(this); + } + displayWindow->show(); + key_t key = ftok("/tmp", 65); //returned -1 msgid = msgget(key, 0666 | IPC_CREAT); - consumer = new std::thread(&DisplayWindow::changeDisplay, displaywdg, msgid); + int msgid_recv = msgget(ftok("/tmp", 66), 0666 | IPC_CREAT); + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid, msgid_recv); #endif debugger = new Debugger(compilerOut, exePath, workingDirectoryPath, inputPath, assembler, 0, settings.value("sasmverbose", false).toBool(), settings.value("mi", false).toBool()); @@ -1609,8 +1620,8 @@ void MainWindow::debugExit() //! Many actions performed here - deleting of highlighting too delete debugger; // close display: - connect(displaywdg, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); - displaywdg->finish(msgid); + connect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); + displayWindow->finish(msgid); debugger = 0; closeAnyCommandWidget(); debugShowRegistersAction->setChecked(false); @@ -1621,12 +1632,12 @@ void MainWindow::debugExit() } void MainWindow::closeDisplay(){ - usleep(100); - displaywdg->close(); - disconnect(displaywdg, SIGNAL(closeDisplay()), this, SLOT(closeDisplay())); - //TODO - //delete displaywdg; - //displaywdg = 0; + consumer->join(); + disconnect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay())); + if (displayWindow) { + displayWindow->close(); + delete settingsWindow; + } } void MainWindow::showAnyCommandWidget() diff --git a/mainwindow.h b/mainwindow.h index a1f9e06a..7cfebccd 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -236,7 +236,8 @@ class MainWindow : public QMainWindow void closeEvent(QCloseEvent *e); // display - DisplayWindow *displaywdg; + QPointer displayWindow; + //DisplayWindow *displaywdg; std::thread *consumer; int msgid; From 6e79a4d5031d4ef404f31b8eb5286ff8d6c1f813 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 21 May 2021 10:07:08 +0200 Subject: [PATCH 47/86] upgraded display --- Linux/share/sasm/NASM/macro.o | Bin 6672 -> 0 bytes Linux/share/sasm/include/io64.inc | 4 ++++ displayWindow.cpp | 35 +++++++++++++++++++----------- 3 files changed, 26 insertions(+), 13 deletions(-) delete mode 100644 Linux/share/sasm/NASM/macro.o diff --git a/Linux/share/sasm/NASM/macro.o b/Linux/share/sasm/NASM/macro.o deleted file mode 100644 index 8efff9f93911b2503a718018caba0a9d89c694c9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6672 zcma)Adu$xV9iF}0wQv16KS^xob)j({3cgEBaGVDvFFQDK5{eUr2-3~@Ztr~fe0SXL zg@h8CU{XlkR6uD%A+3Z8f>ubSh^DQeRUl9(DlPq^DpDz;EvKegaM!WF zoc-wh`SS*a6Nm95CdA$||64UQ{*Ep^kDLj?Y5bkYjpFz?{jZVY@#h<*Y?8ZsV(&-4 z@B_oUHQ+rV9gm)_Y@yHkd>2U0fKYMS!xk9Pp#@z$1D3y!ZOfGK=vDqHB3$dY`9kX+VSSgt- z$9A7NRd($%1*>D7PK}t*7o3@xz2MA7T?qW4>6(Rwt~-QWpOOM0(rU*;{SbtHGjlm0 ztXHQX4r^7f1N2^sw8#>QLeOlxY z@6q-C_WLN(jZXlfH57ewRsnRCUM+`;%mH(szC6+cojC?Zzq~pN5av-NuJ@SVrObSQ zzbhpZF&9zOE15d;TNq4VC7DLkqS4ST@!n_r-2N920M*=!!+IG<}61#`8zo6Mg22LXfTMw(qe zb3ZgY&A*emq5TM$>&$)Dtb$&*YC0iHoBtrQPv$maK2D$E$eobo zMd$$XF{<0Y54)PjncLE6Z3!0D`W6^e>r~XSHkemE>xR+|U}|TvLeW6|$GRIPKfqmNMXWhsgN3E`?HJbEERchs>6>i!JF*U%e;{tBR4zY0?Q z4`X-p0Yb4$DM=pn^ z)kgMF_;YYtT@8y@nA`B9)z?s=dlM^xl#6g)Gzya5dte`Zc-Z8GuD zJ$X3a3tP>s>VfLB(zyd?K-(2k+Q~%Ph3MGHSdnUO!7PZ_wUZssFxzS=g+NJ#)}(bt zTWZ76Se@B6t7->Y@E|V`wY8sx1y*IDpu|uTyfUg9pv3+VsEV{` z;b?8G=dD3t)(3+1!n9^8Itr-;+O^2JPSXZjXkR}cLnL4qT@i4+s+~p+^O1L>k{is< zlQ+phjj2JKFZ2zyVddi5Rqg(?7PWJ(>)O7tp`By48aUJZ3Dfuz2qss6f*G|~r{*f` z2O?i!+7^sE(84s^;UGHVA~@bai#Otl4KNV1(Xlyb-U&|1Ke9<@u~lJl7L=xa7_G;z ze4%p#6BVbN$mfO=*;FcVptr~BS<#ix6)Fe1vV}@wRU%hN{}*Gd)3wx<-vOkv0sX)|JxW@FLqMq9#|4{FKn#=Hb%*BNU= zmo^)1VKZYyBYTYMjM2E&h=w|wjgG7ldD^IpEHiZ1h>4IMP8c18$Bns!cMTn&ZMoOb zU^i#P&?8$x-WaOF!Xl4cAuRyOau%;*yzGXGW41ezD`bT=utUyM&ZdCrNQsl&Z(BB; zoRMPLjq&y9{*rVWLgeoWy-c)wjB$8A~Avt6Ujn4m)K-Gqgczt(E6cm zi9yyu!Wl`H?Szwb#uD2h9Lx8V17ShD8463TA15T!y1-}5$>!35 z)$^9BQm8m~x|_SjDWQxkmRvzCJj!`;ZMi=(Q@JM?Bx7U!Z_cG{3o}n*E7XFrLNWbP zGJS=R8gExG%*J+{WY!Dr?Iy!pTpDl9czr7rv34U#WTWybR$Q@p`>xo=FtSiWn*2Lq;s&48bK)(D^6FXa5KuY%S{gF zZ3jxnO{PY>aAS1slv^x!;bG*y`ifLO>5Ta5T(JN}Dih#QUDzuxbM7@ZV;BJ|C9f8} z#q_GQTWbBSrKK!Jxe>*ZjpEoZv-0ahR{GTP!d^Zn(mrq)aPROZ4~@ygW->Y-5>_t8 zD&>TJ;9b3F>xKeN{-s*NOUs;jt^4q$X#h0yE;)!{Z@szDY zH_)*oJjG5^hQmv=qO)nYTr0F&BigJwUB3$_9?xiYHoiecUo>(ww4vS@dI1)mju&MA z4Le;QgYE`&|5ZJy-!vXBzi>vzpv_@)|1J=;2|ei<(dJ=v|4tFK$*4Gu(7%Mv#(A+( z_PV5|WQv^xOmnj7;@$I;42ZB?oheCJu3nJG>oCy5f;X|L78bZ31X@^rSxyPUf}e6z zEi88^$k$IXpu)Ht23uG(1zG6vCJ(gm_Gf00PT2XK7g=t);f-8}Q%Xho4negVJF2EXDsuKBMG|l{`*4Zgd+c@4&a3k`Dn* z94LE$IyRY?Zyg85VIb|k1Z3Q=0L{5VJV=E7LqI(y#FNDNLOe}5^v?p9;v@MLh36FV zYm)l8KQ^@ro&pIVurI7!dAiqapMxmqdu)^aCA5i$H!lx8ItMFF}f3NVY!uJ%0u$COJ zLE&tLOBAkDxKZI&g=K|@6yC4!dkRk}d`{up3i)prju*j8jM%C$rtmU_y$bsk4k_d} zG5u~MqOQgje>V~J_I1UdBx0#~#&tYizy&Xks|qf7xSuH=UwCm`{YrM(J?Mq8M{ti#jv+|4T&$EZ`~SPW z56j>il+Qi3LCi$Qu_Esg*dj6AZY^ZK9gew4yLq7TD9CdMAU2@~ziFvs!%->UtLw<1 zEk+V=0y!>9N5*6PPIUTE#`c&Wz+ z_kBQ$1Zuw$5cnkD^*&9zhw*I0NT}xPz6w4#?i1L2K8qZe??!*zM?m{NAjR{DHyRN5 z&JJkKi^<1h{bID pKkXU>$JIjKJ!r>uXRN?7h&+V6BlyjqBcI)%9S8f^Hv;;0{{cxaA;SOw diff --git a/Linux/share/sasm/include/io64.inc b/Linux/share/sasm/include/io64.inc index cf6a0c15..c6f21c25 100644 --- a/Linux/share/sasm/include/io64.inc +++ b/Linux/share/sasm/include/io64.inc @@ -46,14 +46,17 @@ CEXTERN get_stdout CEXTERN update %macro updateDisplay 1.nolist + push rax push rdi mov rdi, %1 call update pop rdi + pop rax %endmacro CEXTERN setup %macro setupDisplay 3.nolist + push rax push rdi push rsi push rdx @@ -64,6 +67,7 @@ CEXTERN setup pop rdx pop rsi pop rdi + pop rax %endmacro ; Make stack be 16 bytes aligned diff --git a/displayWindow.cpp b/displayWindow.cpp index 012a3245..c5da6264 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -91,23 +91,33 @@ void DisplayWindow::changeDisplay(int msgid, int msgidsnd){ // display the message and print on display int needed_pixel = res_x*res_y; - if(mode) + int currentcharx; + int currentchary; + if(mode) { needed_pixel *= 3; + } for(int i = 0; i < std::min(768, needed_pixel); i++){ + if(mode){ + currentcharx = ((i/3)%res_x)*60; + currentchary = (i/3/res_x)*60; + } else { + currentcharx = (i%res_x)*60; + currentchary = (i/res_x)*60; + } // pixel makieren for(int k = 0; k < 60; k++){ - displayPicture->setPixel((i%res_x)*60+k, (i/res_x)*60, qRgb(255, 0, 0)); - displayPicture->setPixel((i%res_x)*60+k, (i/res_x)*60+1, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+k, currentchary, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+k, currentchary+1, qRgb(255, 0, 0)); } for(int k = 2; k < 57; k++){ - displayPicture->setPixel((i%res_x)*60, (i/res_x)*60+k, qRgb(255, 0, 0)); - displayPicture->setPixel((i%res_x)*60+1, (i/res_x)*60+k, qRgb(255, 0, 0)); - displayPicture->setPixel((i%res_x)*60+58, (i/res_x)*60+k, qRgb(255, 0, 0)); - displayPicture->setPixel((i%res_x)*60+59, (i/res_x)*60+k, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx, currentchary+k, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+1, currentchary+k, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+58, currentchary+k, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+59, currentchary+k, qRgb(255, 0, 0)); } for(int k = 0; k < 60; k++) { - displayPicture->setPixel((i%res_x)*60+k, (i/res_x)*60+58, qRgb(255, 0, 0)); - displayPicture->setPixel((i%res_x)*60+k, (i/res_x)*60+59, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+k, currentchary+58, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+k, currentchary+59, qRgb(255, 0, 0)); } displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); usleep(105000); @@ -115,20 +125,19 @@ void DisplayWindow::changeDisplay(int msgid, int msgidsnd){ if (mode){ for(int j = 0; j < 60; j++){ for(int k = 0; k < 60; k++){ - displayPicture->setPixel((i%res_x)*60+j, (i/res_x)*60+k, qRgb(message.mesg_text[i], message.mesg_text[i+1], message.mesg_text[i+2])); + displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(message.mesg_text[i], message.mesg_text[i+1], message.mesg_text[i+2])); }} i+=2; } else { - printf("i: %d value: %d", i, message.mesg_text[i]); if(message.mesg_text[i]) { for(int j = 0; j < 60; j++){ for(int k = 0; k < 60; k++){ - displayPicture->setPixel((i%res_x)*60+j, i/res_x*60+k, qRgb(255, 255, 255)); + displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(255, 255, 255)); }} } else { for(int j = 0; j < 60; j++){ for(int k = 0; k < 60; k++){ - displayPicture->setPixel((i%res_x)*60+j, i/res_x*60+k, qRgb(0, 0, 0)); + displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(0, 0, 0)); }} } } From 01c9c2cc9115e2899878cdc70e1e549fefe82c4b Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sat, 22 May 2021 09:48:13 +0200 Subject: [PATCH 48/86] updated display --- Linux/share/sasm/NASM/macro.c | 13 ++--- Linux/share/sasm/include/io64.inc | 36 ++++++++++++-- displayWindow.cpp | 80 ++++++++++++++++--------------- displayWindow.h | 2 +- 4 files changed, 82 insertions(+), 49 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index ad199a0b..a2ebde92 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -26,12 +26,12 @@ void setup(char x, char y, char mode_){ mode = mode_; if (msgid_snd == 0){ msgid_snd = msgget(ftok("/tmp", 65), 0666 | IPC_CREAT); - message.mesg_type = 3; - message.mesg_text[0] = res_x; - message.mesg_text[1] = res_y; - message.mesg_text[2] = mode; - msgsnd(msgid_snd, &message, sizeof(message), 0); } + message.mesg_type = 3; + message.mesg_text[0] = res_x; + message.mesg_text[1] = res_y; + message.mesg_text[2] = mode; + msgsnd(msgid_snd, &message, sizeof(message), 0); } int min(int x, int y) { @@ -41,6 +41,7 @@ int min(int x, int y) { } void update(char* data){ + //setup(1, 2, 3); if (msgid_snd == 0){ msgid_snd = msgget(ftok("/tmp", 65), 0666 | IPC_CREAT); } @@ -51,7 +52,7 @@ void update(char* data){ int needed_bytes = res_x*res_y; if(mode) needed_bytes *=3; - for(int j = 0; j < 768; j+=768){ + for(int j = 0; j < needed_bytes; j+=768){ for(int i = 0; i < min(768, needed_bytes-j); i++) message.mesg_text[i+j] = data[i+j]; msgsnd(msgid_snd, &message, sizeof(message), 0); diff --git a/Linux/share/sasm/include/io64.inc b/Linux/share/sasm/include/io64.inc index c6f21c25..2e826645 100644 --- a/Linux/share/sasm/include/io64.inc +++ b/Linux/share/sasm/include/io64.inc @@ -46,28 +46,56 @@ CEXTERN get_stdout CEXTERN update %macro updateDisplay 1.nolist + pushfq push rax + push rcx + push rdx + push r8 + push r9 + push r10 + push r11 + push rsi push rdi mov rdi, %1 call update pop rdi + pop rsi + pop r11 + pop r10 + pop r9 + pop r8 + pop rdx + pop rcx pop rax + popfq %endmacro CEXTERN setup %macro setupDisplay 3.nolist + pushfq push rax - push rdi - push rsi + push rcx push rdx + push r8 + push r9 + push r10 + push r11 + push rsi + push rdi mov rdi, %1 mov rsi, %2 mov rdx, %3 call setup - pop rdx - pop rsi pop rdi + pop rsi + pop r11 + pop r10 + pop r9 + pop r8 + pop rdx + pop rcx pop rax + popfq %endmacro ; Make stack be 16 bytes aligned diff --git a/displayWindow.cpp b/displayWindow.cpp index c5da6264..11f1833c 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -96,49 +96,53 @@ void DisplayWindow::changeDisplay(int msgid, int msgidsnd){ if(mode) { needed_pixel *= 3; } - for(int i = 0; i < std::min(768, needed_pixel); i++){ - if(mode){ - currentcharx = ((i/3)%res_x)*60; - currentchary = (i/3/res_x)*60; - } else { - currentcharx = (i%res_x)*60; - currentchary = (i/res_x)*60; - } - // pixel makieren - for(int k = 0; k < 60; k++){ - displayPicture->setPixel(currentcharx+k, currentchary, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+k, currentchary+1, qRgb(255, 0, 0)); - } - for(int k = 2; k < 57; k++){ - displayPicture->setPixel(currentcharx, currentchary+k, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+1, currentchary+k, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+58, currentchary+k, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+59, currentchary+k, qRgb(255, 0, 0)); - } - for(int k = 0; k < 60; k++) { - displayPicture->setPixel(currentcharx+k, currentchary+58, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+k, currentchary+59, qRgb(255, 0, 0)); - } - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); - usleep(105000); - - if (mode){ - for(int j = 0; j < 60; j++){ + for(int l = 0; l < needed_pixel; l+=768) { + if(l>0) + msgrcv(msgid, &message, sizeof(message), 0, 0); + for(int i = 0; i < std::min(768, needed_pixel-l); i++){ + if(mode){ + currentcharx = (((i+l)/3)%res_x)*60; + currentchary = ((i+l)/3/res_x)*60; + } else { + currentcharx = ((i+l)%res_x)*60; + currentchary = ((i+l)/res_x)*60; + } + // pixel makieren for(int k = 0; k < 60; k++){ - displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(message.mesg_text[i], message.mesg_text[i+1], message.mesg_text[i+2])); - }} - i+=2; - } else { - if(message.mesg_text[i]) { + displayPicture->setPixel(currentcharx+k, currentchary, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+k, currentchary+1, qRgb(255, 0, 0)); + } + for(int k = 2; k < 57; k++){ + displayPicture->setPixel(currentcharx, currentchary+k, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+1, currentchary+k, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+58, currentchary+k, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+59, currentchary+k, qRgb(255, 0, 0)); + } + for(int k = 0; k < 60; k++) { + displayPicture->setPixel(currentcharx+k, currentchary+58, qRgb(255, 0, 0)); + displayPicture->setPixel(currentcharx+k, currentchary+59, qRgb(255, 0, 0)); + } + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + usleep(100000); + + if (mode){ for(int j = 0; j < 60; j++){ for(int k = 0; k < 60; k++){ - displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(255, 255, 255)); + displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(message.mesg_text[i], message.mesg_text[i+1], message.mesg_text[i+2])); }} + i+=2; } else { - for(int j = 0; j < 60; j++){ - for(int k = 0; k < 60; k++){ - displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(0, 0, 0)); - }} + if(message.mesg_text[i]) { + for(int j = 0; j < 60; j++){ + for(int k = 0; k < 60; k++){ + displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(255, 255, 255)); + }} + } else { + for(int j = 0; j < 60; j++){ + for(int k = 0; k < 60; k++){ + displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(0, 0, 0)); + }} + } } } } diff --git a/displayWindow.h b/displayWindow.h index 896c7c67..b8ad2889 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -60,7 +60,7 @@ class DisplayWindow : public QWidget public: struct mesg_buffer { long mesg_type; - char mesg_text[768]; + uint8_t mesg_text[768]; } message; explicit DisplayWindow(QWidget *parent = 0); From e862d4d050975f65e92b0cff2ac03f082108a3c0 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 24 May 2021 10:33:57 +0200 Subject: [PATCH 49/86] fixed issues for the display --- Linux/share/sasm/NASM/macro.c | 1 - Linux/share/sasm/include/io64.inc | 8 ++++++++ debugger.cpp | 4 +++- debugger.h | 2 ++ displayWindow.cpp | 4 ++-- mainwindow.cpp | 2 +- 6 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index a2ebde92..4d603b0a 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -41,7 +41,6 @@ int min(int x, int y) { } void update(char* data){ - //setup(1, 2, 3); if (msgid_snd == 0){ msgid_snd = msgget(ftok("/tmp", 65), 0666 | IPC_CREAT); } diff --git a/Linux/share/sasm/include/io64.inc b/Linux/share/sasm/include/io64.inc index 2e826645..be9c1fb4 100644 --- a/Linux/share/sasm/include/io64.inc +++ b/Linux/share/sasm/include/io64.inc @@ -46,6 +46,7 @@ CEXTERN get_stdout CEXTERN update %macro updateDisplay 1.nolist + sasmMacroFunc pushfq push rax push rcx @@ -57,7 +58,9 @@ CEXTERN update push rsi push rdi mov rdi, %1 + ALIGN_STACK call update + UNALIGN_STACK pop rdi pop rsi pop r11 @@ -68,10 +71,12 @@ CEXTERN update pop rcx pop rax popfq + sasmMacroFuncE %endmacro CEXTERN setup %macro setupDisplay 3.nolist + sasmMacroFunc pushfq push rax push rcx @@ -85,7 +90,9 @@ CEXTERN setup mov rdi, %1 mov rsi, %2 mov rdx, %3 + ALIGN_STACK call setup + UNALIGN_STACK pop rdi pop rsi pop r11 @@ -96,6 +103,7 @@ CEXTERN setup pop rcx pop rax popfq + sasmMacroFuncE %endmacro ; Make stack be 16 bytes aligned diff --git a/debugger.cpp b/debugger.cpp index b5d10de8..4a66d29f 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -67,6 +67,7 @@ Debugger::Debugger(QTextEdit *tEdit, pid = 0; firstStack = true; firstAction = true; + firstRet = true; textEdit = tEdit; exePath = exePathParam; workingDirectoryPath = workingDirectoryPathParam; @@ -359,7 +360,8 @@ void Debugger::processAction(QString output, QString error) { bool backtrace = (output.indexOf(QRegExp("#\\d+ 0x[0-9a-fA-F]{8,16} in .* ()")) != -1); - if (output.indexOf(exitMessage) != -1 && !backtrace) { + if (output.indexOf(exitMessage) != -1 && !backtrace && firstRet) { + firstRet = false; doInput("c\n", none); return; } diff --git a/debugger.h b/debugger.h index a10a702e..4c6f8bbc 100644 --- a/debugger.h +++ b/debugger.h @@ -193,6 +193,8 @@ class Debugger : public QObject int systemStack; bool signStack; int addressSizeOffset; + + bool firstRet; public slots: void readOutputToBuffer(); diff --git a/displayWindow.cpp b/displayWindow.cpp index 11f1833c..800154ea 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -123,7 +123,7 @@ void DisplayWindow::changeDisplay(int msgid, int msgidsnd){ displayPicture->setPixel(currentcharx+k, currentchary+59, qRgb(255, 0, 0)); } displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); - usleep(100000); + usleep(90000); if (mode){ for(int j = 0; j < 60; j++){ @@ -172,5 +172,5 @@ void DisplayWindow::closeEvent(QCloseEvent *) { DisplayWindow::~DisplayWindow() { delete displayImageLabel; - delete layout; + //delete layout; } diff --git a/mainwindow.cpp b/mainwindow.cpp index 276a7a6f..7c45bda0 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1636,7 +1636,7 @@ void MainWindow::closeDisplay(){ disconnect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay())); if (displayWindow) { displayWindow->close(); - delete settingsWindow; + delete displayWindow; } } From 7215b482e21c650fea685bcf25a90f671aba3314 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 24 May 2021 12:05:08 +0200 Subject: [PATCH 50/86] fixed display connect --- mainwindow.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 7c45bda0..d0b05588 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1111,9 +1111,11 @@ void MainWindow::testStopOfProgram() stopAction->setEnabled(false); debugAction->setEnabled(true); buildAction->setEnabled(true); - connect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); - displayWindow->finish(msgid); if (!programStopped) { + if(!displayWindow){ + connect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); + displayWindow->finish(msgid); + } if (runProcess->exitStatus() == QProcess::NormalExit) printLogWithTime(tr("The program finished normally. Execution time: %1 s") .arg(programExecutionTime.elapsed() / 1000.0) @@ -1127,7 +1129,7 @@ void MainWindow::testStopOfProgram() timer->stop(); } } -//TODO + void MainWindow::runExeProgram() { if (!programIsBuilded) { @@ -1633,7 +1635,6 @@ void MainWindow::debugExit() void MainWindow::closeDisplay(){ consumer->join(); - disconnect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay())); if (displayWindow) { displayWindow->close(); delete displayWindow; From 6c45300c54cdd11adc79f621a775ea2f549dcd1f Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 25 May 2021 09:25:21 +0200 Subject: [PATCH 51/86] fixed display issue --- mainwindow.cpp | 20 ++++++++++++-------- mainwindow.h | 1 + settings.ui | 14 ++++++++++++++ 3 files changed, 27 insertions(+), 8 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index d0b05588..0af55a25 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1063,12 +1063,11 @@ void MainWindow::runProgram() if (!displayWindow) { displayWindow = new DisplayWindow; displayWindow->setWindowIcon(QIcon(":images/mainIcon.png")); - //displayWindow->setFixedSize(500,525); displayWindow->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); displayWindow->activateWindow(); - //displaywdg->setParent(this); } - displayWindow->show(); + if (settings.value("display", false).toBool()) + displayWindow->show(); key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); int msgid_recv = msgget(ftok("/tmp", 66), 0666 | IPC_CREAT); @@ -1112,10 +1111,8 @@ void MainWindow::testStopOfProgram() debugAction->setEnabled(true); buildAction->setEnabled(true); if (!programStopped) { - if(!displayWindow){ - connect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); - displayWindow->finish(msgid); - } + connect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); + displayWindow->finish(msgid); if (runProcess->exitStatus() == QProcess::NormalExit) printLogWithTime(tr("The program finished normally. Execution time: %1 s") .arg(programExecutionTime.elapsed() / 1000.0) @@ -1239,7 +1236,8 @@ void MainWindow::debug() displayWindow->activateWindow(); //displaywdg->setParent(this); } - displayWindow->show(); + if (settings.value("display", false).toBool()) + displayWindow->show(); key_t key = ftok("/tmp", 65); //returned -1 msgid = msgget(key, 0666 | IPC_CREAT); int msgid_recv = msgget(ftok("/tmp", 66), 0666 | IPC_CREAT); @@ -2009,6 +2007,8 @@ void MainWindow::initAssemblerSettings(bool firstOpening) settingsUi.sasmVerboseCheckBox->setChecked(settings.value("sasmverbose", false).toBool()); settingsUi.MiModusCheckBox->setChecked(settings.value("mi", false).toBool()); + + settingsUi.sasmDisplayCheckBox->setChecked(settings.value("display", false).toBool()); settingsUi.runInCurrentDirectoryCheckbox->setChecked(settings.value("currentdir", false).toBool()); @@ -2161,6 +2161,7 @@ void MainWindow::recreateAssembler(bool start) settings.setValue("currentdir", false); settings.setValue("sasmverbose", false); settings.setValue("mi", false); + settings.setValue("display", false); settings.setValue("gdbpath", "gdb"); settings.setValue("assemblerpath", assembler->getAssemblerPath()); settings.setValue("linkerpath", assembler->getLinkerPath()); @@ -2185,6 +2186,7 @@ void MainWindow::backupSettings() backupObjectFileName = settings.value("objectfilename", "program.o").toString(); backupGDBPath = settings.value("gdbpath", "gdb").toString(); backupGDBVerbose = settings.value("sasmverbose", false).toBool(); + backupGDBDisplay = settings.value("display", false).toBool(); backupGDBMi = settings.value("mi", false).toBool(); backupDisableLinking = settings.value("disablelinking", false).toBool(); backupCurrentDir = settings.value("currentdir", false).toBool(); @@ -2205,6 +2207,7 @@ void MainWindow::restoreSettingsAndExit() settings.setValue("gdbpath", backupGDBPath); settings.setValue("sasmverbose", backupGDBVerbose); settings.setValue("mi", backupGDBMi); + settings.setValue("display", backupGDBDisplay); settings.setValue("currentdir", backupCurrentDir); settings.setValue("starttext", backupStartText); settings.setValue("linkerpath", backupLinkerPath); @@ -2251,6 +2254,7 @@ void MainWindow::saveSettings() settings.setValue("disablelinking", settingsUi.disableLinkingCheckbox->isChecked()); settings.setValue("sasmverbose", settingsUi.sasmVerboseCheckBox->isChecked()); settings.setValue("mi", settingsUi.MiModusCheckBox->isChecked()); + settings.setValue("display", settingsUi.sasmDisplayCheckBox->isChecked()); settings.setValue("currentdir", settingsUi.runInCurrentDirectoryCheckbox->isChecked()); settings.setValue("assemblerpath", settingsUi.assemblerPathEdit->text()); settings.setValue("gdbpath", settingsUi.gdbPathEdit->text()); diff --git a/mainwindow.h b/mainwindow.h index 7cfebccd..a070b3d2 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -225,6 +225,7 @@ class MainWindow : public QMainWindow QString backupGDBPath; QString backupGDBVerbose; QString backupGDBMi; + QString backupGDBDisplay; bool backupDisableLinking; bool backupCurrentDir; QString backupAssemblerPath; diff --git a/settings.ui b/settings.ui index 62231ba2..8b1035ca 100644 --- a/settings.ui +++ b/settings.ui @@ -2207,6 +2207,20 @@ + + + + SASM display: + + + + + + + + + + From 71c0b65fc1d8ed1605d8042cf770a6d3ae658ed2 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 31 May 2021 15:23:56 +0200 Subject: [PATCH 52/86] fixed Windowsize --- displayWindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index 800154ea..2ec558a7 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -85,7 +85,7 @@ void DisplayWindow::changeDisplay(int msgid, int msgidsnd){ displayPicture = new QImage(res_x*60, res_y*60, QImage::Format_RGB32); displayPicture->fill(qRgb(0, 0, 0)); displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); - this->setFixedSize(displayPicture->size()); + this->setFixedSize(displayPicture->size()+QSize(25,25)); continue; } From abd1deff96e6b555f98bacd786db2c507318f854 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Thu, 17 Jun 2021 14:44:33 +0200 Subject: [PATCH 53/86] added fps settings --- Linux/share/sasm/NASM/macro.c | 33 ++++--- Linux/share/sasm/include/io64.inc | 32 +++++- debugger.cpp | 1 - displayWindow.cpp | 155 +++++++++++++++++------------- displayWindow.h | 18 +++- mainwindow.cpp | 12 +-- mainwindow.h | 1 - 7 files changed, 156 insertions(+), 96 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index 4d603b0a..7b796790 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -3,6 +3,7 @@ #include #include #include +#include FILE *get_stdin(void) { return stdin; } FILE *get_stdout(void) { return stdout; } @@ -10,27 +11,31 @@ void sasm_replace_stdin(void) {dup2(open("input.txt",0),0);} struct mesg_buffer { long mesg_type; - char mesg_text[768]; + char mesg_text[8184]; } message; int msgid_snd = 0; -int msgid_rcv = 0; -char res_x = 8; -char res_y = 8; +int res_x = 512; +int res_y = 512; char mode = 0; +char fps = 1; const int max_byte = 16384; -void setup(char x, char y, char mode_){ +void setup(int x, int y, char mode_, char fps_){ res_x = x; res_y = y; + fps = fps_; mode = mode_; if (msgid_snd == 0){ msgid_snd = msgget(ftok("/tmp", 65), 0666 | IPC_CREAT); } message.mesg_type = 3; - message.mesg_text[0] = res_x; - message.mesg_text[1] = res_y; - message.mesg_text[2] = mode; + for(int i = 0; i < 4; i++){ + message.mesg_text[i] = (res_x >> (8*i)) & 0xff; + message.mesg_text[i+4] = (res_y >> (8*i)) & 0xff; + } + message.mesg_text[8] = mode; + message.mesg_text[9] = fps; msgsnd(msgid_snd, &message, sizeof(message), 0); } @@ -44,17 +49,15 @@ void update(char* data){ if (msgid_snd == 0){ msgid_snd = msgget(ftok("/tmp", 65), 0666 | IPC_CREAT); } - if (msgid_rcv == 0){ - msgid_rcv = msgget(ftok("/tmp", 66), 0666 | IPC_CREAT); - } message.mesg_type = 1; int needed_bytes = res_x*res_y; if(mode) needed_bytes *=3; - for(int j = 0; j < needed_bytes; j+=768){ - for(int i = 0; i < min(768, needed_bytes-j); i++) - message.mesg_text[i+j] = data[i+j]; + for(int j = 0; j < needed_bytes; j+=8184){ + for(int i = 0; i < min(8184, needed_bytes-j); i++) + message.mesg_text[i] = data[i+j]; msgsnd(msgid_snd, &message, sizeof(message), 0); } - msgrcv(msgid_rcv, &message, sizeof(message), 0, 0); } + +void sleepFunc(){usleep(10000000);} diff --git a/Linux/share/sasm/include/io64.inc b/Linux/share/sasm/include/io64.inc index be9c1fb4..32b83194 100644 --- a/Linux/share/sasm/include/io64.inc +++ b/Linux/share/sasm/include/io64.inc @@ -40,10 +40,39 @@ CEXTERN fgets CEXTERN puts CEXTERN fputs CEXTERN fflush +CEXTERN sleepFunc CEXTERN get_stdin CEXTERN get_stdout +%macro sleepFunc 0.nolist + sasmMacroFunc + pushfq + push rax + push rcx + push rdx + push r8 + push r9 + push r10 + push r11 + push rsi + push rdi + ALIGN_STACK + call sleepFunc + UNALIGN_STACK + pop rdi + pop rsi + pop r11 + pop r10 + pop r9 + pop r8 + pop rdx + pop rcx + pop rax + popfq + sasmMacroFuncE +%endmacro + CEXTERN update %macro updateDisplay 1.nolist sasmMacroFunc @@ -75,7 +104,7 @@ CEXTERN update %endmacro CEXTERN setup -%macro setupDisplay 3.nolist +%macro setupDisplay 4.nolist sasmMacroFunc pushfq push rax @@ -90,6 +119,7 @@ CEXTERN setup mov rdi, %1 mov rsi, %2 mov rdx, %3 + mov rcx, %4 ALIGN_STACK call setup UNALIGN_STACK diff --git a/debugger.cpp b/debugger.cpp index 4a66d29f..a871c6df 100644 --- a/debugger.cpp +++ b/debugger.cpp @@ -885,7 +885,6 @@ void Debugger::processActionMiMode(QString output, QString error) QRegExp signalMsg("\r?\n(Program received signal.*)"); while (asyncMsg.indexIn(msg) != -1){ msg.remove(asyncMsg.indexIn(msg), msg.indexOf(QChar('\n'), asyncMsg.indexIn(msg) + 7)); - printLog("yes"); } if (signalMsg.indexIn(msg) != -1) { QString recievedSignal = signalMsg.cap(1); diff --git a/displayWindow.cpp b/displayWindow.cpp index 2ec558a7..08da63ab 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -46,8 +46,15 @@ DisplayWindow::DisplayWindow(QWidget *parent) : { this->setStyleSheet("background-color:grey;"); layout = new QVBoxLayout(this); + zoom = 1; + zoomComboBox = new QComboBox; + layout->addWidget(zoomComboBox); + QStringList comboBoxList; + comboBoxList << "1" << "2" << "4" << "8" << "16" << "32"; + zoomComboBox->insertItems(0, comboBoxList); + connect(zoomComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(zoomSettingsChanged(int))); displayImageLabel = new QLabel(""); - displayPicture = new QImage(480, 480, QImage::Format_RGB32); + displayPicture = new QImage(537, 562, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); @@ -58,19 +65,25 @@ DisplayWindow::DisplayWindow(QWidget *parent) : this->setFixedSize(500,525); } -void DisplayWindow::changeDisplay(int msgid, int msgidsnd){ - this->setFixedSize(500,525); - displayPicture = new QImage(480, 480, QImage::Format_RGB32); +void DisplayWindow::changeDisplay(int msgid){ + this->setFixedSize(537,562); + displayPicture = new QImage(512, 512, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + buffer.resize(512*512); + memset(buffer.data(), 0xff, 512*512); #ifdef Q_OS_WIN32 #else - char res_x = 8; - char res_y = 8; - char mode = 0; + this->msgid = msgid; + res_x = 512; + res_y = 512; + mode = 0; + qint64 fps = 30; + QElapsedTimer programExecutionTime; memset(&message.mesg_text[0], 0xff, sizeof(message.mesg_text)); displayPicture->fill(qRgb(0, 0, 0)); displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + programExecutionTime.start(); while(1){ // msgrcv to receive message msgrcv(msgid, &message, sizeof(message), 0, 0); @@ -80,77 +93,38 @@ void DisplayWindow::changeDisplay(int msgid, int msgidsnd){ } if (message.mesg_type == 3){ res_x = message.mesg_text[0]; - res_y = message.mesg_text[1]; - mode = message.mesg_text[2]; - displayPicture = new QImage(res_x*60, res_y*60, QImage::Format_RGB32); + res_y = message.mesg_text[4]; + for(int i = 1; i < 4; i++){ + res_x += message.mesg_text[i] << (8*i); + res_y += message.mesg_text[4+i] << (8*i); + } + mode = message.mesg_text[8]; + fps = message.mesg_text[9]; + if(mode) + buffer.resize(res_x*res_y*3); + else + buffer.resize(res_x*res_y); + displayPicture = new QImage(res_x*zoom, res_y*zoom, QImage::Format_RGB32); displayPicture->fill(qRgb(0, 0, 0)); displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); - this->setFixedSize(displayPicture->size()+QSize(25,25)); + this->setFixedSize(displayPicture->size()+QSize(25,50)); continue; } - // display the message and print on display - int needed_pixel = res_x*res_y; - int currentcharx; - int currentchary; - if(mode) { - needed_pixel *= 3; - } - for(int l = 0; l < needed_pixel; l+=768) { - if(l>0) + int needed_bytes = (mode) ? res_x*res_y*3 : res_x*res_y; + for(int i = 0; i < needed_bytes; i+=8184){ + if(i>0) msgrcv(msgid, &message, sizeof(message), 0, 0); - for(int i = 0; i < std::min(768, needed_pixel-l); i++){ - if(mode){ - currentcharx = (((i+l)/3)%res_x)*60; - currentchary = ((i+l)/3/res_x)*60; - } else { - currentcharx = ((i+l)%res_x)*60; - currentchary = ((i+l)/res_x)*60; - } - // pixel makieren - for(int k = 0; k < 60; k++){ - displayPicture->setPixel(currentcharx+k, currentchary, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+k, currentchary+1, qRgb(255, 0, 0)); - } - for(int k = 2; k < 57; k++){ - displayPicture->setPixel(currentcharx, currentchary+k, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+1, currentchary+k, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+58, currentchary+k, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+59, currentchary+k, qRgb(255, 0, 0)); - } - for(int k = 0; k < 60; k++) { - displayPicture->setPixel(currentcharx+k, currentchary+58, qRgb(255, 0, 0)); - displayPicture->setPixel(currentcharx+k, currentchary+59, qRgb(255, 0, 0)); - } - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); - usleep(90000); - - if (mode){ - for(int j = 0; j < 60; j++){ - for(int k = 0; k < 60; k++){ - displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(message.mesg_text[i], message.mesg_text[i+1], message.mesg_text[i+2])); - }} - i+=2; - } else { - if(message.mesg_text[i]) { - for(int j = 0; j < 60; j++){ - for(int k = 0; k < 60; k++){ - displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(255, 255, 255)); - }} - } else { - for(int j = 0; j < 60; j++){ - for(int k = 0; k < 60; k++){ - displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(0, 0, 0)); - }} - } - } - } - } + memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); + } + updateDisplay(); + qint64 elapsed_time = programExecutionTime.elapsed(); + if(elapsed_time < 1000/fps) + usleep(1000/fps - elapsed_time); displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); - msgsnd(msgidsnd, &message, sizeof(message), 0); + programExecutionTime.start(); } msgctl(msgid, IPC_RMID, NULL); - msgctl(msgidsnd, IPC_RMID, NULL); emit closeDisplay(); #endif } @@ -165,6 +139,49 @@ void DisplayWindow::finish(int msgid){ #endif } +void DisplayWindow::zoomSettingsChanged(int value){ + zoom = std::pow(2, value); + displayPicture = new QImage(res_x*zoom, res_y*zoom, QImage::Format_RGB32); + this->setFixedSize(displayPicture->size()+QSize(25,50)); + displayPicture->fill(qRgb(0, 0, 0)); + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + updateDisplay(); + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); +} + +void DisplayWindow::updateDisplay() { + // display the message and print on display + int currentcharx; + int currentchary; + int needed_pixel = (mode) ? res_x*res_y*3 : res_x*res_y; + if (mode){ + for(int l = 0; l < needed_pixel; l+=3) { + currentcharx = ((l/3)%res_x)*zoom; + currentchary = (l/3/res_x)*zoom; + for(int j = 0; j < zoom; j++){ + for(int k = 0; k < zoom; k++){ + displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(buffer[l], buffer[l+1], buffer[l+2])); + }} + } + } else { + for(int l = 0; l < needed_pixel; l++){ + currentcharx = (l%res_x)*zoom; + currentchary = (l/res_x)*zoom; + if(buffer[l]) { + for(int j = 0; j < zoom; j++){ + for(int k = 0; k < zoom; k++){ + displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(255, 255, 255)); + }} + } else { + for(int j = 0; j < zoom; j++){ + for(int k = 0; k < zoom; k++){ + displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(0, 0, 0)); + }} + } + } + } +} + void DisplayWindow::closeEvent(QCloseEvent *) { emit closeSignal(); } diff --git a/displayWindow.h b/displayWindow.h index b8ad2889..b0c5924c 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -45,9 +45,12 @@ #include #include #include +#include +#include #include #include #include +#include #ifdef Q_OS_WIN32 #else #include @@ -60,13 +63,14 @@ class DisplayWindow : public QWidget public: struct mesg_buffer { long mesg_type; - uint8_t mesg_text[768]; + uint8_t mesg_text[8184]; } message; explicit DisplayWindow(QWidget *parent = 0); ~DisplayWindow(); - void changeDisplay(int msgid, int msgidsnd); + void changeDisplay(int msgid); void finish(int msgid); + void updateDisplay(); protected: void closeEvent(QCloseEvent *); @@ -75,6 +79,16 @@ class DisplayWindow : public QWidget QVBoxLayout *layout; QImage* displayPicture; QLabel* displayImageLabel; + QComboBox *zoomComboBox; + std::vector buffer; + int zoom; + int msgid; + int res_x; + int res_y; + int mode; + +private slots: +void zoomSettingsChanged(int value); signals: void displayChanged(void); diff --git a/mainwindow.cpp b/mainwindow.cpp index 0af55a25..f873d9cf 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1026,7 +1026,7 @@ void MainWindow::buildProgram(bool debugMode) programIsBuilded = true; } } -//TODO + void MainWindow::runProgram() { if (!programStopped) { @@ -1070,8 +1070,7 @@ void MainWindow::runProgram() displayWindow->show(); key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); - int msgid_recv = msgget(ftok("/tmp", 66), 0666 | IPC_CREAT); - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid, msgid_recv); + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); #endif //! Run program in code directory if it exists @@ -1240,8 +1239,7 @@ void MainWindow::debug() displayWindow->show(); key_t key = ftok("/tmp", 65); //returned -1 msgid = msgget(key, 0666 | IPC_CREAT); - int msgid_recv = msgget(ftok("/tmp", 66), 0666 | IPC_CREAT); - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid, msgid_recv); + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); #endif debugger = new Debugger(compilerOut, exePath, workingDirectoryPath, inputPath, assembler, 0, settings.value("sasmverbose", false).toBool(), settings.value("mi", false).toBool()); @@ -1633,10 +1631,10 @@ void MainWindow::debugExit() void MainWindow::closeDisplay(){ consumer->join(); - if (displayWindow) { + /*if (displayWindow) { displayWindow->close(); delete displayWindow; - } + }*/ } void MainWindow::showAnyCommandWidget() diff --git a/mainwindow.h b/mainwindow.h index a070b3d2..1a529ccf 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -238,7 +238,6 @@ class MainWindow : public QMainWindow // display QPointer displayWindow; - //DisplayWindow *displaywdg; std::thread *consumer; int msgid; From 463112a0532b7470458d17ef170f69408678e989 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 25 Jun 2021 10:23:59 +0200 Subject: [PATCH 54/86] display for Windows --- Windows/NASM/macro.o | Bin 2141 -> 12412 bytes Windows/include/io.inc | 36 +++++++++++++++ displayWindow.cpp | 97 ++++++++++++++++++++++++++++++++++++++--- displayWindow.h | 9 +++- mainwindow.cpp | 56 +++++++++++++++++------- mainwindow.h | 1 + 6 files changed, 176 insertions(+), 23 deletions(-) diff --git a/Windows/NASM/macro.o b/Windows/NASM/macro.o index 6b143ba46a16b4386ce7edf2effc7f80cb0ba54d..787e927a7d949c48f8473a8fad8935e8065d8535 100644 GIT binary patch literal 12412 zcmcIqYj7Labv}y+31BIS5~;Uj!;WOj50Mfj+p;X#1c4<58w3~tBqc`<1OiJE5{PAi zg(Pb7aE8`Is`8LJanc{2#&Obgrjtz4nNI39&RDjSxJlcon)kzP(#GyMwK{QHHTC3C z^*i_OQ)H(7lO169obNmL-1lSe-Hg&je0AMT)F-5n(r4B`=(kgFBJvSjeu=}?=CB7DqLFyjr-+iyo@DlRc+UA3#-JV@OFb*wr8_{!j zNjQLq@VECK30U`w@V5a+ zWZ~IVoJat7eEGt7_XVx@+>@{V==$|@XMc?Q1ugPP4tzoD`XqZ?^@X!cKEoJfHhCrj z`KxE&f*5>RyT;5LLl?Abie(i;S37-FlZ~p5156*og%!YyvU)ahnm!TK6 zYs%uguLa-p?5Zz_rgQGB^5g5*p>SO1&IX`}%%8p7K8bvB+u{86TF-8@b=F0%z%yd$ z9Ni$wgmIDO#j9IH_AFzQ>LZtU?oq7f1Hi&5Uq1frRYhUcB0SUVBpnbDbeevC|lfS@E!=Fg@ z|GQ@1r(NS3MiYKOdvnzX^y}BJf9<7<7byTw_$zqS8uM+l&lKbDQ96n-`6$g(4SyX{ zffD$S(io-j*I=JC+VyI@VVLnsQ!kr(e7aWGnU` zcgOGT+tarzzH@HR0B&Zxp&y*l8+x-=fm&`>W)Ifx*>`Vz=L~fv_a7Z^>CM*BM59_e zn$lY*Ok@6NAyF7TI$3K}jZ>|oSytxCm8QW+Uq!_AA?}s90-?@!qlI+o)p)I8QXtUT znl+kc+>eIBb)zvOEh18Oflye4R5~iNJEoGpGLT@6qXsgDID(nAmWqi0EIg`KLjl#*gX{P6l#Z1_fj|_f<~xQfrroIzv3AL z?xdB%bvW8t1h$Hajx^%xcprtc+(L$>t`rw1SnC zmQ0T(GPIJF^ls`F77$iTVSv_1VK4OvlYP`Hfqk@A0C2lbB9PXzG?7D@Y+&h7UMq}e zinNiHF(h~s3x&k6mdNK5M`$yvNhxn(dAy+IQ`&GktEFfw1DP?-=S@TB?*AdRR*q zDP>!@kj4OCb zF5=++0 zt=4e4Vj9f_>g;7A9OC}lBUSPE=F`XUZ`qc8niKJFa zVw4z>9wKa!NTpCdg;FM6K#99#l*!S=;gU9?Ws3!hVIag1RiQ}b1@t|koTNzgX>`G8 zsWdlLsx$d`KF!7Fs1tL`{l(oqK%*t2byA1% zFS%<+OQ&iLq5jHI=gP+o@V|C}T7!Y#Fwk3?o-?XCMKpyY>lK4YsnDLo9Jr8fOdHL) zvRN}46n#NEwyoY+mx(@SK^_r)!w@#+t^w-ZX1^i=tnaHlleH^xtdi4YO9R z7fdV+<|uka;r7rgSqpo`gN>G(t=V#&qCfY51+!}5oMMV90oTcBxn4Ia6zy7q73LQx zy2T6YtyXzP$Ev|Zfkp>B)EK6JF7xO^OF=v74|}M5yV0mMW^!VMQ!Mis96jRUhcLe- z&C?V;?g2-QM(qU0{2mWz#auvdLE0$#)KZR@ITZb@he%XU)>?X@);K}YFD;7?Q1ov- z1W#Tvu@rsf23$HjWYnviwx4-eCsDugfO*3(9b#S3t%>}6B{^GeH1zsVdwQCE-Qs7_ zN=`4>+%7*?Fxyi$bR#PEJx~Yc|Gglll2<ShtIcG@}{V-7dD;Cu~6H{7LEYM2s&_uDdKXQsdW^|qF*vid%7ttE+xe@tBLa_~g-0F<6jea!DFayv~h}Uap9Cc)t;f))*BFOjEmhQaGABS0+MI-k=V^5 zZ#H2yUA&@EEPexn$=?oii;qe-#_DK6qU9pot;>*)4MzPzMaH$%a=MD*@WhYb9tqG$JcNDwBW1LK; zhB0wI(rnZzcBh{}Me|g+Fvg>K>@Gjap;DL)4OGG1ekzG~+H#{h)HY4b#<87C*ePSk zI8CuWKT*UcslfaFcyd<9*vJ8P`H4(gVEAvt)8Cp(%e04UiKf&OOG^bPH;&Nd+Eu-!wIZG zD|KCxBVMww&@%NoNgVPJ=_;>J&4uv>7Q|xZ8B2TV2GUa*Zt56g14k zE@&63ocqPPQSEYR?;G0ysViIt0Z-Pdx-bxHZ*}EwClPd&%et$tF$3E|P|Y&l6`G`W zyGA@#-(c9nHiBz#14-%{m-7ckxE`0otjIB9fFiYbIk>=+m%7%a3bncUx-OcfI zvq;sn0Q#kFSBXl5`;sGD8Tb|O2D zy2WJ*^LhnKI@^F7ISON|Yk=h2V}Y#u`-Sbdl z?`5e8KaRDr=rBWm*nX{0lYV?SmmkHTTts41ekPZ}o>6{?RLzg`Adbz}1gXPIi9&IN z)Dah-sOhJy^|k65_A%c1-s9DR8w8vkqUb}d6}e50`$&28LF$ALwStVNZF+J!+8Uz{ zFUQICza8fhpNZ$aLVeW7SnWQKQE)RGTNmMgPxf6N8>oupv2n-#znKU~C?AdgX17j`QSgJsRdIg#ud=<%hf zGl`vWxgrixGI&$z%DZoI7B)a#1s6<;!#JkI+}&0DZ4`oyFUN^kCVmTpK$9-z#&UQm z2-71jDyBD?qDMU_x}bA*aMZ65}1xusGBc&;lu{g!pW6t=LCZy7)-UGMb)mk+MPp5jGJglBBHM3a`>; zU3(s%ljx+}|0=e5{}g}aseXJ_upVd`C~y7-F42am_H>C4$Vl1GQ3fu}Zm5v*0Goy` zz5e`rHv%MO^i#NpF1-qU73ron(99qvsQG(8XLYH27{=Mr_ z6fW?+=ikezUn^7prk(noGWA#O)c460&2D-UZr+YRr+&SadYnJD%B{IlQ%BdX=%tof ztu;uAtcTrB{FSG+qK7ezohwp0SKma~i^t)Y;KCt3sI)COU@cyw*lo7ToE+g zV<&6%4#cqq)@y`-^M;;~!YPA+@ZM`B0$yYy)_PMFz=ss;`jm$@%7os&kqcsQ!$*fU za>~|+oeZ$y1~(+D8=5A`{gv%>gNM| zs_gHd!&H8%zt*VK+c*^=?~y({aU(POW;q>bTsW1MGR|D8`m`fAESQhp&4u}vB-%I% zJJpaf{M2hxQZ}ZJ*Q#|XS7zF^ss-1vHC=bKvSV`!E_KT%B5q-iTZTZ(6Xmo1K>NVQ zrvtZd3f$VWxcJ5A+V}t=c!_V3?~41ka927W?l}InuU`tJHbp)jsR!=c5IGphJo=iT zK7)H8av1l}clg%vAm2|~#vg_87eD@BHL!cbOe7OI$i_i4@-UuChuIPA{;NO$rC&Xj zHN@uoWYfR^CqCFHv?~>CG1Evgxj(*RwAL7z>@%7(ap*h6_ZT~O-yuKDz!?x%DlX+r zo|Jb*l+9hC&^gorw*&rjD-a)zBvwYw28LFIhra>~$sGW<5`XUOWbpG19qB8M^ixRE?iUWmyV9d;!CcH>TA$KQ0wunUmx64>L8-De=(EwI0Eu;(Fh`S#M^ zK$2d*14(-MAtdSL-yzAI{{oUsJ$Eo!2Hd2jw9b+EGYyIDge3De3rTvOgCz6TcGxqH z^n@cl2}!2vX-G2cA48I<`kZ6;Lr5}jJY&n)?t&z-1CXSb5lGTY29oshc1SYB5lFH$ zbVxG9JR}*S4M~Q;Ac+#gL?CJ(a}Db44DJ|3fsLZ!$($c^q$VU;YKso`QAjf0PeGDi zegbKe@baIIq+k-4>^euf8IrV1JJ=^2?9UwOd53+&kvcJlN`E^XiF33@#LJ%&N;Zs| zmQvipdTG#+jyclfj`S%<>JyvuP;vbaK9`$Oyo0pF`Ht^e#HCQ20*G(9s|t|IQ`iWD zdE9vkA(4_?_fX13to0hN)})R1J7kU~sPL?GKP30^euIqW1e>T!T9WtsV>p1#(nNc| zJq`(*k1h4%`R+I@Y}PHYVc-c1<@yOK{ME7e=7R2=#RN}aE z4*l0>EtPW}RQOBdrLO+cvf=s&Drln1Twk^@70;mZwq-1c{@y~lPXv|caOYBRFRU1O zH7_nsX@CT>AZHW{5o>vA!*u~0Ud!X+Tv|4AG4HHKWUjx@M%E>f*K8F}_`#t?!$IPV zRNM3TMA5n!;p;yvoybPqHY`HTW7EN$wybQMHBPbGNZg0)h1OT)Bfe6Nzm%}#^3+sQ zKj~=Aa)WmWEwYYHSzB)5Geg-1x1Bk2hWhl`(zG~{D_Lu8tfXy`m))ghmgv8m_)FNG zEtSM4hj>(GPqfSvrMVWBjYK4pdar35a8dV{pp)I8=RXHF<0%%<=z47FE^FDs_-prdB&kZq4 zOn+KLr<7z0FAG1&l&l%sZwsR9z%WTPmsZ~KIzbjF%d^=gt?YZPG<`Ngdp-fKzFJ28 zhMeD`HOG19;NGOg%k{HsCEy;kZKGt;xbrI|;|{dPN8wh_mT)e#Et6<}YP~A&g>v3I zz$L)_F~(u4I`7&=NC)&5#HYYLF2!5f+}?Zg1EX#}nn-u|-J6fT{uP0w8g7a=wzl0X z?y9%uog?7~>A-L0alhlW>B@Su{b6(~PMW>pAZ%V8#Mvlr0-;8pR2*^4nLJ73CSU~R^BC7e!7H7nEp;SB6*i(`2y57NBHcdQccru1!+j~ zo_5=&-|Ytx$B zkY$dr9BEp-g37hVjn_$jxyvTo>JO91RZK0<)CRp&OD~m`84-n_524DmB%89~`nR#@ns$nlz8#Ru)iKw;^ zjT#4;eIC=BTP;Rhs%}(aVZsD)nlh7nKKzhv?)lzJ%5Cm>k&Hp7h;;{zZQRdm+2;O) zl5?ATF3j|}GfD@eB9y|gh3O+SNj-2O{#uv^7d$OA(O$0);v~9NZ^cR7^XmP$RgcL%4T@(nqMe9Q1NiQP9z+_uH(s%hRw zex5luo;RS(!Pqo|-ViRhI#=iq=;2tz9S7zP_~FI< zG{*3)GX%d3hvWP_#&9R;7jUl=w(`i2lkRXL2d&m9e1D?#hwX_NjDjQz(}~)TlaRcy c=XXc^Q}qvigA4nKOXG(zWP1>3)2PsetFixedSize(500,525); } -void DisplayWindow::changeDisplay(int msgid){ +void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ this->setFixedSize(537,562); displayPicture = new QImage(512, 512, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); buffer.resize(512*512); memset(buffer.data(), 0xff, 512*512); - #ifdef Q_OS_WIN32 - #else this->msgid = msgid; res_x = 512; res_y = 512; @@ -84,7 +82,67 @@ void DisplayWindow::changeDisplay(int msgid){ displayPicture->fill(qRgb(0, 0, 0)); displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); programExecutionTime.start(); - while(1){ + #ifdef Q_OS_WIN32 + if(!ConnectNamedPipe(hCreateNamedPipe, NULL)) + emit printLog(QString("Connection Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); + while(1){ + DWORD dwNoBytesRead; + BOOL readSuccess = ReadFile( + hCreateNamedPipe, + message.mesg_text, + 8184, + &dwNoBytesRead, + NULL); + if(!readSuccess){ + if(GetLastError()!=109) + emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); + break; + } + if(message.mesg_text[0]==3){ + res_x = message.mesg_text[1]; + res_y = message.mesg_text[5]; + for(int i = 1; i < 4; i++){ + res_x += message.mesg_text[1+i] << (8*i); + res_y += message.mesg_text[5+i] << (8*i); + } + mode = message.mesg_text[9]; + fps = message.mesg_text[10]; + if(mode) + buffer.resize(res_x*res_y*3); + else + buffer.resize(res_x*res_y); + displayPicture = new QImage(res_x*zoom, res_y*zoom, QImage::Format_RGB32); + displayPicture->fill(qRgb(0, 0, 0)); + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + this->setFixedSize(displayPicture->size()+QSize(25,50)); + continue; + } + // display the message and print on display + int needed_bytes = (mode) ? res_x*res_y*3 : res_x*res_y; + for(int i = 0; i < needed_bytes; i+=8184){ + dwNoBytesRead = 0; + BOOL readSuccess = ReadFile( + hCreateNamedPipe, + message.mesg_text, + 8184, + &dwNoBytesRead, + NULL); + if(!readSuccess){ + emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); + break; + } + memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); + } + updateDisplay(); + qint64 elapsed_time = programExecutionTime.elapsed(); + if(elapsed_time < 1000/fps) + usleep(1000/fps - elapsed_time); + displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + programExecutionTime.start(); + } + CloseHandle(hCreateNamedPipe); + #else + while(1){ // msgrcv to receive message msgrcv(msgid, &message, sizeof(message), 0, 0); @@ -118,19 +176,46 @@ void DisplayWindow::changeDisplay(int msgid){ memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); } updateDisplay(); - qint64 elapsed_time = programExecutionTime.elapsed(); + qint64 elapsed_time = programExecutionTime.elapsed(); if(elapsed_time < 1000/fps) usleep(1000/fps - elapsed_time); displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); programExecutionTime.start(); } msgctl(msgid, IPC_RMID, NULL); + #endif emit closeDisplay(); - #endif } void DisplayWindow::finish(int msgid){ #ifdef Q_OS_WIN32 + /*char c[8184]; + c[0] = 2; + HANDLE hFile = CreateFileW( + L"\\\\.\\pipe\\SASMPIPE", + GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + 0, + NULL); + if(hFile == INVALID_HANDLE_VALUE){ + emit printLog(QString("Could not create file object (")+QString::number(GetLastError())+")\n", Qt::red); + return; + } + DWORD dwNoBytesWrote = 0; + BOOL writeSuccess = WriteFile( + hFile, + c, + sizeof(c), + &dwNoBytesWrote, + NULL); + if(!writeSuccess){ + emit printLog(QString("Could not write to file (")+QString::number(GetLastError())+")\n", Qt::red); + } + if(!FlushFileBuffers(hFile)){ + emit printLog(QString("Could not flush the file (")+QString::number(GetLastError())+")\n", Qt::red); + }*/ #else mesg_buffer end; end.mesg_type = 2; diff --git a/displayWindow.h b/displayWindow.h index b0c5924c..d1035c51 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -52,10 +52,14 @@ #include #include #ifdef Q_OS_WIN32 +#include +#include +#include #else #include #include #endif +#define BUF_SIZE 256 class DisplayWindow : public QWidget { @@ -63,12 +67,12 @@ class DisplayWindow : public QWidget public: struct mesg_buffer { long mesg_type; - uint8_t mesg_text[8184]; + char mesg_text[8184]; } message; explicit DisplayWindow(QWidget *parent = 0); ~DisplayWindow(); - void changeDisplay(int msgid); + void changeDisplay(int msgid, HANDLE hCreateNamedPipe); void finish(int msgid); void updateDisplay(); @@ -94,6 +98,7 @@ void zoomSettingsChanged(int value); void displayChanged(void); void closeSignal(); void closeDisplay(); + void printLog(QString msg, QColor color = QColor(Qt::black)); }; #endif diff --git a/mainwindow.cpp b/mainwindow.cpp index f873d9cf..ab825beb 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -12,7 +12,7 @@ ** (at your option) any later version. ** ** SASM is distributed in the hope that it will be useful, -** but WITHOUT ANY WARRANTY; without even the implied warranty of +** but WITHOUT ANY WARRANTY; without even the implieddwarranty of ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ** GNU General Public License for more details. ** @@ -1058,19 +1058,34 @@ void MainWindow::runProgram() runProcess->setStandardInputFile(input); // start display - #ifdef Q_OS_WIN32 - #else if (!displayWindow) { displayWindow = new DisplayWindow; displayWindow->setWindowIcon(QIcon(":images/mainIcon.png")); displayWindow->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); displayWindow->activateWindow(); } - if (settings.value("display", false).toBool()) - displayWindow->show(); + if (settings.value("display", false).toBool()){ + displayWindow->show(); + } + #ifdef Q_OS_WIN32 + // --- TODO --- + HANDLE hCreateNamedPipe = CreateNamedPipe( + TEXT("\\\\.\\pipe\\sasmpipe"), + PIPE_ACCESS_INBOUND, + PIPE_TYPE_BYTE|PIPE_READMODE_MESSAGE|PIPE_WAIT, + PIPE_UNLIMITED_INSTANCES, + 8184, + 8184, + 0, + NULL); + if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ + printLog(QString("Couldnt create Pipe\n"), Qt::red); + } + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1, hCreateNamedPipe); + #else key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid, nullptr); #endif //! Run program in code directory if it exists @@ -1223,28 +1238,39 @@ void MainWindow::debug() QString inputPath = Common::pathInTemp("input.txt"); inputPath.replace("\\", "/"); - // start display Linux - #ifdef Q_OS_WIN32 - #else - if (!displayWindow) { + // start display + if (!displayWindow) { displayWindow = new DisplayWindow; displayWindow->setWindowIcon(QIcon(":images/mainIcon.png")); - //displayWindow->setFixedSize(500,525); - //displayWindow->setFixedSize(600,625); displayWindow->setWindowFlags(Qt::Widget | Qt::MSWindowsFixedSizeDialogHint); displayWindow->activateWindow(); - //displaywdg->setParent(this); } if (settings.value("display", false).toBool()) displayWindow->show(); - key_t key = ftok("/tmp", 65); //returned -1 + #ifdef Q_OS_WIN32 + HANDLE hCreateNamedPipe = CreateNamedPipe( + L"\\\\.\\pipe\\sasmpipe", + PIPE_ACCESS_INBOUND, + PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, + PIPE_UNLIMITED_INSTANCES, + 8184, + 8184, + 0, + NULL); + if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ + printLog(QString("Couldnt create Pipe"+QString::number(GetLastError()))+"\n", Qt::red); + } + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1, hCreateNamedPipe); + #else + key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid, nullptr); #endif debugger = new Debugger(compilerOut, exePath, workingDirectoryPath, inputPath, assembler, 0, settings.value("sasmverbose", false).toBool(), settings.value("mi", false).toBool()); // connect print signals for output in Debugger connect(debugger, SIGNAL(printLog(QString,QColor)), this, SLOT(printLog(QString,QColor))); + connect(displayWindow, SIGNAL(printLog(QString,QColor)), this, SLOT(printLog(QString,QColor))); // remove connect(debugger, SIGNAL(printOutput(QString)), this, SLOT(printOutput(QString))); connect(debugger, SIGNAL(highlightLine(int)), code, SLOT(updateDebugLine(int))); connect(debugger, SIGNAL(finished()), this, SLOT(debugExit()), Qt::QueuedConnection); diff --git a/mainwindow.h b/mainwindow.h index 1a529ccf..3734612b 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -80,6 +80,7 @@ #include "displayWindow.h" #include #ifdef Q_OS_WIN32 +#include #else #include #include From 2d7f9e55799561229a5fbee32dbb1384d8298bf3 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 25 Jun 2021 10:26:11 +0200 Subject: [PATCH 55/86] added display for Windows --- Windows/NASM/macroWind.c | 100 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 Windows/NASM/macroWind.c diff --git a/Windows/NASM/macroWind.c b/Windows/NASM/macroWind.c new file mode 100644 index 00000000..36c54dd4 --- /dev/null +++ b/Windows/NASM/macroWind.c @@ -0,0 +1,100 @@ +#include +#include +#include +#include + +FILE *get_stdin(void) { return stdin; } +FILE *get_stdout(void) { return stdout; } +void sasm_replace_stdin(void) {dup2(open("input.txt",0),0);} + +int res_x = 512; +int res_y = 512; +char mode = 0; +char fps = 1; +HANDLE hFile; + +void setup(int x, int y, char mode_, char fps_){ + res_x = x; + res_y = y; + mode = mode_; + fps = fps_; + char c[8184]; + c[0] = 3; + for(int i = 0; i < 4; i++){ + c[i+1] = (res_x >> (8*i)) & 0xff; + c[i+5] = (res_y >> (8*i)) & 0xff; + } + c[9] = mode; + c[10] = fps; + + if(hFile == NULL){ + hFile = CreateFileW( + L"\\\\.\\pipe\\SASMPIPE", + GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + 0, + NULL); + if(hFile == NULL | hFile == INVALID_HANDLE_VALUE){ + printf("Could not create file object (%ld).\n", GetLastError()); + return; + } + } + + long dwNoBytesWrote; + BOOL writeSuccess = WriteFile( + hFile, + &c, + 8184, + &dwNoBytesWrote, + NULL); + if(!FlushFileBuffers(hFile)){ + printf("Could not flush the file (%d).\n", GetLastError()); + } +} + +void update(char* data){ + int buf_size = (mode) ? res_x*res_y*3 : res_x*res_y; + char c[8184]; + c[0] = 4; + + if(hFile == NULL){ + hFile = CreateFileW( + L"\\\\.\\pipe\\SASMPIPE", + GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + 0, + NULL); + if(hFile == NULL | hFile == INVALID_HANDLE_VALUE){ + printf("Could not create file object (%ld).\n", GetLastError()); + return; + } + } + + long dwNoBytesWrote; + BOOL writeSuccess = WriteFile( + hFile, + &c, + 8184, + &dwNoBytesWrote, + NULL); + for(int i = 0; i Date: Sun, 4 Jul 2021 11:11:57 +0200 Subject: [PATCH 56/86] fixed scaling --- displayWindow.cpp | 62 +++++++++++++++++------------------------------ displayWindow.h | 3 ++- mainwindow.cpp | 6 ++--- 3 files changed, 27 insertions(+), 44 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index 4e136cb4..f7ca69c2 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -54,22 +54,15 @@ DisplayWindow::DisplayWindow(QWidget *parent) : zoomComboBox->insertItems(0, comboBoxList); connect(zoomComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(zoomSettingsChanged(int))); displayImageLabel = new QLabel(""); - displayPicture = new QImage(537, 562, QImage::Format_RGB32); - displayPicture->fill(qRgb(255, 255, 255)); - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); layout->addWidget(displayImageLabel, Qt::AlignTop); setLayout(layout); - this->resize(displayPicture->size()); this->setFixedSize(500,525); } void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ - this->setFixedSize(537,562); displayPicture = new QImage(512, 512, QImage::Format_RGB32); - displayPicture->fill(qRgb(255, 255, 255)); - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); buffer.resize(512*512); memset(buffer.data(), 0xff, 512*512); this->msgid = msgid; @@ -78,9 +71,9 @@ void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ mode = 0; qint64 fps = 30; QElapsedTimer programExecutionTime; - memset(&message.mesg_text[0], 0xff, sizeof(message.mesg_text)); - displayPicture->fill(qRgb(0, 0, 0)); - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + displayPicture->fill(qRgb(255, 255, 255)); + this->setFixedSize(QSize(512*zoom+25, 512*zoom+75)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(512*zoom,512*zoom))); programExecutionTime.start(); #ifdef Q_OS_WIN32 if(!ConnectNamedPipe(hCreateNamedPipe, NULL)) @@ -111,10 +104,10 @@ void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ buffer.resize(res_x*res_y*3); else buffer.resize(res_x*res_y); - displayPicture = new QImage(res_x*zoom, res_y*zoom, QImage::Format_RGB32); - displayPicture->fill(qRgb(0, 0, 0)); - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); - this->setFixedSize(displayPicture->size()+QSize(25,50)); + displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); + displayPicture->fill(qRgb(255, 255, 255)); + this->setFixedSize(QSize(res_x*zoom+25, res_y*zoom+75)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); continue; } // display the message and print on display @@ -137,7 +130,7 @@ void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ qint64 elapsed_time = programExecutionTime.elapsed(); if(elapsed_time < 1000/fps) usleep(1000/fps - elapsed_time); - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); programExecutionTime.start(); } CloseHandle(hCreateNamedPipe); @@ -162,10 +155,10 @@ void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ buffer.resize(res_x*res_y*3); else buffer.resize(res_x*res_y); - displayPicture = new QImage(res_x*zoom, res_y*zoom, QImage::Format_RGB32); + displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); displayPicture->fill(qRgb(0, 0, 0)); - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); - this->setFixedSize(displayPicture->size()+QSize(25,50)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); + this->setFixedSize(QSize(res_x*zoom+25, res_x*zoom+75)); continue; } // display the message and print on display @@ -179,7 +172,7 @@ void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ qint64 elapsed_time = programExecutionTime.elapsed(); if(elapsed_time < 1000/fps) usleep(1000/fps - elapsed_time); - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); programExecutionTime.start(); } msgctl(msgid, IPC_RMID, NULL); @@ -188,6 +181,7 @@ void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ } void DisplayWindow::finish(int msgid){ + this->msgid = msgid; #ifdef Q_OS_WIN32 /*char c[8184]; c[0] = 2; @@ -226,12 +220,9 @@ void DisplayWindow::finish(int msgid){ void DisplayWindow::zoomSettingsChanged(int value){ zoom = std::pow(2, value); - displayPicture = new QImage(res_x*zoom, res_y*zoom, QImage::Format_RGB32); - this->setFixedSize(displayPicture->size()+QSize(25,50)); - displayPicture->fill(qRgb(0, 0, 0)); - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); updateDisplay(); - displayImageLabel->setPixmap(QPixmap::fromImage(*displayPicture)); + this->setFixedSize(QSize(res_x*zoom+25, res_y*zoom+75)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom, res_y*zoom))); } void DisplayWindow::updateDisplay() { @@ -241,27 +232,18 @@ void DisplayWindow::updateDisplay() { int needed_pixel = (mode) ? res_x*res_y*3 : res_x*res_y; if (mode){ for(int l = 0; l < needed_pixel; l+=3) { - currentcharx = ((l/3)%res_x)*zoom; - currentchary = (l/3/res_x)*zoom; - for(int j = 0; j < zoom; j++){ - for(int k = 0; k < zoom; k++){ - displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(buffer[l], buffer[l+1], buffer[l+2])); - }} + currentcharx = (l/3)%res_x; + currentchary = l/3/res_x; + displayPicture->setPixel(currentcharx, currentchary, qRgb(buffer[l], buffer[l+1], buffer[l+2])); } } else { for(int l = 0; l < needed_pixel; l++){ - currentcharx = (l%res_x)*zoom; - currentchary = (l/res_x)*zoom; + currentcharx = l%res_x; + currentchary = l/res_x; if(buffer[l]) { - for(int j = 0; j < zoom; j++){ - for(int k = 0; k < zoom; k++){ - displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(255, 255, 255)); - }} + displayPicture->setPixel(currentcharx, currentchary, qRgb(255, 255, 255)); } else { - for(int j = 0; j < zoom; j++){ - for(int k = 0; k < zoom; k++){ - displayPicture->setPixel(currentcharx+j, currentchary+k, qRgb(0, 0, 0)); - }} + displayPicture->setPixel(currentcharx, currentchary, qRgb(0, 0, 0)); } } } diff --git a/displayWindow.h b/displayWindow.h index d1035c51..1de2fc9f 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include @@ -67,7 +68,7 @@ class DisplayWindow : public QWidget public: struct mesg_buffer { long mesg_type; - char mesg_text[8184]; + uint8_t mesg_text[8184]; } message; explicit DisplayWindow(QWidget *parent = 0); diff --git a/mainwindow.cpp b/mainwindow.cpp index ab825beb..a8b77863 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1070,16 +1070,16 @@ void MainWindow::runProgram() #ifdef Q_OS_WIN32 // --- TODO --- HANDLE hCreateNamedPipe = CreateNamedPipe( - TEXT("\\\\.\\pipe\\sasmpipe"), + L"\\\\.\\pipe\\sasmpipe", PIPE_ACCESS_INBOUND, - PIPE_TYPE_BYTE|PIPE_READMODE_MESSAGE|PIPE_WAIT, + PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, 8184, 8184, 0, NULL); if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ - printLog(QString("Couldnt create Pipe\n"), Qt::red); + printLog(QString("Couldnt create Pipe"+QString::number(GetLastError()))+"\n", Qt::red); } consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1, hCreateNamedPipe); #else From b3e23a2e32d0f62e66cd18637879dedd08c2b414 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sun, 4 Jul 2021 18:48:12 +0200 Subject: [PATCH 57/86] added scrolls --- displayWindow.cpp | 48 ++++++++++++++++++++++++++++++----------------- displayWindow.h | 7 ++++++- mainwindow.cpp | 5 +++++ 3 files changed, 42 insertions(+), 18 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index f7ca69c2..d31f6c3f 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -44,35 +44,47 @@ DisplayWindow::DisplayWindow(QWidget *parent) : QWidget(parent) { + zoom = 1; + this->setFixedSize(QSize(512+50, 512+125)); this->setStyleSheet("background-color:grey;"); - layout = new QVBoxLayout(this); - zoom = 1; - zoomComboBox = new QComboBox; - layout->addWidget(zoomComboBox); + verticalLayout = new QVBoxLayout(this); + zoomComboBox = new QComboBox(this); QStringList comboBoxList; - comboBoxList << "1" << "2" << "4" << "8" << "16" << "32"; - zoomComboBox->insertItems(0, comboBoxList); - connect(zoomComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(zoomSettingsChanged(int))); - displayImageLabel = new QLabel(""); + comboBoxList << "1" << "2" << "4" << "8" << "16" << "32"; + zoomComboBox->insertItems(0, comboBoxList); + connect(zoomComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(zoomSettingsChanged(int))); - layout->addWidget(displayImageLabel, Qt::AlignTop); + verticalLayout->addWidget(zoomComboBox); - setLayout(layout); - this->setFixedSize(500,525); + scrollArea = new QScrollArea(this); + scrollArea->setWidgetResizable(true); + scrollAreaWidgetContents = new QWidget(); + //scrollAreaWidgetContents->setGeometry(QRect(0, 0, 1218, 1218)); + horizontalLayout = new QHBoxLayout(scrollAreaWidgetContents); + displayImageLabel = new QLabel(scrollAreaWidgetContents); + displayImageLabel->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 85, 127);")); + displayImageLabel->setMinimumSize(QSize(150, 150)); + + horizontalLayout->addWidget(displayImageLabel); + + scrollArea->setWidget(scrollAreaWidgetContents); + + verticalLayout->addWidget(scrollArea); } void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ displayPicture = new QImage(512, 512, QImage::Format_RGB32); + displayPicture->fill(qRgb(255, 255, 255)); buffer.resize(512*512); memset(buffer.data(), 0xff, 512*512); + scrollAreaWidgetContents->setFixedSize(512*zoom+26, 512*zoom+26); this->msgid = msgid; res_x = 512; res_y = 512; mode = 0; qint64 fps = 30; QElapsedTimer programExecutionTime; - displayPicture->fill(qRgb(255, 255, 255)); - this->setFixedSize(QSize(512*zoom+25, 512*zoom+75)); + this->setFixedSize(QSize(512+60, 512+92)); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(512*zoom,512*zoom))); programExecutionTime.start(); #ifdef Q_OS_WIN32 @@ -106,7 +118,8 @@ void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ buffer.resize(res_x*res_y); displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); - this->setFixedSize(QSize(res_x*zoom+25, res_y*zoom+75)); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); continue; } @@ -158,7 +171,7 @@ void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); displayPicture->fill(qRgb(0, 0, 0)); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); - this->setFixedSize(QSize(res_x*zoom+25, res_x*zoom+75)); + this->setFixedSize(QSize(res_x+60, res_y+92)); continue; } // display the message and print on display @@ -221,7 +234,8 @@ void DisplayWindow::finish(int msgid){ void DisplayWindow::zoomSettingsChanged(int value){ zoom = std::pow(2, value); updateDisplay(); - this->setFixedSize(QSize(res_x*zoom+25, res_y*zoom+75)); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom, res_y*zoom))); } @@ -240,7 +254,7 @@ void DisplayWindow::updateDisplay() { for(int l = 0; l < needed_pixel; l++){ currentcharx = l%res_x; currentchary = l/res_x; - if(buffer[l]) { + if(buffer[l]){ displayPicture->setPixel(currentcharx, currentchary, qRgb(255, 255, 255)); } else { displayPicture->setPixel(currentcharx, currentchary, qRgb(0, 0, 0)); diff --git a/displayWindow.h b/displayWindow.h index 1de2fc9f..8a8f3d80 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -46,7 +46,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -81,10 +83,13 @@ class DisplayWindow : public QWidget void closeEvent(QCloseEvent *); private: - QVBoxLayout *layout; + QVBoxLayout *verticalLayout; + QHBoxLayout *horizontalLayout; QImage* displayPicture; QLabel* displayImageLabel; QComboBox *zoomComboBox; + QScrollArea *scrollArea; + QWidget *scrollAreaWidgetContents; std::vector buffer; int zoom; int msgid; diff --git a/mainwindow.cpp b/mainwindow.cpp index a8b77863..bb2bee17 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2517,4 +2517,9 @@ MainWindow::~MainWindow() { //! Delete all temporary files removeDirRecuresively(Common::pathInTemp(QString())); + // close display + if(displayWindow){ + displayWindow->close(); + delete displayWindow; + } } From bd061a3b4b7e2507c1edeaddc2a0de3dda79ccf5 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sun, 4 Jul 2021 19:14:21 +0200 Subject: [PATCH 58/86] added scrollbars --- displayWindow.cpp | 2 +- displayWindow.h | 5 ++++- mainwindow.cpp | 6 ++++-- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index d31f6c3f..c3a54e21 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -72,7 +72,7 @@ DisplayWindow::DisplayWindow(QWidget *parent) : verticalLayout->addWidget(scrollArea); } -void DisplayWindow::changeDisplay(int msgid, HANDLE hCreateNamedPipe){ +void DisplayWindow::changeDisplay(int msgid){ displayPicture = new QImage(512, 512, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); buffer.resize(512*512); diff --git a/displayWindow.h b/displayWindow.h index 8a8f3d80..10009709 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -75,9 +75,12 @@ class DisplayWindow : public QWidget explicit DisplayWindow(QWidget *parent = 0); ~DisplayWindow(); - void changeDisplay(int msgid, HANDLE hCreateNamedPipe); + void changeDisplay(int msgid); void finish(int msgid); void updateDisplay(); + #ifdef Q_OS_WIN32 + HANDLE hCreateNamedPipe; + #endif protected: void closeEvent(QCloseEvent *); diff --git a/mainwindow.cpp b/mainwindow.cpp index bb2bee17..28302b6a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1081,7 +1081,8 @@ void MainWindow::runProgram() if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ printLog(QString("Couldnt create Pipe"+QString::number(GetLastError()))+"\n", Qt::red); } - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1, hCreateNamedPipe); + displayWindow->hCreateNamedPipe = hCreateNamedPipe; + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1); #else key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); @@ -1260,7 +1261,8 @@ void MainWindow::debug() if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ printLog(QString("Couldnt create Pipe"+QString::number(GetLastError()))+"\n", Qt::red); } - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1, hCreateNamedPipe); + displayWindow->hCreateNamedPipe = hCreateNamedPipe; + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1); #else key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); From 889fc576e0c1c1b16329bac0ab5d8d6696a82208 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sun, 4 Jul 2021 19:19:04 +0200 Subject: [PATCH 59/86] added scrollbars --- mainwindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 28302b6a..b94d6974 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1086,7 +1086,7 @@ void MainWindow::runProgram() #else key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid, nullptr); + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); #endif //! Run program in code directory if it exists @@ -1266,7 +1266,7 @@ void MainWindow::debug() #else key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid, nullptr); + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); #endif debugger = new Debugger(compilerOut, exePath, workingDirectoryPath, inputPath, assembler, 0, settings.value("sasmverbose", false).toBool(), settings.value("mi", false).toBool()); From 43d16955a7c84c9efc64dd768f110d6279fd9439 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 6 Jul 2021 19:22:32 +0200 Subject: [PATCH 60/86] fixed linux bug --- Linux/share/sasm/NASM/macro.c | 2 +- Linux/share/sasm/include/io.inc | 43 ++++++++++++++++++++++++++++++++ Windows/include/io.inc | 10 ++++---- displayWindow.cpp | 44 +++++++-------------------------- 4 files changed, 58 insertions(+), 41 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index 7b796790..d204f63b 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -56,7 +56,7 @@ void update(char* data){ for(int j = 0; j < needed_bytes; j+=8184){ for(int i = 0; i < min(8184, needed_bytes-j); i++) message.mesg_text[i] = data[i+j]; - msgsnd(msgid_snd, &message, sizeof(message), 0); + //msgsnd(msgid_snd, &message, sizeof(message), 0); } } diff --git a/Linux/share/sasm/include/io.inc b/Linux/share/sasm/include/io.inc index 1d18e5b7..7e398c56 100644 --- a/Linux/share/sasm/include/io.inc +++ b/Linux/share/sasm/include/io.inc @@ -43,6 +43,49 @@ CEXTERN fflush CEXTERN get_stdin CEXTERN get_stdout +CEXTERN update +%macro updateDisplay 1.nolist + sasmMacroFunc + push eax + push ecx + push edx + push esi + push edi + ALIGN_STACK 4 + push %1 + call update + UNALIGN_STACK + pop edi + pop esi + pop edx + pop ecx + pop eax + sasmMacroFuncE +%endmacro + +CEXTERN setup +%macro setupDisplay 4.nolist + sasmMacroFunc + push eax + push ecx + push edx + push esi + push edi + ALIGN_STACK 16 + push %4 + push %3 + push %2 + push %1 + call setup + UNALIGN_STACK + pop edi + pop esi + pop edx + pop ecx + pop eax + sasmMacroFuncE +%endmacro + ; Make stack be 16 bytes aligned after pushing %1 bytes %macro ALIGN_STACK 1.nolist enter 0, 0 diff --git a/Windows/include/io.inc b/Windows/include/io.inc index f785d435..cde32462 100644 --- a/Windows/include/io.inc +++ b/Windows/include/io.inc @@ -65,7 +65,7 @@ CEXTERN update push ecx push edx ALIGN_STACK 4 - push %1 + push %1 call update UNALIGN_STACK pop edx @@ -81,10 +81,10 @@ CEXTERN setup push ecx push edx ALIGN_STACK 16 - push %4 - push %3 - push %2 - push %1 + push %4 + push %3 + push %2 + push %1 call setup UNALIGN_STACK pop edx diff --git a/displayWindow.cpp b/displayWindow.cpp index c3a54e21..dc0ac2b0 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -150,7 +150,8 @@ void DisplayWindow::changeDisplay(int msgid){ #else while(1){ // msgrcv to receive message - msgrcv(msgid, &message, sizeof(message), 0, 0); + size_t t = msgrcv(msgid, &message, sizeof(message), 0, 0); + emit printLog("t: "+QString::number(t)+" type: "+QString::number(message.mesg_type)+"\n"); if (message.mesg_type == 2){ // type = 1 (default) -> normal message | -> 2 finish | -> 3 setup break; @@ -169,9 +170,10 @@ void DisplayWindow::changeDisplay(int msgid){ else buffer.resize(res_x*res_y); displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); - displayPicture->fill(qRgb(0, 0, 0)); + displayPicture->fill(qRgb(255, 255, 255)); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); - this->setFixedSize(QSize(res_x+60, res_y+92)); continue; } // display the message and print on display @@ -182,7 +184,7 @@ void DisplayWindow::changeDisplay(int msgid){ memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); } updateDisplay(); - qint64 elapsed_time = programExecutionTime.elapsed(); + qint64 elapsed_time = programExecutionTime.elapsed(); if(elapsed_time < 1000/fps) usleep(1000/fps - elapsed_time); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); @@ -194,35 +196,8 @@ void DisplayWindow::changeDisplay(int msgid){ } void DisplayWindow::finish(int msgid){ - this->msgid = msgid; + this->msgid = msgid; #ifdef Q_OS_WIN32 - /*char c[8184]; - c[0] = 2; - HANDLE hFile = CreateFileW( - L"\\\\.\\pipe\\SASMPIPE", - GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - 0, - NULL); - if(hFile == INVALID_HANDLE_VALUE){ - emit printLog(QString("Could not create file object (")+QString::number(GetLastError())+")\n", Qt::red); - return; - } - DWORD dwNoBytesWrote = 0; - BOOL writeSuccess = WriteFile( - hFile, - c, - sizeof(c), - &dwNoBytesWrote, - NULL); - if(!writeSuccess){ - emit printLog(QString("Could not write to file (")+QString::number(GetLastError())+")\n", Qt::red); - } - if(!FlushFileBuffers(hFile)){ - emit printLog(QString("Could not flush the file (")+QString::number(GetLastError())+")\n", Qt::red); - }*/ #else mesg_buffer end; end.mesg_type = 2; @@ -233,9 +208,8 @@ void DisplayWindow::finish(int msgid){ void DisplayWindow::zoomSettingsChanged(int value){ zoom = std::pow(2, value); - updateDisplay(); - scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); - this->setFixedSize(QSize(res_x+60, res_y+92)); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom, res_y*zoom))); } From 54ec1c6119d9c30acdf0f4abe6dcee85307b3050 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 6 Jul 2021 19:36:44 +0200 Subject: [PATCH 61/86] text update --- displayWindow.cpp | 212 +++++++++++++++++++++++----------------------- displayWindow.h | 10 +-- mainwindow.cpp | 30 +++---- 3 files changed, 126 insertions(+), 126 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index dc0ac2b0..0f0ff511 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -44,15 +44,15 @@ DisplayWindow::DisplayWindow(QWidget *parent) : QWidget(parent) { - zoom = 1; - this->setFixedSize(QSize(512+50, 512+125)); + zoom = 1; + this->setFixedSize(QSize(512+50, 512+125)); this->setStyleSheet("background-color:grey;"); verticalLayout = new QVBoxLayout(this); zoomComboBox = new QComboBox(this); QStringList comboBoxList; - comboBoxList << "1" << "2" << "4" << "8" << "16" << "32"; - zoomComboBox->insertItems(0, comboBoxList); - connect(zoomComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(zoomSettingsChanged(int))); + comboBoxList << "1" << "2" << "4" << "8" << "16" << "32"; + zoomComboBox->insertItems(0, comboBoxList); + connect(zoomComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(zoomSettingsChanged(int))); verticalLayout->addWidget(zoomComboBox); @@ -63,7 +63,7 @@ DisplayWindow::DisplayWindow(QWidget *parent) : horizontalLayout = new QHBoxLayout(scrollAreaWidgetContents); displayImageLabel = new QLabel(scrollAreaWidgetContents); displayImageLabel->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 85, 127);")); - displayImageLabel->setMinimumSize(QSize(150, 150)); + displayImageLabel->setMinimumSize(QSize(150, 150)); horizontalLayout->addWidget(displayImageLabel); @@ -74,124 +74,124 @@ DisplayWindow::DisplayWindow(QWidget *parent) : void DisplayWindow::changeDisplay(int msgid){ displayPicture = new QImage(512, 512, QImage::Format_RGB32); - displayPicture->fill(qRgb(255, 255, 255)); + displayPicture->fill(qRgb(255, 255, 255)); buffer.resize(512*512); memset(buffer.data(), 0xff, 512*512); - scrollAreaWidgetContents->setFixedSize(512*zoom+26, 512*zoom+26); + scrollAreaWidgetContents->setFixedSize(512*zoom+26, 512*zoom+26); this->msgid = msgid; res_x = 512; res_y = 512; mode = 0; qint64 fps = 30; QElapsedTimer programExecutionTime; - this->setFixedSize(QSize(512+60, 512+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(512*zoom,512*zoom))); + this->setFixedSize(QSize(512+60, 512+92)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(512*zoom,512*zoom))); programExecutionTime.start(); #ifdef Q_OS_WIN32 - if(!ConnectNamedPipe(hCreateNamedPipe, NULL)) - emit printLog(QString("Connection Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); - while(1){ - DWORD dwNoBytesRead; - BOOL readSuccess = ReadFile( - hCreateNamedPipe, - message.mesg_text, - 8184, - &dwNoBytesRead, - NULL); - if(!readSuccess){ - if(GetLastError()!=109) - emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); - break; - } - if(message.mesg_text[0]==3){ - res_x = message.mesg_text[1]; - res_y = message.mesg_text[5]; - for(int i = 1; i < 4; i++){ - res_x += message.mesg_text[1+i] << (8*i); - res_y += message.mesg_text[5+i] << (8*i); - } - mode = message.mesg_text[9]; - fps = message.mesg_text[10]; - if(mode) - buffer.resize(res_x*res_y*3); - else - buffer.resize(res_x*res_y); - displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); - displayPicture->fill(qRgb(255, 255, 255)); - scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); - this->setFixedSize(QSize(res_x+60, res_y+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); - continue; - } - // display the message and print on display - int needed_bytes = (mode) ? res_x*res_y*3 : res_x*res_y; - for(int i = 0; i < needed_bytes; i+=8184){ - dwNoBytesRead = 0; - BOOL readSuccess = ReadFile( - hCreateNamedPipe, - message.mesg_text, - 8184, - &dwNoBytesRead, - NULL); - if(!readSuccess){ - emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); - break; - } - memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); - } - updateDisplay(); - qint64 elapsed_time = programExecutionTime.elapsed(); - if(elapsed_time < 1000/fps) - usleep(1000/fps - elapsed_time); + if(!ConnectNamedPipe(hCreateNamedPipe, NULL)) + emit printLog(QString("Connection Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); + while(1){ + DWORD dwNoBytesRead; + BOOL readSuccess = ReadFile( + hCreateNamedPipe, + message.mesg_text, + 8184, + &dwNoBytesRead, + NULL); + if(!readSuccess){ + if(GetLastError()!=109) + emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); + break; + } + if(message.mesg_text[0]==3){ + res_x = message.mesg_text[1]; + res_y = message.mesg_text[5]; + for(int i = 1; i < 4; i++){ + res_x += message.mesg_text[1+i] << (8*i); + res_y += message.mesg_text[5+i] << (8*i); + } + mode = message.mesg_text[9]; + fps = message.mesg_text[10]; + if(mode) + buffer.resize(res_x*res_y*3); + else + buffer.resize(res_x*res_y); + displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); + displayPicture->fill(qRgb(255, 255, 255)); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); + continue; + } + // display the message and print on display + int needed_bytes = (mode) ? res_x*res_y*3 : res_x*res_y; + for(int i = 0; i < needed_bytes; i+=8184){ + dwNoBytesRead = 0; + BOOL readSuccess = ReadFile( + hCreateNamedPipe, + message.mesg_text, + 8184, + &dwNoBytesRead, + NULL); + if(!readSuccess){ + emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); + break; + } + memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); + } + updateDisplay(); + qint64 elapsed_time = programExecutionTime.elapsed(); + if(elapsed_time < 1000/fps) + usleep(1000/fps - elapsed_time); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); programExecutionTime.start(); } - CloseHandle(hCreateNamedPipe); - #else - while(1){ - // msgrcv to receive message - size_t t = msgrcv(msgid, &message, sizeof(message), 0, 0); - emit printLog("t: "+QString::number(t)+" type: "+QString::number(message.mesg_type)+"\n"); + CloseHandle(hCreateNamedPipe); + #else + while(1){ + // msgrcv to receive message + size_t t = msgrcv(msgid, &message, sizeof(message), 0, 0); + emit printLog("t: "+QString::number(t)+" type: "+QString::number(message.mesg_type)+"\n"); - if (message.mesg_type == 2){ // type = 1 (default) -> normal message | -> 2 finish | -> 3 setup - break; - } - if (message.mesg_type == 3){ - res_x = message.mesg_text[0]; - res_y = message.mesg_text[4]; - for(int i = 1; i < 4; i++){ - res_x += message.mesg_text[i] << (8*i); - res_y += message.mesg_text[4+i] << (8*i); - } - mode = message.mesg_text[8]; - fps = message.mesg_text[9]; - if(mode) - buffer.resize(res_x*res_y*3); - else - buffer.resize(res_x*res_y); - displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); - displayPicture->fill(qRgb(255, 255, 255)); - scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); - this->setFixedSize(QSize(res_x+60, res_y+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); - continue; - } - // display the message and print on display - int needed_bytes = (mode) ? res_x*res_y*3 : res_x*res_y; - for(int i = 0; i < needed_bytes; i+=8184){ - if(i>0) - msgrcv(msgid, &message, sizeof(message), 0, 0); - memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); - } - updateDisplay(); - qint64 elapsed_time = programExecutionTime.elapsed(); - if(elapsed_time < 1000/fps) - usleep(1000/fps - elapsed_time); + if (message.mesg_type == 2){ // type = 1 (default) -> normal message | -> 2 finish | -> 3 setup + break; + } + if (message.mesg_type == 3){ + res_x = message.mesg_text[0]; + res_y = message.mesg_text[4]; + for(int i = 1; i < 4; i++){ + res_x += message.mesg_text[i] << (8*i); + res_y += message.mesg_text[4+i] << (8*i); + } + mode = message.mesg_text[8]; + fps = message.mesg_text[9]; + if(mode) + buffer.resize(res_x*res_y*3); + else + buffer.resize(res_x*res_y); + displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); + displayPicture->fill(qRgb(255, 255, 255)); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); + continue; + } + // display the message and print on display + int needed_bytes = (mode) ? res_x*res_y*3 : res_x*res_y; + for(int i = 0; i < needed_bytes; i+=8184){ + if(i>0) + msgrcv(msgid, &message, sizeof(message), 0, 0); + memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); + } + updateDisplay(); + qint64 elapsed_time = programExecutionTime.elapsed(); + if(elapsed_time < 1000/fps) + usleep(1000/fps - elapsed_time); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); programExecutionTime.start(); } msgctl(msgid, IPC_RMID, NULL); - #endif + #endif emit closeDisplay(); } diff --git a/displayWindow.h b/displayWindow.h index 10009709..818d8118 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -78,9 +78,9 @@ class DisplayWindow : public QWidget void changeDisplay(int msgid); void finish(int msgid); void updateDisplay(); - #ifdef Q_OS_WIN32 - HANDLE hCreateNamedPipe; - #endif + #ifdef Q_OS_WIN32 + HANDLE hCreateNamedPipe; + #endif protected: void closeEvent(QCloseEvent *); @@ -91,7 +91,7 @@ class DisplayWindow : public QWidget QImage* displayPicture; QLabel* displayImageLabel; QComboBox *zoomComboBox; - QScrollArea *scrollArea; + QScrollArea *scrollArea; QWidget *scrollAreaWidgetContents; std::vector buffer; int zoom; @@ -107,7 +107,7 @@ void zoomSettingsChanged(int value); void displayChanged(void); void closeSignal(); void closeDisplay(); - void printLog(QString msg, QColor color = QColor(Qt::black)); + void printLog(QString msg, QColor color = QColor(Qt::black)); }; #endif diff --git a/mainwindow.cpp b/mainwindow.cpp index b94d6974..e76c909d 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1065,24 +1065,24 @@ void MainWindow::runProgram() displayWindow->activateWindow(); } if (settings.value("display", false).toBool()){ - displayWindow->show(); - } + displayWindow->show(); + } #ifdef Q_OS_WIN32 // --- TODO --- HANDLE hCreateNamedPipe = CreateNamedPipe( - L"\\\\.\\pipe\\sasmpipe", - PIPE_ACCESS_INBOUND, - PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, - PIPE_UNLIMITED_INSTANCES, - 8184, - 8184, - 0, - NULL); - if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ - printLog(QString("Couldnt create Pipe"+QString::number(GetLastError()))+"\n", Qt::red); - } - displayWindow->hCreateNamedPipe = hCreateNamedPipe; - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1); + L"\\\\.\\pipe\\sasmpipe", + PIPE_ACCESS_INBOUND, + PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, + PIPE_UNLIMITED_INSTANCES, + 8184, + 8184, + 0, + NULL); + if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ + printLog(QString("Couldnt create Pipe"+QString::number(GetLastError()))+"\n", Qt::red); + } + displayWindow->hCreateNamedPipe = hCreateNamedPipe; + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1); #else key_t key = ftok("/tmp", 65); msgid = msgget(key, 0666 | IPC_CREAT); From fd58214b0b14eaa4f861684798cc378b761969c5 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sat, 10 Jul 2021 18:40:28 +0200 Subject: [PATCH 62/86] added shared memory --- Linux/share/sasm/NASM/macro.c | 107 ++++++++++++++++++------------- SASM.pro | 3 + displayWindow.cpp | 115 +++++++++++++++++++++++----------- displayWindow.h | 23 ++++--- mainwindow.cpp | 79 +++++++++++++---------- mainwindow.h | 15 ++++- 6 files changed, 217 insertions(+), 125 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index d204f63b..bf099c08 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -1,63 +1,80 @@ #include +#include #include +#include +#include +#include +#include +#include +#include #include -#include -#include -#include + +#define SEM_PRODUCER_FNAME "/myproducer" +#define SEM_CONSUMER_FNAME "/myconsumer" +#define BLOCK_SIZE 1048576 +#define FILENAME "/tmp" FILE *get_stdin(void) { return stdin; } FILE *get_stdout(void) { return stdout; } void sasm_replace_stdin(void) {dup2(open("input.txt",0),0);} -struct mesg_buffer { - long mesg_type; - char mesg_text[8184]; -} message; - -int msgid_snd = 0; -int res_x = 512; -int res_y = 512; -char mode = 0; -char fps = 1; -const int max_byte = 16384; +sem_t* sem_consumer; +sem_t* sem_producer; +int display_size; +char is_setup = 0; +int shared_block_id; +char* shm_block; -void setup(int x, int y, char mode_, char fps_){ - res_x = x; - res_y = y; - fps = fps_; - mode = mode_; - if (msgid_snd == 0){ - msgid_snd = msgget(ftok("/tmp", 65), 0666 | IPC_CREAT); - } - message.mesg_type = 3; +void setup(int res_x, int res_y, char mode, char fps){ + if(is_setup){ + printf("already setup -> dont call twice\n"); + exit(-1); + } + is_setup = 1; + + sem_producer = sem_open(SEM_PRODUCER_FNAME, 0); + if(sem_producer == SEM_FAILED){ + printf("sem_prod failed\n"); + exit(-1); + } + sem_consumer = sem_open(SEM_CONSUMER_FNAME, 0); + if(sem_consumer == SEM_FAILED){ + printf("sem_consumer failed\n"); + exit(-1); + } + sem_wait(sem_consumer); + display_size = (mode) ? res_x*res_y*3 : res_x*res_y; + + key_t key = ftok(FILENAME, 'f'); + if(key < 0){ + exit(-1); + } + shared_block_id = shmget(key, BLOCK_SIZE, 0666 | IPC_CREAT); + if(shared_block_id == -1){ + exit(-1); + } + shm_block = shmat(shared_block_id, NULL, 0); + if(shm_block==(char*)-1){ + exit(-1); + } for(int i = 0; i < 4; i++){ - message.mesg_text[i] = (res_x >> (8*i)) & 0xff; - message.mesg_text[i+4] = (res_y >> (8*i)) & 0xff; + shm_block[i] = (res_x >> (8*i)) & 0xff; + shm_block[i+4] = (res_y >> (8*i)) & 0xff; } - message.mesg_text[8] = mode; - message.mesg_text[9] = fps; - msgsnd(msgid_snd, &message, sizeof(message), 0); -} - -int min(int x, int y) { - if(x>y) - return y; - return x; + shm_block[8] = mode; + shm_block[9] = fps; + sem_post(sem_producer); } void update(char* data){ - if (msgid_snd == 0){ - msgid_snd = msgget(ftok("/tmp", 65), 0666 | IPC_CREAT); - } - message.mesg_type = 1; - int needed_bytes = res_x*res_y; - if(mode) - needed_bytes *=3; - for(int j = 0; j < needed_bytes; j+=8184){ - for(int i = 0; i < min(8184, needed_bytes-j); i++) - message.mesg_text[i] = data[i+j]; - //msgsnd(msgid_snd, &message, sizeof(message), 0); + if(!is_setup){ + printf("please call setup before update"); + fflush(stdin); + exit(-1); } + sem_wait(sem_consumer); + memcpy(shm_block, data, display_size); + sem_post(sem_producer); } void sleepFunc(){usleep(10000000);} diff --git a/SASM.pro b/SASM.pro index 563988de..349e925e 100644 --- a/SASM.pro +++ b/SASM.pro @@ -48,6 +48,9 @@ INSTALLS += data INSTALLS += shortcutfiles INSTALLS += docfiles +LIBS += -pthread +QMAKE_CXXFLAGS += -pthread + include(singleapplication/qtsingleapplication.pri) SOURCES += main.cpp\ diff --git a/displayWindow.cpp b/displayWindow.cpp index 0f0ff511..4b546f64 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -40,6 +40,10 @@ #include "displayWindow.h" +#define IPC_RESULT_ERROR (-1) +#define BLOCK_SIZE 1048576 +#define FILENAME "/tmp" + DisplayWindow::DisplayWindow(QWidget *parent) : QWidget(parent) @@ -73,6 +77,7 @@ DisplayWindow::DisplayWindow(QWidget *parent) : } void DisplayWindow::changeDisplay(int msgid){ + loop = true; displayPicture = new QImage(512, 512, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); buffer.resize(512*512); @@ -148,49 +153,78 @@ void DisplayWindow::changeDisplay(int msgid){ } CloseHandle(hCreateNamedPipe); #else - while(1){ - // msgrcv to receive message - size_t t = msgrcv(msgid, &message, sizeof(message), 0, 0); - emit printLog("t: "+QString::number(t)+" type: "+QString::number(message.mesg_type)+"\n"); - - if (message.mesg_type == 2){ // type = 1 (default) -> normal message | -> 2 finish | -> 3 setup - break; + sem_wait(sem_producer); + if(loop){ + //setup the shared memory + key_t key = ftok(FILENAME, 'f'); + if(key == IPC_RESULT_ERROR){} + shared_block_id = shmget(key, BLOCK_SIZE, 0666 | IPC_CREAT); + if(shared_block_id == IPC_RESULT_ERROR){ + emit printLog(QString("shmget failed\n"), Qt::red); } - if (message.mesg_type == 3){ - res_x = message.mesg_text[0]; - res_y = message.mesg_text[4]; - for(int i = 1; i < 4; i++){ - res_x += message.mesg_text[i] << (8*i); - res_y += message.mesg_text[4+i] << (8*i); - } - mode = message.mesg_text[8]; - fps = message.mesg_text[9]; - if(mode) - buffer.resize(res_x*res_y*3); - else - buffer.resize(res_x*res_y); - displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); - displayPicture->fill(qRgb(255, 255, 255)); - scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); - this->setFixedSize(QSize(res_x+60, res_y+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); - continue; + block_values = (uint8_t*)shmat(shared_block_id, NULL, 0); + if(block_values == (uint8_t*)IPC_RESULT_ERROR){ + emit printLog(QString("shmat failed\n"), Qt::red); } + /// read setup + res_x = block_values[0]; + res_y = block_values[4]; + for(int i = 1; i < 4; i++){ + res_x += block_values[i] << (8*i); + res_y += block_values[4+i] << (8*i); + } + mode = block_values[8]; + fps = block_values[9]; + display_size = (mode) ? res_x*res_y*3 : res_x*res_y; + displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); + displayPicture->fill(qRgb(255, 255, 255)); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); + sem_post(sem_consumer); + } + /// + + while(loop){ + // receive message + sem_wait(sem_producer); + if(!loop) + break; // display the message and print on display - int needed_bytes = (mode) ? res_x*res_y*3 : res_x*res_y; - for(int i = 0; i < needed_bytes; i+=8184){ - if(i>0) - msgrcv(msgid, &message, sizeof(message), 0, 0); - memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); + int currentcharx, currentchary; + if (mode){ + for(int l = 0; l < display_size; l+=3) { + currentcharx = (l/3)%res_x; + currentchary = l/3/res_x; + displayPicture->setPixel(currentcharx, currentchary, qRgb(block_values[l], block_values[l+1], block_values[l+2])); + } + } else { + for(int l = 0; l < display_size; l++){ + currentcharx = l%res_x; + currentchary = l/res_x; + if(block_values[l]){ + displayPicture->setPixel(currentcharx, currentchary, qRgb(255, 255, 255)); + } else { + displayPicture->setPixel(currentcharx, currentchary, qRgb(0, 0, 0)); + } + } } - updateDisplay(); + + qint64 elapsed_time = programExecutionTime.elapsed(); + //emit printLog("time: "+QString::number(elapsed_time)+"\n"); if(elapsed_time < 1000/fps) usleep(1000/fps - elapsed_time); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); programExecutionTime.start(); + sem_post(sem_consumer); + } + //close sema + sem_close(sem_consumer); + sem_close(sem_producer); + if(shmctl(shared_block_id, IPC_RMID, NULL) == IPC_RESULT_ERROR){ + emit printLog(QString("shmctl failed\n"), Qt::red); } - msgctl(msgid, IPC_RMID, NULL); #endif emit closeDisplay(); } @@ -199,18 +233,25 @@ void DisplayWindow::finish(int msgid){ this->msgid = msgid; #ifdef Q_OS_WIN32 #else - mesg_buffer end; - end.mesg_type = 2; - //send default message type == 2 means end - msgsnd(msgid, &end, sizeof(end), 0); + loop = false; + sem_post(sem_producer); #endif } void DisplayWindow::zoomSettingsChanged(int value){ + #ifdef Q_OS_WIN32 + zoom = std::pow(2, value); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom, res_y*zoom))); + #else + sem_wait(sem_producer); zoom = std::pow(2, value); scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); this->setFixedSize(QSize(res_x+60, res_y+92)); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom, res_y*zoom))); + sem_post(sem_producer); + #endif } void DisplayWindow::updateDisplay() { diff --git a/displayWindow.h b/displayWindow.h index 818d8118..5d0d4e3d 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -59,8 +59,12 @@ #include #include #else -#include -#include +#include +#include +#include +#include +#include +#include #endif #define BUF_SIZE 256 @@ -80,6 +84,10 @@ class DisplayWindow : public QWidget void updateDisplay(); #ifdef Q_OS_WIN32 HANDLE hCreateNamedPipe; + #else + sem_t* sem_producer; + sem_t* sem_consumer; + int sem_con_id, sem_pro_id; #endif protected: @@ -95,12 +103,13 @@ class DisplayWindow : public QWidget QWidget *scrollAreaWidgetContents; std::vector buffer; int zoom; - int msgid; - int res_x; - int res_y; - int mode; + int msgid, res_x, res_y, mode, display_size; + bool loop; + int shared_block_id; + uint8_t* block_values; + struct sembuf sops[1]; -private slots: +public slots: void zoomSettingsChanged(int value); signals: diff --git a/mainwindow.cpp b/mainwindow.cpp index e76c909d..b8df959a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -933,7 +933,7 @@ void MainWindow::buildProgram(bool debugMode) //! macro.c compilation QStringList gccMArguments; - gccMArguments << "-x" << "c" << Common::pathInTemp("macro.c") << "-c" << "-g" << "-o" << stdioMacros; + gccMArguments << "-x" << "c" << Common::pathInTemp("macro.c") << "-c" << "-g" << "-pthread" << "-o" << stdioMacros; if (settings.value("mode", QString("x86")).toString() == "x86") gccMArguments << "-m32"; else @@ -963,6 +963,7 @@ void MainWindow::buildProgram(bool debugMode) linkerProcess.setStandardOutputFile(linkerOutput); linkerProcess.setStandardErrorFile(linkerOutput, QIODevice::Append); + linkerArguments << "-pthread"; if (settings.value("sasmverbose", false).toBool()) printLog("Linker: "+linker+" "+linkerArguments.join(" ")+"\n", Qt::darkGreen); @@ -1067,9 +1068,8 @@ void MainWindow::runProgram() if (settings.value("display", false).toBool()){ displayWindow->show(); } - #ifdef Q_OS_WIN32 - // --- TODO --- - HANDLE hCreateNamedPipe = CreateNamedPipe( + #ifdef Q_OS_WIN32 + HANDLE hCreateNamedPipe = CreateNamedPipe( L"\\\\.\\pipe\\sasmpipe", PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, @@ -1084,8 +1084,19 @@ void MainWindow::runProgram() displayWindow->hCreateNamedPipe = hCreateNamedPipe; consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1); #else - key_t key = ftok("/tmp", 65); - msgid = msgget(key, 0666 | IPC_CREAT); + // setup some samphores + sem_unlink(SEM_CONSUMER_FNAME); + sem_unlink(SEM_PRODUCER_FNAME); + + displayWindow->sem_producer = sem_open(SEM_PRODUCER_FNAME, O_CREAT, 0666, 0); + if(displayWindow->sem_producer == SEM_FAILED){ + emit printLog(QString("sem_prod failed\n"), Qt::red); + } + displayWindow->sem_consumer = sem_open(SEM_CONSUMER_FNAME, O_CREAT, 0666, 1); + if(displayWindow->sem_consumer == SEM_FAILED){ + emit printLog(QString("sem_consumer failed\n"), Qt::red); + } + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); #endif @@ -1126,8 +1137,8 @@ void MainWindow::testStopOfProgram() debugAction->setEnabled(true); buildAction->setEnabled(true); if (!programStopped) { - connect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); displayWindow->finish(msgid); + consumer->join(); if (runProcess->exitStatus() == QProcess::NormalExit) printLogWithTime(tr("The program finished normally. Execution time: %1 s") .arg(programExecutionTime.elapsed() / 1000.0) @@ -1248,24 +1259,33 @@ void MainWindow::debug() } if (settings.value("display", false).toBool()) displayWindow->show(); - #ifdef Q_OS_WIN32 - HANDLE hCreateNamedPipe = CreateNamedPipe( - L"\\\\.\\pipe\\sasmpipe", - PIPE_ACCESS_INBOUND, - PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, - PIPE_UNLIMITED_INSTANCES, - 8184, - 8184, - 0, - NULL); - if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ - printLog(QString("Couldnt create Pipe"+QString::number(GetLastError()))+"\n", Qt::red); - } - displayWindow->hCreateNamedPipe = hCreateNamedPipe; - consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1); - #else - key_t key = ftok("/tmp", 65); - msgid = msgget(key, 0666 | IPC_CREAT); + #ifdef Q_OS_WIN32 + HANDLE hCreateNamedPipe = CreateNamedPipe( + L"\\\\.\\pipe\\sasmpipe", + PIPE_ACCESS_INBOUND, + PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, + PIPE_UNLIMITED_INSTANCES, + 8184, + 8184, + 0, + NULL); + if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ + printLog(QString("Couldnt create Pipe"+QString::number(GetLastError()))+"\n", Qt::red); + } + displayWindow->hCreateNamedPipe = hCreateNamedPipe; + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1); + #else + sem_unlink(SEM_CONSUMER_FNAME); + sem_unlink(SEM_PRODUCER_FNAME); + + displayWindow->sem_producer = sem_open(SEM_PRODUCER_FNAME, O_CREAT, 0666, 0); + if(displayWindow->sem_producer == SEM_FAILED){ + emit printLog(QString("sem_prod failed\n"), Qt::red); + } + displayWindow->sem_consumer = sem_open(SEM_CONSUMER_FNAME, O_CREAT, 0666, 1); + if(displayWindow->sem_consumer == SEM_FAILED){ + emit printLog(QString("sem_consumer failed\n"), Qt::red); + } consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); #endif @@ -1646,8 +1666,8 @@ void MainWindow::debugExit() //! Many actions performed here - deleting of highlighting too delete debugger; // close display: - connect(displayWindow, SIGNAL(closeDisplay()), this, SLOT(closeDisplay()), Qt::UniqueConnection); displayWindow->finish(msgid); + consumer->join(); debugger = 0; closeAnyCommandWidget(); debugShowRegistersAction->setChecked(false); @@ -1657,13 +1677,6 @@ void MainWindow::debugExit() disableDebugActions(); } -void MainWindow::closeDisplay(){ - consumer->join(); - /*if (displayWindow) { - displayWindow->close(); - delete displayWindow; - }*/ -} void MainWindow::showAnyCommandWidget() { diff --git a/mainwindow.h b/mainwindow.h index 3734612b..d19f2d36 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -82,11 +82,22 @@ #ifdef Q_OS_WIN32 #include #else +#include +#include +#include +#include +#include +#include +/// +#include #include -#include +#include #endif #define SASM_VERSION "3.12.1" +#define SEM_PRODUCER_FNAME "/myproducer" +#define SEM_CONSUMER_FNAME "/myconsumer" +#define IPC_RESULT_ERROR (-1) /** * @file mainwindow.h @@ -327,8 +338,6 @@ public slots: //! Single Application message void onMessageReceived(const QString &message); - //display - void closeDisplay(); protected: void dragEnterEvent(QDragEnterEvent *event); From 1ca501d9e02f6746c6b240adf6c2670b6c0e90de Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sun, 11 Jul 2021 15:55:35 +0200 Subject: [PATCH 63/86] fix --- Linux/share/sasm/NASM/macro.c | 7 +++++++ displayWindow.cpp | 15 +++++---------- displayWindow.h | 3 +-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index bf099c08..72742072 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -28,10 +28,17 @@ char* shm_block; void setup(int res_x, int res_y, char mode, char fps){ if(is_setup){ printf("already setup -> dont call twice\n"); + fflush(stdin); exit(-1); } is_setup = 1; + if(res_x < 100 || res_x > 1024 || res_y < 100 || res_y > 1024 || fps > 60 || fps < 1){ + printf("sem_prod failed\n"); + fflush(stdin); + exit(-1); + } + sem_producer = sem_open(SEM_PRODUCER_FNAME, 0); if(sem_producer == SEM_FAILED){ printf("sem_prod failed\n"); diff --git a/displayWindow.cpp b/displayWindow.cpp index 4b546f64..7d60b7c4 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -91,6 +91,7 @@ void DisplayWindow::changeDisplay(int msgid){ QElapsedTimer programExecutionTime; this->setFixedSize(QSize(512+60, 512+92)); displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(512*zoom,512*zoom))); + //zoomComboBox->setEditable(false); programExecutionTime.start(); #ifdef Q_OS_WIN32 if(!ConnectNamedPipe(hCreateNamedPipe, NULL)) @@ -226,6 +227,8 @@ void DisplayWindow::changeDisplay(int msgid){ emit printLog(QString("shmctl failed\n"), Qt::red); } #endif + loop=false; + //zoomComboBox->setEditable(false); emit closeDisplay(); } @@ -239,19 +242,11 @@ void DisplayWindow::finish(int msgid){ } void DisplayWindow::zoomSettingsChanged(int value){ - #ifdef Q_OS_WIN32 - zoom = std::pow(2, value); - scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); - this->setFixedSize(QSize(res_x+60, res_y+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom, res_y*zoom))); - #else - sem_wait(sem_producer); + if(!loop){ zoom = std::pow(2, value); scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); this->setFixedSize(QSize(res_x+60, res_y+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom, res_y*zoom))); - sem_post(sem_producer); - #endif + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom, res_y*zoom)));} } void DisplayWindow::updateDisplay() { diff --git a/displayWindow.h b/displayWindow.h index 5d0d4e3d..54a470a7 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -104,10 +104,9 @@ class DisplayWindow : public QWidget std::vector buffer; int zoom; int msgid, res_x, res_y, mode, display_size; - bool loop; + std::atomic loop; int shared_block_id; uint8_t* block_values; - struct sembuf sops[1]; public slots: void zoomSettingsChanged(int value); From 5e6c874e148d7cdea41fbedbaeede3abcc6d4bc1 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sun, 11 Jul 2021 16:02:41 +0200 Subject: [PATCH 64/86] fix --- mainwindow.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index b8df959a..79ce9d8b 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -962,8 +962,11 @@ void MainWindow::buildProgram(bool debugMode) linkerOutput = Common::pathInTemp("linkererror.txt"); linkerProcess.setStandardOutputFile(linkerOutput); linkerProcess.setStandardErrorFile(linkerOutput, QIODevice::Append); - + + #ifdef Q_OS_WIN32 + #else linkerArguments << "-pthread"; + #endif if (settings.value("sasmverbose", false).toBool()) printLog("Linker: "+linker+" "+linkerArguments.join(" ")+"\n", Qt::darkGreen); From d91791304bbc2c3c88b2c404753dc28dd426014c Mon Sep 17 00:00:00 2001 From: ge69dal Date: Wed, 14 Jul 2021 17:30:10 +0200 Subject: [PATCH 65/86] fix for Window --- Linux/share/sasm/NASM/macro.c | 2 +- Windows/NASM/macro.o | Bin 12412 -> 12277 bytes Windows/NASM/macroWind.c | 123 +++++++++++++++------------------- displayWindow.cpp | 106 ++++++++++++++++------------- displayWindow.h | 8 +-- mainwindow.cpp | 8 +-- mainwindow.h | 1 + 7 files changed, 122 insertions(+), 126 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index 72742072..26709543 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -11,7 +11,7 @@ #define SEM_PRODUCER_FNAME "/myproducer" #define SEM_CONSUMER_FNAME "/myconsumer" -#define BLOCK_SIZE 1048576 +#define BLOCK_SIZE 3145728 #define FILENAME "/tmp" FILE *get_stdin(void) { return stdin; } diff --git a/Windows/NASM/macro.o b/Windows/NASM/macro.o index 787e927a7d949c48f8473a8fad8935e8065d8535..0f671732db76558a0558be095511389796d36936 100644 GIT binary patch delta 2622 zcmZvedu&rx9LIm>w!K_f$Jont8`ILY8^T_I5*{NwTrmTTnrvbSq?Gk`E3R9!whF{j zma3s?l+|neLq|X$!9Ns(7~%v8D-cvTM|)*5!KAp^|SytJ2h;q^LZm)ZFy~>_DrpL z;!1C9l*eFj&79unu&e=nmwvV|{o}O!;R?9PMC)gXF!|}*<84?o{%?w^Lr8ZcT z-=6;``NPgW?w4?9SR$4&Z9kcJ)IGLOfeJ9XZ!%yXoLDYugMk=vR)l^kIw*~pbi zT%ka-pZjaKrFm?oHpet;* z50*9Y2omE(NvvipL(yX0I~(nc)@YeI-zc?j_;g=iU!W@#jnqZ9M9ACOqk4T??O`<% z4N+JPdO|(jKD*x==u~~$yOv;ms8jWZRbgO{bf|V;AROxSZnbYx{oOq(RDrPFAMI+3 z1iHIskTyxKUzRoTgag}DN6lP&t+zAK-qqF}3@&nbx}ytmf%lC3De3F^P0Wc@E-bKABM%OBJ|$hOsBvn|-|L&khww3J?N^M}Gl?|D6ui_I08 zd?M34k*T9>1TM|E$^*ovYgXsOjZ;d{t;NOqE85kFCmiu%=ENo+Le2uH7Sd77Uxu#=CcBMneFWrrK}JWv1t2URo2Hy zj5ZfaHtn3NIrj#ZY@+Qt;;K?uytFaexW_M5mn!ui9y?BwnaO@gsSm=$$;`>(m)nmG zACGcnnhRx*F8d*wyh`4jep4siRVe_QBV5SqxRjd8ls(Go6VhCpvP4;ZyrUhdltbvY zE6N(Eo{~)3;p(9{e-yNQs`9F|BG=NCFqwX5XHQ$rX1oxz7uVA4BR6cM&(2~PBm6r^ zPFylgHE1S?_hfy&U7#Xb0$HWgI!Jy{$fQDYySPl7al>aChA%?$07Y~VQiS;c^r)^o z3@OqLfcSw>L}wv|$JZbc`YOnQOQsymP0+&zRU5PlWXD?!!(O0B_ZkRi7(%}Rs?V=|%wHh>HWm?+kY5Z>#yZ#O%3_cRZ3l_a zE|3U42P8r_fy9iTHtbpqyN!mO3bG@zOfP{PI=u|S2Y`y=)C&|P>@|kp2Z;&?K%$s4 zAW_UPNEGu8Ncesa66Ie436I}E!sAbn@W39zyoqwC2T~#J=B%ml7QAeBbnz~L#GKL~ zhpsyS5=lM=DY|Y1R0hhSiw0dcMi*jRi_s?yY6S`3UW0ZEvLNw^3hk5G7xfPuLoE{3 zMN}LEqTzXwiSeDxe`Ee@`p-q?Q$lCD9n;8G6 z$=BLz+nJ`FtBuX!gBNh|?Zg|8MD(*RVUN2+*~07w+Wky2Q;(q(Rd1iYOpP|^)9!i cT66sc$34fB$2gKao#(x>DOO3iSTH9~_)ZgD4zJWIC*7tE+ z)NR|R;6D6Vm>WB|2IejuI{19}AyDpi$GPQpRn#31b+PDZ-iy}7&-^S$zWMg=$d%Uj zRPJb+)#zx2s{Yp=a>rR{Q(WGBV)!wY=V%SH8~y$0@WEQc5;}Xi9_|XPGpgiC%x0{U zOJ+IDiA1Ukm2RbQBJ5`WcD?D_U0s;UW45)&Q9@)vp$&@uFqbR5C@6~Yt2`!Xe>%&e zfh^HCA6+6wiY#!cK3qNrSV#(Ee=NNbNHT`$C)gC@^Tn)*C04;wjd;z3q#w(EOdCYB{tq$3B`Bf*M;FNOzwo=AyZ>kK-u7*B*B zJA=G@yD0zeK>1~&{5u2XyUdcxV~x&sup)Jc&XRp^EWiD zCZ-#E3mo#0v>fA9L5{4Y6n8`La#}e z@M2_5HqytA)5cIudbw)2$JQjjYi>CP$8YPA560>&=%@@-?p`JpIi>vcQ0Ua@07;4* z+s{7cR!6YNx(iUnNb+(x>aSZ}gg`gJ>mv5nAOEZ?qY_U6*j)0q0Y@ zXEaF9Wi8ih_37MM_Um(SXPRGA<1es0LG#e!%MMzBb{H;=)&?!y z4B{t9#|SffraR4R0$F#%mR&vmO(X^b)H3w5){;^3CPc+4Dy3S z@CMKXQ+q4nsL??Xjzst!x3o?WpKAtv4H8){fkc+8Ad%&FkeK@ekSL#jN`~?IYou~C zDbu2n7L|d->>5ELbu&oJE?`+VTC~NYc91A*4@ks*1QKN(k}$qVeHEgZ9sjThZ30MW zl^~I3Hb|tY1&K8CK_cRHkXR2dNJO-NL_`22A~bW&h>{F%i9I+M51W{Ny+vz5Vx2;k zwgV)_*$>jq1^Wf$1SQd*7BPHTgf-KmT#)dqv9!HHD?{*M%iL+1Z(B43|6N4F;vD0j zlIzk$6c2lo~Gs&kH^!rW(nc8v~i`+ztYp} JGd?SS`Cke<2MGWG diff --git a/Windows/NASM/macroWind.c b/Windows/NASM/macroWind.c index 36c54dd4..70d785bc 100644 --- a/Windows/NASM/macroWind.c +++ b/Windows/NASM/macroWind.c @@ -3,98 +3,81 @@ #include #include +#define BLOCK_SIZE 3145728 + FILE *get_stdin(void) { return stdin; } FILE *get_stdout(void) { return stdout; } void sasm_replace_stdin(void) {dup2(open("input.txt",0),0);} -int res_x = 512; -int res_y = 512; -char mode = 0; -char fps = 1; +int display_size; +char is_setup = 0; +char output[BLOCK_SIZE]; HANDLE hFile; -void setup(int x, int y, char mode_, char fps_){ - res_x = x; - res_y = y; - mode = mode_; - fps = fps_; - char c[8184]; - c[0] = 3; +void setup(int x, int y, char mode, char fps){ + if(is_setup){ + printf("already setup"); + exit(-1); + } + if(x < 100 || x > 1024 || y < 100 || y > 1024 || fps > 60 || fps < 1){ + printf("sem_prod failed\n"); + fflush(stdin); + exit(-1); + } + is_setup = 1; for(int i = 0; i < 4; i++){ - c[i+1] = (res_x >> (8*i)) & 0xff; - c[i+5] = (res_y >> (8*i)) & 0xff; + output[i] = (x >> (8*i)) & 0xff; + output[i+4] = (y >> (8*i)) & 0xff; } - c[9] = mode; - c[10] = fps; + output[8] = mode; + output[9] = fps; - if(hFile == NULL){ - hFile = CreateFileW( - L"\\\\.\\pipe\\SASMPIPE", - GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - 0, - NULL); - if(hFile == NULL | hFile == INVALID_HANDLE_VALUE){ - printf("Could not create file object (%ld).\n", GetLastError()); - return; - } + display_size = (mode) ? x*y*3 : x*y; + + hFile = CreateFileW( + L"\\\\.\\pipe\\SASMPIPE", + GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + 0, + NULL); + if(hFile == NULL | hFile == INVALID_HANDLE_VALUE){ + printf("Could not create file object (%ld).\n", GetLastError()); + exit(-1); } long dwNoBytesWrote; BOOL writeSuccess = WriteFile( - hFile, - &c, - 8184, - &dwNoBytesWrote, - NULL); + hFile, + &output, + BLOCK_SIZE, + &dwNoBytesWrote, + NULL); if(!FlushFileBuffers(hFile)){ printf("Could not flush the file (%d).\n", GetLastError()); + exit(-1); } } void update(char* data){ - int buf_size = (mode) ? res_x*res_y*3 : res_x*res_y; - char c[8184]; - c[0] = 4; - - if(hFile == NULL){ - hFile = CreateFileW( - L"\\\\.\\pipe\\SASMPIPE", - GENERIC_WRITE, - FILE_SHARE_READ | FILE_SHARE_WRITE, - NULL, - OPEN_EXISTING, - 0, - NULL); - if(hFile == NULL | hFile == INVALID_HANDLE_VALUE){ - printf("Could not create file object (%ld).\n", GetLastError()); - return; - } + if(!is_setup){ + printf("please setup the display before this function!"); + exit(-1); } - + memcpy(&output, data, display_size); long dwNoBytesWrote; BOOL writeSuccess = WriteFile( - hFile, - &c, - 8184, - &dwNoBytesWrote, - NULL); - for(int i = 0; ifill(qRgb(255, 255, 255)); - buffer.resize(512*512); - memset(buffer.data(), 0xff, 512*512); + memset(buffer, 0xff, 512*512); scrollAreaWidgetContents->setFixedSize(512*zoom+26, 512*zoom+26); this->msgid = msgid; res_x = 512; @@ -94,57 +92,56 @@ void DisplayWindow::changeDisplay(int msgid){ //zoomComboBox->setEditable(false); programExecutionTime.start(); #ifdef Q_OS_WIN32 - if(!ConnectNamedPipe(hCreateNamedPipe, NULL)) - emit printLog(QString("Connection Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); - while(1){ + if(!ConnectNamedPipe(hCreateNamedPipe, NULL)){ + if(GetLastError()!=535) + emit printLog(QString("Connection Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); + } + + DWORD dwNoBytesRead; + BOOL readSuccess = ReadFile( + hCreateNamedPipe, + buffer, + BLOCK_SIZE, + &dwNoBytesRead, + NULL); + if(readSuccess && loop){ + res_x = buffer[0]; + res_y = buffer[4]; + for(int i = 1; i < 4; i++){ + res_x += buffer[i] << (8*i); + res_y += buffer[4+i] << (8*i); + } + mode = buffer[8]; + fps = buffer[9]; + display_size = (mode) ? res_x*res_y*3 : res_x*res_y; + displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); + displayPicture->fill(qRgb(255, 255, 255)); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); + displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); + } else { + int a = GetLastError(); + if(GetLastError()!=109||a!=0) + emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); + loop = false; + } + + while(loop){ DWORD dwNoBytesRead; BOOL readSuccess = ReadFile( hCreateNamedPipe, - message.mesg_text, - 8184, + buffer, + BLOCK_SIZE, &dwNoBytesRead, NULL); + if(!loop) + break; if(!readSuccess){ if(GetLastError()!=109) emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); break; } - if(message.mesg_text[0]==3){ - res_x = message.mesg_text[1]; - res_y = message.mesg_text[5]; - for(int i = 1; i < 4; i++){ - res_x += message.mesg_text[1+i] << (8*i); - res_y += message.mesg_text[5+i] << (8*i); - } - mode = message.mesg_text[9]; - fps = message.mesg_text[10]; - if(mode) - buffer.resize(res_x*res_y*3); - else - buffer.resize(res_x*res_y); - displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); - displayPicture->fill(qRgb(255, 255, 255)); - scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); - this->setFixedSize(QSize(res_x+60, res_y+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); - continue; - } // display the message and print on display - int needed_bytes = (mode) ? res_x*res_y*3 : res_x*res_y; - for(int i = 0; i < needed_bytes; i+=8184){ - dwNoBytesRead = 0; - BOOL readSuccess = ReadFile( - hCreateNamedPipe, - message.mesg_text, - 8184, - &dwNoBytesRead, - NULL); - if(!readSuccess){ - emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); - break; - } - memcpy(buffer.data()+i, &message.mesg_text[0], std::min(8184, needed_bytes-i)); - } updateDisplay(); qint64 elapsed_time = programExecutionTime.elapsed(); if(elapsed_time < 1000/fps) @@ -227,16 +224,35 @@ void DisplayWindow::changeDisplay(int msgid){ emit printLog(QString("shmctl failed\n"), Qt::red); } #endif - loop=false; + loop = false; //zoomComboBox->setEditable(false); emit closeDisplay(); } void DisplayWindow::finish(int msgid){ this->msgid = msgid; + loop = false; #ifdef Q_OS_WIN32 + HANDLE hFile = CreateFileW( + L"\\\\.\\pipe\\SASMPIPE", + GENERIC_WRITE, + FILE_SHARE_READ | FILE_SHARE_WRITE, + NULL, + OPEN_EXISTING, + 0, + NULL); + if(hFile == INVALID_HANDLE_VALUE){ + emit printLog("Could not create file object ("+QString::number(GetLastError())+").\n", Qt::red); + } + DWORD dwNoBytesWrote; + BOOL writeSuccess = WriteFile( + hFile, + &buffer, + BLOCK_SIZE, + &dwNoBytesWrote, + NULL); + CloseHandle(hFile); #else - loop = false; sem_post(sem_producer); #endif } diff --git a/displayWindow.h b/displayWindow.h index 54a470a7..f64b4976 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -66,16 +66,12 @@ #include #include #endif -#define BUF_SIZE 256 +#define BLOCK_SIZE 3145728 class DisplayWindow : public QWidget { Q_OBJECT public: - struct mesg_buffer { - long mesg_type; - uint8_t mesg_text[8184]; - } message; explicit DisplayWindow(QWidget *parent = 0); ~DisplayWindow(); @@ -101,7 +97,7 @@ class DisplayWindow : public QWidget QComboBox *zoomComboBox; QScrollArea *scrollArea; QWidget *scrollAreaWidgetContents; - std::vector buffer; + uint8_t buffer[BLOCK_SIZE]; int zoom; int msgid, res_x, res_y, mode, display_size; std::atomic loop; diff --git a/mainwindow.cpp b/mainwindow.cpp index 79ce9d8b..47ee0cc4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1077,8 +1077,8 @@ void MainWindow::runProgram() PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, - 8184, - 8184, + BLOCK_SIZE, + BLOCK_SIZE, 0, NULL); if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ @@ -1268,8 +1268,8 @@ void MainWindow::debug() PIPE_ACCESS_INBOUND, PIPE_TYPE_MESSAGE|PIPE_READMODE_MESSAGE|PIPE_WAIT, PIPE_UNLIMITED_INSTANCES, - 8184, - 8184, + BLOCK_SIZE, + BLOCK_SIZE, 0, NULL); if(hCreateNamedPipe == INVALID_HANDLE_VALUE){ diff --git a/mainwindow.h b/mainwindow.h index d19f2d36..7208da51 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -98,6 +98,7 @@ #define SEM_PRODUCER_FNAME "/myproducer" #define SEM_CONSUMER_FNAME "/myconsumer" #define IPC_RESULT_ERROR (-1) +#define BLOCK_SIZE 3145728 /** * @file mainwindow.h From 3dd7ae5259664b41a90d06d16149bfa68f455675 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 20 Jul 2021 13:33:33 +0200 Subject: [PATCH 66/86] added drawImage --- displayWindow.cpp | 72 +++++++++++++++++++++++++++++++---------------- displayWindow.h | 14 +++++++++ 2 files changed, 62 insertions(+), 24 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index fe2d6efc..ece6be98 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -61,14 +61,8 @@ DisplayWindow::DisplayWindow(QWidget *parent) : scrollArea = new QScrollArea(this); scrollArea->setWidgetResizable(true); - scrollAreaWidgetContents = new QWidget(); + scrollAreaWidgetContents = new BufferFrame(this); //scrollAreaWidgetContents->setGeometry(QRect(0, 0, 1218, 1218)); - horizontalLayout = new QHBoxLayout(scrollAreaWidgetContents); - displayImageLabel = new QLabel(scrollAreaWidgetContents); - displayImageLabel->setStyleSheet(QString::fromUtf8("background-color: rgb(255, 85, 127);")); - displayImageLabel->setMinimumSize(QSize(150, 150)); - - horizontalLayout->addWidget(displayImageLabel); scrollArea->setWidget(scrollAreaWidgetContents); @@ -88,8 +82,7 @@ void DisplayWindow::changeDisplay(int msgid){ qint64 fps = 30; QElapsedTimer programExecutionTime; this->setFixedSize(QSize(512+60, 512+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(512*zoom,512*zoom))); - //zoomComboBox->setEditable(false); + scrollAreaWidgetContents->update(); programExecutionTime.start(); #ifdef Q_OS_WIN32 if(!ConnectNamedPipe(hCreateNamedPipe, NULL)){ @@ -116,12 +109,11 @@ void DisplayWindow::changeDisplay(int msgid){ display_size = (mode) ? res_x*res_y*3 : res_x*res_y; displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); - scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); this->setFixedSize(QSize(res_x+60, res_y+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); + scrollAreaWidgetContents->setFixedSize(res_x*zoom, res_y*zoom); + scrollAreaWidgetContents->update(); } else { - int a = GetLastError(); - if(GetLastError()!=109||a!=0) + if(GetLastError()!=109&&GetLastError()!=0) emit printLog(QString("Read Failed with Error (")+QString::number(GetLastError())+")\n", Qt::red); loop = false; } @@ -142,11 +134,31 @@ void DisplayWindow::changeDisplay(int msgid){ break; } // display the message and print on display - updateDisplay(); + int currentcharx; + int currentchary; + int needed_pixel = (mode) ? res_x*res_y*3 : res_x*res_y; + if(mode){ + for(int l = 0; l < needed_pixel; l+=3) { + currentcharx = (l/3)%res_x; + currentchary = l/3/res_x; + displayPicture->setPixel(currentcharx, currentchary, qRgb(buffer[l], buffer[l+1], buffer[l+2])); + } + } else { + for(int l = 0; l < needed_pixel; l++){ + currentcharx = l%res_x; + currentchary = l/res_x; + if(buffer[l]){ + displayPicture->setPixel(currentcharx, currentchary, qRgb(255, 255, 255)); + } else { + displayPicture->setPixel(currentcharx, currentchary, qRgb(0, 0, 0)); + } + } + } qint64 elapsed_time = programExecutionTime.elapsed(); if(elapsed_time < 1000/fps) - usleep(1000/fps - elapsed_time); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); + usleep((1000/fps - elapsed_time)*100); + scrollAreaWidgetContents->update(); + programExecutionTime.start(); } CloseHandle(hCreateNamedPipe); @@ -178,7 +190,7 @@ void DisplayWindow::changeDisplay(int msgid){ displayPicture->fill(qRgb(255, 255, 255)); scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); this->setFixedSize(QSize(res_x+60, res_y+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); + scrollAreaWidgetContents->update(); sem_post(sem_consumer); } /// @@ -213,7 +225,7 @@ void DisplayWindow::changeDisplay(int msgid){ //emit printLog("time: "+QString::number(elapsed_time)+"\n"); if(elapsed_time < 1000/fps) usleep(1000/fps - elapsed_time); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom,res_y*zoom))); + scrollAreaWidgetContents->update(); programExecutionTime.start(); sem_post(sem_consumer); } @@ -259,10 +271,11 @@ void DisplayWindow::finish(int msgid){ void DisplayWindow::zoomSettingsChanged(int value){ if(!loop){ - zoom = std::pow(2, value); - scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); - this->setFixedSize(QSize(res_x+60, res_y+92)); - displayImageLabel->setPixmap(QPixmap::fromImage(displayPicture->scaled(res_x*zoom, res_y*zoom)));} + zoom = std::pow(2, value); + scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); + this->setFixedSize(QSize(res_x+60, res_y+92)); + scrollAreaWidgetContents->update(); + } } void DisplayWindow::updateDisplay() { @@ -293,8 +306,19 @@ void DisplayWindow::closeEvent(QCloseEvent *) { emit closeSignal(); } -DisplayWindow::~DisplayWindow() -{ +DisplayWindow::~DisplayWindow(){ delete displayImageLabel; //delete layout; } + +BufferFrame::BufferFrame(DisplayWindow *parent) : + QWidget(parent){ + d = parent; +} + +void BufferFrame::paintEvent(QPaintEvent*){ + QPainter painter(this); + //if(!painter.isActive()){ + painter.drawImage(QRect(0,0,d->res_x*d->zoom,d->res_y*d->zoom),*(d->displayPicture)); + //} +} diff --git a/displayWindow.h b/displayWindow.h index f64b4976..777a5ff8 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -90,6 +90,7 @@ class DisplayWindow : public QWidget void closeEvent(QCloseEvent *); private: + friend class BufferFrame; QVBoxLayout *verticalLayout; QHBoxLayout *horizontalLayout; QImage* displayPicture; @@ -114,4 +115,17 @@ void zoomSettingsChanged(int value); void printLog(QString msg, QColor color = QColor(Qt::black)); }; +class BufferFrame : public QWidget{ +public: + BufferFrame(DisplayWindow *parent = 0); + DisplayWindow* d; + +private: + friend class DisplayWindow; + +protected: + void paintEvent(QPaintEvent *event); + +}; + #endif From ee410b2b8efc41576f62576bc6c0ecaaf3904d73 Mon Sep 17 00:00:00 2001 From: andi Date: Mon, 20 Sep 2021 16:17:42 +0200 Subject: [PATCH 67/86] fixed fps --- displayWindow.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index ece6be98..bb1c91d2 100644 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -81,9 +81,11 @@ void DisplayWindow::changeDisplay(int msgid){ mode = 0; qint64 fps = 30; QElapsedTimer programExecutionTime; + QElapsedTimer programExecutionTime2; this->setFixedSize(QSize(512+60, 512+92)); scrollAreaWidgetContents->update(); programExecutionTime.start(); + programExecutionTime2.start(); #ifdef Q_OS_WIN32 if(!ConnectNamedPipe(hCreateNamedPipe, NULL)){ if(GetLastError()!=535) @@ -156,10 +158,9 @@ void DisplayWindow::changeDisplay(int msgid){ } qint64 elapsed_time = programExecutionTime.elapsed(); if(elapsed_time < 1000/fps) - usleep((1000/fps - elapsed_time)*100); - scrollAreaWidgetContents->update(); - + usleep((1000/fps - elapsed_time)*1000); programExecutionTime.start(); + scrollAreaWidgetContents->update(); } CloseHandle(hCreateNamedPipe); #else @@ -224,9 +225,9 @@ void DisplayWindow::changeDisplay(int msgid){ qint64 elapsed_time = programExecutionTime.elapsed(); //emit printLog("time: "+QString::number(elapsed_time)+"\n"); if(elapsed_time < 1000/fps) - usleep(1000/fps - elapsed_time); - scrollAreaWidgetContents->update(); + usleep((1000/fps - elapsed_time)*1000); programExecutionTime.start(); + scrollAreaWidgetContents->update(); sem_post(sem_consumer); } //close sema @@ -236,6 +237,8 @@ void DisplayWindow::changeDisplay(int msgid){ emit printLog(QString("shmctl failed\n"), Qt::red); } #endif + qint64 elapsed_time2 = programExecutionTime2.elapsed(); + qint64 ass = elapsed_time2; loop = false; //zoomComboBox->setEditable(false); emit closeDisplay(); From 038ee476bcd084e858070ff5db402282905d686c Mon Sep 17 00:00:00 2001 From: andi Date: Tue, 21 Sep 2021 13:27:06 +0200 Subject: [PATCH 68/86] added mimode enabled as default --- ui_settings.h | 1406 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 1406 insertions(+) create mode 100644 ui_settings.h diff --git a/ui_settings.h b/ui_settings.h new file mode 100644 index 00000000..0f7e4119 --- /dev/null +++ b/ui_settings.h @@ -0,0 +1,1406 @@ +/******************************************************************************** +** Form generated from reading UI file 'settings.ui' +** +** Created by: Qt User Interface Compiler version 5.12.8 +** +** WARNING! All changes made in this file will be lost when recompiling UI file! +********************************************************************************/ + +#ifndef UI_SETTINGS_H +#define UI_SETTINGS_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +QT_BEGIN_NAMESPACE + +class Ui_SettingsWindow +{ +public: + QVBoxLayout *verticalLayout; + QLabel *settingsLabel; + QTabWidget *tabWidget; + QWidget *commonTab; + QVBoxLayout *verticalLayout_4; + QGroupBox *commonSettingsBox; + QVBoxLayout *verticalLayout_3; + QHBoxLayout *horizontalLayout_2; + QLabel *startWindowLabel; + QComboBox *startWindow; + QSpacerItem *horizontalSpacer_2; + QHBoxLayout *horizontalLayout_4; + QLabel *languageLabel; + QComboBox *language; + QSpacerItem *horizontalSpacer_4; + QLabel *label_4; + QHBoxLayout *horizontalLayout_8; + QLabel *registersLabel_2; + QRadioButton *registersYesRadioButton; + QRadioButton *registersNoRadioButton; + QSpacerItem *horizontalSpacer_9; + QHBoxLayout *horizontalLayout_7; + QLabel *insertDebugStringLabel; + QCheckBox *insertDebugStringCheckBox; + QSpacerItem *horizontalSpacer_10; + QGroupBox *codeSettingsBox; + QVBoxLayout *verticalLayout_2; + QHBoxLayout *horizontalLayout_5; + QLabel *fontLabel; + QFontComboBox *fontComboBox; + QLabel *fontSizeLabel; + QSpinBox *fontSizeSpinBox; + QSpacerItem *horizontalSpacer_5; + QLabel *label; + QLabel *label_2; + QWidget *startTextWidget; + QSpacerItem *verticalSpacer_5; + QHBoxLayout *horizontalLayout; + QToolButton *resetAllButton; + QSpacerItem *horizontalSpacer_3; + QSpacerItem *verticalSpacer; + QWidget *colorsTab; + QGridLayout *gridLayout; + QGroupBox *groupBox; + QGridLayout *gridLayout_2; + QCheckBox *iomacroBoldCheckBox; + QLabel *systemLabel; + QPushButton *quotationColorButton; + QPushButton *systemColorButton; + QCheckBox *numbersItalicCheckBox; + QLabel *label_6; + QCheckBox *numbersBoldCheckBox; + QLabel *label_7; + QLabel *label_3; + QCheckBox *systemItalicCheckBox; + QPushButton *commentsColorButton_2; + QPushButton *keywordsColorButton; + QCheckBox *commentsBoldCheckBox; + QPushButton *keywordsColorButton_2; + QPushButton *iomacroColorButton_2; + QCheckBox *memoryItalicCheckBox; + QLabel *keywordsLabel; + QLabel *label_5; + QPushButton *labelsColorButton; + QLabel *numbersLabel; + QPushButton *quotationColorButton_2; + QLabel *labelsLabel; + QLabel *commentsLabel; + QPushButton *memoryColorButton; + QPushButton *systemColorButton_2; + QLabel *iomacroLabel_2; + QPushButton *labelsColorButton_2; + QCheckBox *registersBoldCheckBox; + QCheckBox *quotationBoldCheckBox; + QPushButton *iomacroColorButton; + QCheckBox *iomacroItalicCheckBox; + QPushButton *registersColorButton_2; + QCheckBox *keywordsBoldCheckBox; + QCheckBox *memoryBoldCheckBox; + QPushButton *numbersColorButton; + QCheckBox *quotationItalicCheckBox; + QPushButton *commentsColorButton; + QCheckBox *labelsItalicCheckBox; + QLabel *memoryLabel; + QLabel *iomacroLabel; + QCheckBox *keywordsItalicCheckBox; + QSpacerItem *verticalSpacer_3; + QLabel *registersLabel; + QCheckBox *commentsItalicCheckBox; + QCheckBox *labelsBoldCheckBox; + QCheckBox *registersItalicCheckBox; + QCheckBox *systemBoldCheckBox; + QPushButton *memoryColorButton_2; + QPushButton *registersColorButton; + QPushButton *numbersColorButton_2; + QSpacerItem *horizontalSpacer_7; + QGroupBox *groupBox_2; + QVBoxLayout *verticalLayout_5; + QGridLayout *gridLayout_4; + QLabel *fontLabel_2; + QPushButton *fontColorButton; + QCheckBox *currentLineCheckBox; + QPushButton *debugLineColorButton; + QLabel *currentLineLabel; + QLabel *debugLineLabel; + QPushButton *currentLineColorButton; + QLabel *backgroundLabel; + QPushButton *backgroundColorButton; + QLabel *lineNumberPanelLabel; + QPushButton *lineNumberPanelColorButton; + QLabel *lineNumberFontLabel; + QPushButton *lineNumberFontColorButton; + QLabel *label_8; + QSpacerItem *horizontalSpacer_6; + QSpacerItem *verticalSpacer_4; + QWidget *buildTab; + QVBoxLayout *verticalLayout_6; + QFormLayout *formLayout; + QLabel *modeLabel; + QHBoxLayout *horizontalLayout_3; + QRadioButton *x86RadioButton; + QRadioButton *x64RadioButton; + QSpacerItem *horizontalSpacer; + QLabel *assemblerLabel; + QHBoxLayout *horizontalLayout_6; + QRadioButton *nasmRadioButton; + QRadioButton *gasRadioButton; + QRadioButton *fasmRadioButton; + QRadioButton *masmRadioButton; + QSpacerItem *horizontalSpacer_8; + QLabel *assemblyLabel; + QLineEdit *assemblyOptionsEdit; + QLabel *linkingLabel; + QLineEdit *linkingOptionsEdit; + QLabel *assemblerPathLabel; + QLineEdit *assemblerPathEdit; + QLabel *linkerPathLabel; + QLineEdit *linkerPathEdit; + QLabel *objectFileNameLabel; + QLineEdit *objectFileNameEdit; + QLabel *gdbPathLabel; + QLineEdit *gdbPathEdit; + QLabel *assemblerWorkingDirectoryLabel; + QCheckBox *runInCurrentDirectoryCheckbox; + QLabel *disableLinkingLabel; + QCheckBox *disableLinkingCheckbox; + QLabel *gdbVerboseLabel; + QCheckBox *sasmVerboseCheckBox; + QLabel *MiModusLabel; + QCheckBox *MiModusCheckBox; + QLabel *gdbDisplayLabel; + QCheckBox *sasmDisplayCheckBox; + QLabel *infoLabel; + QDialogButtonBox *buttonBox; + QButtonGroup *buttonGroup; + QButtonGroup *buttonGroup_2; + QButtonGroup *buttonGroup_3; + + void setupUi(QWidget *SettingsWindow) + { + if (SettingsWindow->objectName().isEmpty()) + SettingsWindow->setObjectName(QString::fromUtf8("SettingsWindow")); + SettingsWindow->resize(1702, 971); + verticalLayout = new QVBoxLayout(SettingsWindow); + verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); + settingsLabel = new QLabel(SettingsWindow); + settingsLabel->setObjectName(QString::fromUtf8("settingsLabel")); + QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); + sizePolicy.setHorizontalStretch(0); + sizePolicy.setVerticalStretch(0); + sizePolicy.setHeightForWidth(settingsLabel->sizePolicy().hasHeightForWidth()); + settingsLabel->setSizePolicy(sizePolicy); + QFont font; + font.setPointSize(16); + settingsLabel->setFont(font); + settingsLabel->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + verticalLayout->addWidget(settingsLabel); + + tabWidget = new QTabWidget(SettingsWindow); + tabWidget->setObjectName(QString::fromUtf8("tabWidget")); + tabWidget->setLayoutDirection(Qt::LeftToRight); + tabWidget->setElideMode(Qt::ElideNone); + commonTab = new QWidget(); + commonTab->setObjectName(QString::fromUtf8("commonTab")); + verticalLayout_4 = new QVBoxLayout(commonTab); + verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); + commonSettingsBox = new QGroupBox(commonTab); + commonSettingsBox->setObjectName(QString::fromUtf8("commonSettingsBox")); + sizePolicy.setHeightForWidth(commonSettingsBox->sizePolicy().hasHeightForWidth()); + commonSettingsBox->setSizePolicy(sizePolicy); + commonSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + verticalLayout_3 = new QVBoxLayout(commonSettingsBox); + verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); + horizontalLayout_2 = new QHBoxLayout(); + horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); + startWindowLabel = new QLabel(commonSettingsBox); + startWindowLabel->setObjectName(QString::fromUtf8("startWindowLabel")); + QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); + sizePolicy1.setHorizontalStretch(0); + sizePolicy1.setVerticalStretch(0); + sizePolicy1.setHeightForWidth(startWindowLabel->sizePolicy().hasHeightForWidth()); + startWindowLabel->setSizePolicy(sizePolicy1); + + horizontalLayout_2->addWidget(startWindowLabel); + + startWindow = new QComboBox(commonSettingsBox); + startWindow->addItem(QString()); + startWindow->addItem(QString()); + startWindow->setObjectName(QString::fromUtf8("startWindow")); + QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Fixed); + sizePolicy2.setHorizontalStretch(0); + sizePolicy2.setVerticalStretch(0); + sizePolicy2.setHeightForWidth(startWindow->sizePolicy().hasHeightForWidth()); + startWindow->setSizePolicy(sizePolicy2); + startWindow->setMinimumSize(QSize(266, 0)); + + horizontalLayout_2->addWidget(startWindow); + + horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_2->addItem(horizontalSpacer_2); + + + verticalLayout_3->addLayout(horizontalLayout_2); + + horizontalLayout_4 = new QHBoxLayout(); + horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); + languageLabel = new QLabel(commonSettingsBox); + languageLabel->setObjectName(QString::fromUtf8("languageLabel")); + + horizontalLayout_4->addWidget(languageLabel); + + language = new QComboBox(commonSettingsBox); + language->addItem(QString::fromUtf8("\320\240\321\203\321\201\321\201\320\272\320\270\320\271")); + language->addItem(QString::fromUtf8("English")); + language->addItem(QString::fromUtf8("T\303\274rk")); + language->addItem(QString::fromUtf8("\344\270\255\345\233\275")); + language->addItem(QString::fromUtf8("Deutsch")); + language->addItem(QString::fromUtf8("Italiano")); + language->addItem(QString::fromUtf8("Polski")); + language->addItem(QString::fromUtf8("\327\242\327\221\327\250\327\231\327\252")); + language->addItem(QString::fromUtf8("Espa\303\261ol")); + language->addItem(QString::fromUtf8("Portugu\303\252s")); + language->setObjectName(QString::fromUtf8("language")); + + horizontalLayout_4->addWidget(language); + + horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_4->addItem(horizontalSpacer_4); + + + verticalLayout_3->addLayout(horizontalLayout_4); + + label_4 = new QLabel(commonSettingsBox); + label_4->setObjectName(QString::fromUtf8("label_4")); + + verticalLayout_3->addWidget(label_4); + + horizontalLayout_8 = new QHBoxLayout(); + horizontalLayout_8->setObjectName(QString::fromUtf8("horizontalLayout_8")); + registersLabel_2 = new QLabel(commonSettingsBox); + registersLabel_2->setObjectName(QString::fromUtf8("registersLabel_2")); + + horizontalLayout_8->addWidget(registersLabel_2); + + registersYesRadioButton = new QRadioButton(commonSettingsBox); + buttonGroup_3 = new QButtonGroup(SettingsWindow); + buttonGroup_3->setObjectName(QString::fromUtf8("buttonGroup_3")); + buttonGroup_3->addButton(registersYesRadioButton); + registersYesRadioButton->setObjectName(QString::fromUtf8("registersYesRadioButton")); + registersYesRadioButton->setChecked(false); + + horizontalLayout_8->addWidget(registersYesRadioButton); + + registersNoRadioButton = new QRadioButton(commonSettingsBox); + buttonGroup_3->addButton(registersNoRadioButton); + registersNoRadioButton->setObjectName(QString::fromUtf8("registersNoRadioButton")); + registersNoRadioButton->setChecked(true); + + horizontalLayout_8->addWidget(registersNoRadioButton); + + horizontalSpacer_9 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_8->addItem(horizontalSpacer_9); + + + verticalLayout_3->addLayout(horizontalLayout_8); + + horizontalLayout_7 = new QHBoxLayout(); + horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7")); + insertDebugStringLabel = new QLabel(commonSettingsBox); + insertDebugStringLabel->setObjectName(QString::fromUtf8("insertDebugStringLabel")); + + horizontalLayout_7->addWidget(insertDebugStringLabel); + + insertDebugStringCheckBox = new QCheckBox(commonSettingsBox); + insertDebugStringCheckBox->setObjectName(QString::fromUtf8("insertDebugStringCheckBox")); + insertDebugStringCheckBox->setChecked(true); + + horizontalLayout_7->addWidget(insertDebugStringCheckBox); + + horizontalSpacer_10 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_7->addItem(horizontalSpacer_10); + + + verticalLayout_3->addLayout(horizontalLayout_7); + + + verticalLayout_4->addWidget(commonSettingsBox); + + codeSettingsBox = new QGroupBox(commonTab); + codeSettingsBox->setObjectName(QString::fromUtf8("codeSettingsBox")); + sizePolicy.setHeightForWidth(codeSettingsBox->sizePolicy().hasHeightForWidth()); + codeSettingsBox->setSizePolicy(sizePolicy); + codeSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + verticalLayout_2 = new QVBoxLayout(codeSettingsBox); + verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); + horizontalLayout_5 = new QHBoxLayout(); + horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5")); + fontLabel = new QLabel(codeSettingsBox); + fontLabel->setObjectName(QString::fromUtf8("fontLabel")); + + horizontalLayout_5->addWidget(fontLabel); + + fontComboBox = new QFontComboBox(codeSettingsBox); + fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); + fontComboBox->setWritingSystem(QFontDatabase::Latin); + fontComboBox->setFontFilters(QFontComboBox::AllFonts); + QFont font1; + font1.setFamily(QString::fromUtf8("Arial")); + font1.setPointSize(12); + fontComboBox->setCurrentFont(font1); + + horizontalLayout_5->addWidget(fontComboBox); + + fontSizeLabel = new QLabel(codeSettingsBox); + fontSizeLabel->setObjectName(QString::fromUtf8("fontSizeLabel")); + + horizontalLayout_5->addWidget(fontSizeLabel); + + fontSizeSpinBox = new QSpinBox(codeSettingsBox); + fontSizeSpinBox->setObjectName(QString::fromUtf8("fontSizeSpinBox")); + fontSizeSpinBox->setMinimum(5); + fontSizeSpinBox->setMaximum(72); + fontSizeSpinBox->setValue(12); + + horizontalLayout_5->addWidget(fontSizeSpinBox); + + horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_5->addItem(horizontalSpacer_5); + + + verticalLayout_2->addLayout(horizontalLayout_5); + + label = new QLabel(codeSettingsBox); + label->setObjectName(QString::fromUtf8("label")); + label->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + verticalLayout_2->addWidget(label); + + label_2 = new QLabel(codeSettingsBox); + label_2->setObjectName(QString::fromUtf8("label_2")); + label_2->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + verticalLayout_2->addWidget(label_2); + + startTextWidget = new QWidget(codeSettingsBox); + startTextWidget->setObjectName(QString::fromUtf8("startTextWidget")); + + verticalLayout_2->addWidget(startTextWidget); + + verticalSpacer_5 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + + verticalLayout_2->addItem(verticalSpacer_5); + + + verticalLayout_4->addWidget(codeSettingsBox); + + horizontalLayout = new QHBoxLayout(); + horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); + resetAllButton = new QToolButton(commonTab); + resetAllButton->setObjectName(QString::fromUtf8("resetAllButton")); + resetAllButton->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + horizontalLayout->addWidget(resetAllButton); + + horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout->addItem(horizontalSpacer_3); + + + verticalLayout_4->addLayout(horizontalLayout); + + verticalSpacer = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); + + verticalLayout_4->addItem(verticalSpacer); + + tabWidget->addTab(commonTab, QString()); + colorsTab = new QWidget(); + colorsTab->setObjectName(QString::fromUtf8("colorsTab")); + gridLayout = new QGridLayout(colorsTab); + gridLayout->setObjectName(QString::fromUtf8("gridLayout")); + groupBox = new QGroupBox(colorsTab); + groupBox->setObjectName(QString::fromUtf8("groupBox")); + gridLayout_2 = new QGridLayout(groupBox); + gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); + iomacroBoldCheckBox = new QCheckBox(groupBox); + iomacroBoldCheckBox->setObjectName(QString::fromUtf8("iomacroBoldCheckBox")); + QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Minimum); + sizePolicy3.setHorizontalStretch(0); + sizePolicy3.setVerticalStretch(0); + sizePolicy3.setHeightForWidth(iomacroBoldCheckBox->sizePolicy().hasHeightForWidth()); + iomacroBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(iomacroBoldCheckBox, 8, 3, 1, 1); + + systemLabel = new QLabel(groupBox); + systemLabel->setObjectName(QString::fromUtf8("systemLabel")); + + gridLayout_2->addWidget(systemLabel, 7, 0, 1, 1); + + quotationColorButton = new QPushButton(groupBox); + quotationColorButton->setObjectName(QString::fromUtf8("quotationColorButton")); + sizePolicy1.setHeightForWidth(quotationColorButton->sizePolicy().hasHeightForWidth()); + quotationColorButton->setSizePolicy(sizePolicy1); + quotationColorButton->setMinimumSize(QSize(23, 23)); + quotationColorButton->setMaximumSize(QSize(23, 23)); + quotationColorButton->setBaseSize(QSize(0, 0)); + quotationColorButton->setFocusPolicy(Qt::NoFocus); + quotationColorButton->setAutoDefault(false); + quotationColorButton->setFlat(false); + + gridLayout_2->addWidget(quotationColorButton, 9, 1, 1, 1); + + systemColorButton = new QPushButton(groupBox); + systemColorButton->setObjectName(QString::fromUtf8("systemColorButton")); + sizePolicy1.setHeightForWidth(systemColorButton->sizePolicy().hasHeightForWidth()); + systemColorButton->setSizePolicy(sizePolicy1); + systemColorButton->setMinimumSize(QSize(23, 23)); + systemColorButton->setMaximumSize(QSize(23, 23)); + systemColorButton->setBaseSize(QSize(0, 0)); + systemColorButton->setFocusPolicy(Qt::NoFocus); + systemColorButton->setAutoDefault(false); + systemColorButton->setFlat(false); + + gridLayout_2->addWidget(systemColorButton, 7, 1, 1, 1); + + numbersItalicCheckBox = new QCheckBox(groupBox); + numbersItalicCheckBox->setObjectName(QString::fromUtf8("numbersItalicCheckBox")); + sizePolicy3.setHeightForWidth(numbersItalicCheckBox->sizePolicy().hasHeightForWidth()); + numbersItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(numbersItalicCheckBox, 3, 4, 1, 1); + + label_6 = new QLabel(groupBox); + label_6->setObjectName(QString::fromUtf8("label_6")); + + gridLayout_2->addWidget(label_6, 0, 3, 1, 1); + + numbersBoldCheckBox = new QCheckBox(groupBox); + numbersBoldCheckBox->setObjectName(QString::fromUtf8("numbersBoldCheckBox")); + sizePolicy3.setHeightForWidth(numbersBoldCheckBox->sizePolicy().hasHeightForWidth()); + numbersBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(numbersBoldCheckBox, 3, 3, 1, 1); + + label_7 = new QLabel(groupBox); + label_7->setObjectName(QString::fromUtf8("label_7")); + + gridLayout_2->addWidget(label_7, 0, 4, 1, 1); + + label_3 = new QLabel(groupBox); + label_3->setObjectName(QString::fromUtf8("label_3")); + + gridLayout_2->addWidget(label_3, 0, 1, 1, 1); + + systemItalicCheckBox = new QCheckBox(groupBox); + systemItalicCheckBox->setObjectName(QString::fromUtf8("systemItalicCheckBox")); + sizePolicy3.setHeightForWidth(systemItalicCheckBox->sizePolicy().hasHeightForWidth()); + systemItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(systemItalicCheckBox, 7, 4, 1, 1); + + commentsColorButton_2 = new QPushButton(groupBox); + commentsColorButton_2->setObjectName(QString::fromUtf8("commentsColorButton_2")); + sizePolicy1.setHeightForWidth(commentsColorButton_2->sizePolicy().hasHeightForWidth()); + commentsColorButton_2->setSizePolicy(sizePolicy1); + commentsColorButton_2->setMinimumSize(QSize(23, 23)); + commentsColorButton_2->setMaximumSize(QSize(23, 23)); + commentsColorButton_2->setBaseSize(QSize(0, 0)); + commentsColorButton_2->setFocusPolicy(Qt::NoFocus); + commentsColorButton_2->setAutoDefault(false); + commentsColorButton_2->setFlat(false); + + gridLayout_2->addWidget(commentsColorButton_2, 6, 2, 1, 1); + + keywordsColorButton = new QPushButton(groupBox); + keywordsColorButton->setObjectName(QString::fromUtf8("keywordsColorButton")); + sizePolicy1.setHeightForWidth(keywordsColorButton->sizePolicy().hasHeightForWidth()); + keywordsColorButton->setSizePolicy(sizePolicy1); + keywordsColorButton->setMinimumSize(QSize(23, 23)); + keywordsColorButton->setMaximumSize(QSize(23, 23)); + keywordsColorButton->setBaseSize(QSize(0, 0)); + keywordsColorButton->setFocusPolicy(Qt::NoFocus); + keywordsColorButton->setAutoDefault(false); + keywordsColorButton->setFlat(false); + + gridLayout_2->addWidget(keywordsColorButton, 1, 1, 1, 1); + + commentsBoldCheckBox = new QCheckBox(groupBox); + commentsBoldCheckBox->setObjectName(QString::fromUtf8("commentsBoldCheckBox")); + sizePolicy3.setHeightForWidth(commentsBoldCheckBox->sizePolicy().hasHeightForWidth()); + commentsBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(commentsBoldCheckBox, 6, 3, 1, 1); + + keywordsColorButton_2 = new QPushButton(groupBox); + keywordsColorButton_2->setObjectName(QString::fromUtf8("keywordsColorButton_2")); + sizePolicy1.setHeightForWidth(keywordsColorButton_2->sizePolicy().hasHeightForWidth()); + keywordsColorButton_2->setSizePolicy(sizePolicy1); + keywordsColorButton_2->setMinimumSize(QSize(23, 23)); + keywordsColorButton_2->setMaximumSize(QSize(23, 23)); + keywordsColorButton_2->setBaseSize(QSize(0, 0)); + keywordsColorButton_2->setFocusPolicy(Qt::NoFocus); + keywordsColorButton_2->setAutoDefault(false); + keywordsColorButton_2->setFlat(false); + + gridLayout_2->addWidget(keywordsColorButton_2, 1, 2, 1, 1); + + iomacroColorButton_2 = new QPushButton(groupBox); + iomacroColorButton_2->setObjectName(QString::fromUtf8("iomacroColorButton_2")); + sizePolicy1.setHeightForWidth(iomacroColorButton_2->sizePolicy().hasHeightForWidth()); + iomacroColorButton_2->setSizePolicy(sizePolicy1); + iomacroColorButton_2->setMinimumSize(QSize(23, 23)); + iomacroColorButton_2->setMaximumSize(QSize(23, 23)); + iomacroColorButton_2->setBaseSize(QSize(0, 0)); + iomacroColorButton_2->setFocusPolicy(Qt::NoFocus); + iomacroColorButton_2->setAutoDefault(false); + iomacroColorButton_2->setFlat(false); + + gridLayout_2->addWidget(iomacroColorButton_2, 8, 2, 1, 1); + + memoryItalicCheckBox = new QCheckBox(groupBox); + memoryItalicCheckBox->setObjectName(QString::fromUtf8("memoryItalicCheckBox")); + sizePolicy3.setHeightForWidth(memoryItalicCheckBox->sizePolicy().hasHeightForWidth()); + memoryItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(memoryItalicCheckBox, 4, 4, 1, 1); + + keywordsLabel = new QLabel(groupBox); + keywordsLabel->setObjectName(QString::fromUtf8("keywordsLabel")); + + gridLayout_2->addWidget(keywordsLabel, 1, 0, 1, 1); + + label_5 = new QLabel(groupBox); + label_5->setObjectName(QString::fromUtf8("label_5")); + + gridLayout_2->addWidget(label_5, 0, 2, 1, 1); + + labelsColorButton = new QPushButton(groupBox); + labelsColorButton->setObjectName(QString::fromUtf8("labelsColorButton")); + sizePolicy1.setHeightForWidth(labelsColorButton->sizePolicy().hasHeightForWidth()); + labelsColorButton->setSizePolicy(sizePolicy1); + labelsColorButton->setMinimumSize(QSize(23, 23)); + labelsColorButton->setMaximumSize(QSize(23, 23)); + labelsColorButton->setBaseSize(QSize(0, 0)); + labelsColorButton->setFocusPolicy(Qt::NoFocus); + labelsColorButton->setAutoDefault(false); + labelsColorButton->setFlat(false); + + gridLayout_2->addWidget(labelsColorButton, 5, 1, 1, 1); + + numbersLabel = new QLabel(groupBox); + numbersLabel->setObjectName(QString::fromUtf8("numbersLabel")); + + gridLayout_2->addWidget(numbersLabel, 3, 0, 1, 1); + + quotationColorButton_2 = new QPushButton(groupBox); + quotationColorButton_2->setObjectName(QString::fromUtf8("quotationColorButton_2")); + sizePolicy1.setHeightForWidth(quotationColorButton_2->sizePolicy().hasHeightForWidth()); + quotationColorButton_2->setSizePolicy(sizePolicy1); + quotationColorButton_2->setMinimumSize(QSize(23, 23)); + quotationColorButton_2->setMaximumSize(QSize(23, 23)); + quotationColorButton_2->setBaseSize(QSize(0, 0)); + quotationColorButton_2->setFocusPolicy(Qt::NoFocus); + quotationColorButton_2->setAutoDefault(false); + quotationColorButton_2->setFlat(false); + + gridLayout_2->addWidget(quotationColorButton_2, 9, 2, 1, 1); + + labelsLabel = new QLabel(groupBox); + labelsLabel->setObjectName(QString::fromUtf8("labelsLabel")); + + gridLayout_2->addWidget(labelsLabel, 5, 0, 1, 1); + + commentsLabel = new QLabel(groupBox); + commentsLabel->setObjectName(QString::fromUtf8("commentsLabel")); + + gridLayout_2->addWidget(commentsLabel, 6, 0, 1, 1); + + memoryColorButton = new QPushButton(groupBox); + memoryColorButton->setObjectName(QString::fromUtf8("memoryColorButton")); + sizePolicy1.setHeightForWidth(memoryColorButton->sizePolicy().hasHeightForWidth()); + memoryColorButton->setSizePolicy(sizePolicy1); + memoryColorButton->setMinimumSize(QSize(23, 23)); + memoryColorButton->setMaximumSize(QSize(23, 23)); + memoryColorButton->setBaseSize(QSize(0, 0)); + memoryColorButton->setFocusPolicy(Qt::NoFocus); + memoryColorButton->setAutoDefault(false); + memoryColorButton->setFlat(false); + + gridLayout_2->addWidget(memoryColorButton, 4, 1, 1, 1); + + systemColorButton_2 = new QPushButton(groupBox); + systemColorButton_2->setObjectName(QString::fromUtf8("systemColorButton_2")); + sizePolicy1.setHeightForWidth(systemColorButton_2->sizePolicy().hasHeightForWidth()); + systemColorButton_2->setSizePolicy(sizePolicy1); + systemColorButton_2->setMinimumSize(QSize(23, 23)); + systemColorButton_2->setMaximumSize(QSize(23, 23)); + systemColorButton_2->setBaseSize(QSize(0, 0)); + systemColorButton_2->setFocusPolicy(Qt::NoFocus); + systemColorButton_2->setAutoDefault(false); + systemColorButton_2->setFlat(false); + + gridLayout_2->addWidget(systemColorButton_2, 7, 2, 1, 1); + + iomacroLabel_2 = new QLabel(groupBox); + iomacroLabel_2->setObjectName(QString::fromUtf8("iomacroLabel_2")); + + gridLayout_2->addWidget(iomacroLabel_2, 9, 0, 1, 1); + + labelsColorButton_2 = new QPushButton(groupBox); + labelsColorButton_2->setObjectName(QString::fromUtf8("labelsColorButton_2")); + sizePolicy1.setHeightForWidth(labelsColorButton_2->sizePolicy().hasHeightForWidth()); + labelsColorButton_2->setSizePolicy(sizePolicy1); + labelsColorButton_2->setMinimumSize(QSize(23, 23)); + labelsColorButton_2->setMaximumSize(QSize(23, 23)); + labelsColorButton_2->setBaseSize(QSize(0, 0)); + labelsColorButton_2->setFocusPolicy(Qt::NoFocus); + labelsColorButton_2->setAutoDefault(false); + labelsColorButton_2->setFlat(false); + + gridLayout_2->addWidget(labelsColorButton_2, 5, 2, 1, 1); + + registersBoldCheckBox = new QCheckBox(groupBox); + registersBoldCheckBox->setObjectName(QString::fromUtf8("registersBoldCheckBox")); + sizePolicy3.setHeightForWidth(registersBoldCheckBox->sizePolicy().hasHeightForWidth()); + registersBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(registersBoldCheckBox, 2, 3, 1, 1); + + quotationBoldCheckBox = new QCheckBox(groupBox); + quotationBoldCheckBox->setObjectName(QString::fromUtf8("quotationBoldCheckBox")); + sizePolicy3.setHeightForWidth(quotationBoldCheckBox->sizePolicy().hasHeightForWidth()); + quotationBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(quotationBoldCheckBox, 9, 3, 1, 1); + + iomacroColorButton = new QPushButton(groupBox); + iomacroColorButton->setObjectName(QString::fromUtf8("iomacroColorButton")); + sizePolicy1.setHeightForWidth(iomacroColorButton->sizePolicy().hasHeightForWidth()); + iomacroColorButton->setSizePolicy(sizePolicy1); + iomacroColorButton->setMinimumSize(QSize(23, 23)); + iomacroColorButton->setMaximumSize(QSize(23, 23)); + iomacroColorButton->setBaseSize(QSize(0, 0)); + iomacroColorButton->setFocusPolicy(Qt::NoFocus); + iomacroColorButton->setAutoDefault(false); + iomacroColorButton->setFlat(false); + + gridLayout_2->addWidget(iomacroColorButton, 8, 1, 1, 1); + + iomacroItalicCheckBox = new QCheckBox(groupBox); + iomacroItalicCheckBox->setObjectName(QString::fromUtf8("iomacroItalicCheckBox")); + sizePolicy3.setHeightForWidth(iomacroItalicCheckBox->sizePolicy().hasHeightForWidth()); + iomacroItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(iomacroItalicCheckBox, 8, 4, 1, 1); + + registersColorButton_2 = new QPushButton(groupBox); + registersColorButton_2->setObjectName(QString::fromUtf8("registersColorButton_2")); + sizePolicy1.setHeightForWidth(registersColorButton_2->sizePolicy().hasHeightForWidth()); + registersColorButton_2->setSizePolicy(sizePolicy1); + registersColorButton_2->setMinimumSize(QSize(23, 23)); + registersColorButton_2->setMaximumSize(QSize(23, 23)); + registersColorButton_2->setBaseSize(QSize(0, 0)); + registersColorButton_2->setFocusPolicy(Qt::NoFocus); + registersColorButton_2->setAutoDefault(false); + registersColorButton_2->setFlat(false); + + gridLayout_2->addWidget(registersColorButton_2, 2, 2, 1, 1); + + keywordsBoldCheckBox = new QCheckBox(groupBox); + keywordsBoldCheckBox->setObjectName(QString::fromUtf8("keywordsBoldCheckBox")); + sizePolicy3.setHeightForWidth(keywordsBoldCheckBox->sizePolicy().hasHeightForWidth()); + keywordsBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(keywordsBoldCheckBox, 1, 3, 1, 1); + + memoryBoldCheckBox = new QCheckBox(groupBox); + memoryBoldCheckBox->setObjectName(QString::fromUtf8("memoryBoldCheckBox")); + sizePolicy3.setHeightForWidth(memoryBoldCheckBox->sizePolicy().hasHeightForWidth()); + memoryBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(memoryBoldCheckBox, 4, 3, 1, 1); + + numbersColorButton = new QPushButton(groupBox); + numbersColorButton->setObjectName(QString::fromUtf8("numbersColorButton")); + sizePolicy1.setHeightForWidth(numbersColorButton->sizePolicy().hasHeightForWidth()); + numbersColorButton->setSizePolicy(sizePolicy1); + numbersColorButton->setMinimumSize(QSize(23, 23)); + numbersColorButton->setMaximumSize(QSize(23, 23)); + numbersColorButton->setBaseSize(QSize(0, 0)); + numbersColorButton->setFocusPolicy(Qt::NoFocus); + numbersColorButton->setAutoDefault(false); + numbersColorButton->setFlat(false); + + gridLayout_2->addWidget(numbersColorButton, 3, 1, 1, 1); + + quotationItalicCheckBox = new QCheckBox(groupBox); + quotationItalicCheckBox->setObjectName(QString::fromUtf8("quotationItalicCheckBox")); + sizePolicy3.setHeightForWidth(quotationItalicCheckBox->sizePolicy().hasHeightForWidth()); + quotationItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(quotationItalicCheckBox, 9, 4, 1, 1); + + commentsColorButton = new QPushButton(groupBox); + commentsColorButton->setObjectName(QString::fromUtf8("commentsColorButton")); + sizePolicy1.setHeightForWidth(commentsColorButton->sizePolicy().hasHeightForWidth()); + commentsColorButton->setSizePolicy(sizePolicy1); + commentsColorButton->setMinimumSize(QSize(23, 23)); + commentsColorButton->setMaximumSize(QSize(23, 23)); + commentsColorButton->setBaseSize(QSize(0, 0)); + commentsColorButton->setFocusPolicy(Qt::NoFocus); + commentsColorButton->setAutoDefault(false); + commentsColorButton->setFlat(false); + + gridLayout_2->addWidget(commentsColorButton, 6, 1, 1, 1); + + labelsItalicCheckBox = new QCheckBox(groupBox); + labelsItalicCheckBox->setObjectName(QString::fromUtf8("labelsItalicCheckBox")); + sizePolicy3.setHeightForWidth(labelsItalicCheckBox->sizePolicy().hasHeightForWidth()); + labelsItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(labelsItalicCheckBox, 5, 4, 1, 1); + + memoryLabel = new QLabel(groupBox); + memoryLabel->setObjectName(QString::fromUtf8("memoryLabel")); + + gridLayout_2->addWidget(memoryLabel, 4, 0, 1, 1); + + iomacroLabel = new QLabel(groupBox); + iomacroLabel->setObjectName(QString::fromUtf8("iomacroLabel")); + + gridLayout_2->addWidget(iomacroLabel, 8, 0, 1, 1); + + keywordsItalicCheckBox = new QCheckBox(groupBox); + keywordsItalicCheckBox->setObjectName(QString::fromUtf8("keywordsItalicCheckBox")); + sizePolicy3.setHeightForWidth(keywordsItalicCheckBox->sizePolicy().hasHeightForWidth()); + keywordsItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(keywordsItalicCheckBox, 1, 4, 1, 1); + + verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + gridLayout_2->addItem(verticalSpacer_3, 10, 1, 1, 1); + + registersLabel = new QLabel(groupBox); + registersLabel->setObjectName(QString::fromUtf8("registersLabel")); + + gridLayout_2->addWidget(registersLabel, 2, 0, 1, 1); + + commentsItalicCheckBox = new QCheckBox(groupBox); + commentsItalicCheckBox->setObjectName(QString::fromUtf8("commentsItalicCheckBox")); + sizePolicy3.setHeightForWidth(commentsItalicCheckBox->sizePolicy().hasHeightForWidth()); + commentsItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(commentsItalicCheckBox, 6, 4, 1, 1); + + labelsBoldCheckBox = new QCheckBox(groupBox); + labelsBoldCheckBox->setObjectName(QString::fromUtf8("labelsBoldCheckBox")); + sizePolicy3.setHeightForWidth(labelsBoldCheckBox->sizePolicy().hasHeightForWidth()); + labelsBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(labelsBoldCheckBox, 5, 3, 1, 1); + + registersItalicCheckBox = new QCheckBox(groupBox); + registersItalicCheckBox->setObjectName(QString::fromUtf8("registersItalicCheckBox")); + sizePolicy3.setHeightForWidth(registersItalicCheckBox->sizePolicy().hasHeightForWidth()); + registersItalicCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(registersItalicCheckBox, 2, 4, 1, 1); + + systemBoldCheckBox = new QCheckBox(groupBox); + systemBoldCheckBox->setObjectName(QString::fromUtf8("systemBoldCheckBox")); + sizePolicy3.setHeightForWidth(systemBoldCheckBox->sizePolicy().hasHeightForWidth()); + systemBoldCheckBox->setSizePolicy(sizePolicy3); + + gridLayout_2->addWidget(systemBoldCheckBox, 7, 3, 1, 1); + + memoryColorButton_2 = new QPushButton(groupBox); + memoryColorButton_2->setObjectName(QString::fromUtf8("memoryColorButton_2")); + sizePolicy1.setHeightForWidth(memoryColorButton_2->sizePolicy().hasHeightForWidth()); + memoryColorButton_2->setSizePolicy(sizePolicy1); + memoryColorButton_2->setMinimumSize(QSize(23, 23)); + memoryColorButton_2->setMaximumSize(QSize(23, 23)); + memoryColorButton_2->setBaseSize(QSize(0, 0)); + memoryColorButton_2->setFocusPolicy(Qt::NoFocus); + memoryColorButton_2->setAutoDefault(false); + memoryColorButton_2->setFlat(false); + + gridLayout_2->addWidget(memoryColorButton_2, 4, 2, 1, 1); + + registersColorButton = new QPushButton(groupBox); + registersColorButton->setObjectName(QString::fromUtf8("registersColorButton")); + sizePolicy1.setHeightForWidth(registersColorButton->sizePolicy().hasHeightForWidth()); + registersColorButton->setSizePolicy(sizePolicy1); + registersColorButton->setMinimumSize(QSize(23, 23)); + registersColorButton->setMaximumSize(QSize(23, 23)); + registersColorButton->setBaseSize(QSize(0, 0)); + registersColorButton->setFocusPolicy(Qt::NoFocus); + registersColorButton->setAutoDefault(false); + registersColorButton->setFlat(false); + + gridLayout_2->addWidget(registersColorButton, 2, 1, 1, 1); + + numbersColorButton_2 = new QPushButton(groupBox); + numbersColorButton_2->setObjectName(QString::fromUtf8("numbersColorButton_2")); + sizePolicy1.setHeightForWidth(numbersColorButton_2->sizePolicy().hasHeightForWidth()); + numbersColorButton_2->setSizePolicy(sizePolicy1); + numbersColorButton_2->setMinimumSize(QSize(23, 23)); + numbersColorButton_2->setMaximumSize(QSize(23, 23)); + numbersColorButton_2->setBaseSize(QSize(0, 0)); + numbersColorButton_2->setFocusPolicy(Qt::NoFocus); + numbersColorButton_2->setAutoDefault(false); + numbersColorButton_2->setFlat(false); + + gridLayout_2->addWidget(numbersColorButton_2, 3, 2, 1, 1); + + horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + gridLayout_2->addItem(horizontalSpacer_7, 5, 5, 1, 1); + + + gridLayout->addWidget(groupBox, 0, 2, 1, 1); + + groupBox_2 = new QGroupBox(colorsTab); + groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); + verticalLayout_5 = new QVBoxLayout(groupBox_2); + verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5")); + gridLayout_4 = new QGridLayout(); + gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); + fontLabel_2 = new QLabel(groupBox_2); + fontLabel_2->setObjectName(QString::fromUtf8("fontLabel_2")); + + gridLayout_4->addWidget(fontLabel_2, 4, 0, 1, 1); + + fontColorButton = new QPushButton(groupBox_2); + fontColorButton->setObjectName(QString::fromUtf8("fontColorButton")); + sizePolicy1.setHeightForWidth(fontColorButton->sizePolicy().hasHeightForWidth()); + fontColorButton->setSizePolicy(sizePolicy1); + fontColorButton->setMinimumSize(QSize(23, 23)); + fontColorButton->setMaximumSize(QSize(23, 23)); + fontColorButton->setBaseSize(QSize(0, 0)); + fontColorButton->setFocusPolicy(Qt::NoFocus); + fontColorButton->setAutoDefault(false); + fontColorButton->setFlat(false); + + gridLayout_4->addWidget(fontColorButton, 4, 1, 1, 1); + + currentLineCheckBox = new QCheckBox(groupBox_2); + currentLineCheckBox->setObjectName(QString::fromUtf8("currentLineCheckBox")); + + gridLayout_4->addWidget(currentLineCheckBox, 5, 2, 1, 1); + + debugLineColorButton = new QPushButton(groupBox_2); + debugLineColorButton->setObjectName(QString::fromUtf8("debugLineColorButton")); + sizePolicy1.setHeightForWidth(debugLineColorButton->sizePolicy().hasHeightForWidth()); + debugLineColorButton->setSizePolicy(sizePolicy1); + debugLineColorButton->setMinimumSize(QSize(23, 23)); + debugLineColorButton->setMaximumSize(QSize(23, 23)); + debugLineColorButton->setBaseSize(QSize(0, 0)); + debugLineColorButton->setFocusPolicy(Qt::NoFocus); + debugLineColorButton->setAutoDefault(false); + debugLineColorButton->setFlat(false); + + gridLayout_4->addWidget(debugLineColorButton, 6, 1, 1, 1); + + currentLineLabel = new QLabel(groupBox_2); + currentLineLabel->setObjectName(QString::fromUtf8("currentLineLabel")); + + gridLayout_4->addWidget(currentLineLabel, 5, 0, 1, 1); + + debugLineLabel = new QLabel(groupBox_2); + debugLineLabel->setObjectName(QString::fromUtf8("debugLineLabel")); + + gridLayout_4->addWidget(debugLineLabel, 6, 0, 1, 1); + + currentLineColorButton = new QPushButton(groupBox_2); + currentLineColorButton->setObjectName(QString::fromUtf8("currentLineColorButton")); + sizePolicy1.setHeightForWidth(currentLineColorButton->sizePolicy().hasHeightForWidth()); + currentLineColorButton->setSizePolicy(sizePolicy1); + currentLineColorButton->setMinimumSize(QSize(23, 23)); + currentLineColorButton->setMaximumSize(QSize(23, 23)); + currentLineColorButton->setBaseSize(QSize(0, 0)); + currentLineColorButton->setFocusPolicy(Qt::NoFocus); + currentLineColorButton->setAutoDefault(false); + currentLineColorButton->setFlat(false); + + gridLayout_4->addWidget(currentLineColorButton, 5, 1, 1, 1); + + backgroundLabel = new QLabel(groupBox_2); + backgroundLabel->setObjectName(QString::fromUtf8("backgroundLabel")); + + gridLayout_4->addWidget(backgroundLabel, 1, 0, 1, 1); + + backgroundColorButton = new QPushButton(groupBox_2); + backgroundColorButton->setObjectName(QString::fromUtf8("backgroundColorButton")); + sizePolicy1.setHeightForWidth(backgroundColorButton->sizePolicy().hasHeightForWidth()); + backgroundColorButton->setSizePolicy(sizePolicy1); + backgroundColorButton->setMinimumSize(QSize(23, 23)); + backgroundColorButton->setMaximumSize(QSize(23, 23)); + backgroundColorButton->setBaseSize(QSize(0, 0)); + backgroundColorButton->setFocusPolicy(Qt::NoFocus); + backgroundColorButton->setAutoDefault(false); + backgroundColorButton->setFlat(false); + + gridLayout_4->addWidget(backgroundColorButton, 1, 1, 1, 1); + + lineNumberPanelLabel = new QLabel(groupBox_2); + lineNumberPanelLabel->setObjectName(QString::fromUtf8("lineNumberPanelLabel")); + + gridLayout_4->addWidget(lineNumberPanelLabel, 2, 0, 1, 1); + + lineNumberPanelColorButton = new QPushButton(groupBox_2); + lineNumberPanelColorButton->setObjectName(QString::fromUtf8("lineNumberPanelColorButton")); + sizePolicy1.setHeightForWidth(lineNumberPanelColorButton->sizePolicy().hasHeightForWidth()); + lineNumberPanelColorButton->setSizePolicy(sizePolicy1); + lineNumberPanelColorButton->setMinimumSize(QSize(23, 23)); + lineNumberPanelColorButton->setMaximumSize(QSize(23, 23)); + lineNumberPanelColorButton->setBaseSize(QSize(0, 0)); + lineNumberPanelColorButton->setFocusPolicy(Qt::NoFocus); + lineNumberPanelColorButton->setAutoDefault(false); + lineNumberPanelColorButton->setFlat(false); + + gridLayout_4->addWidget(lineNumberPanelColorButton, 2, 1, 1, 1); + + lineNumberFontLabel = new QLabel(groupBox_2); + lineNumberFontLabel->setObjectName(QString::fromUtf8("lineNumberFontLabel")); + + gridLayout_4->addWidget(lineNumberFontLabel, 3, 0, 1, 1); + + lineNumberFontColorButton = new QPushButton(groupBox_2); + lineNumberFontColorButton->setObjectName(QString::fromUtf8("lineNumberFontColorButton")); + sizePolicy1.setHeightForWidth(lineNumberFontColorButton->sizePolicy().hasHeightForWidth()); + lineNumberFontColorButton->setSizePolicy(sizePolicy1); + lineNumberFontColorButton->setMinimumSize(QSize(23, 23)); + lineNumberFontColorButton->setMaximumSize(QSize(23, 23)); + lineNumberFontColorButton->setBaseSize(QSize(0, 0)); + lineNumberFontColorButton->setFocusPolicy(Qt::NoFocus); + lineNumberFontColorButton->setAutoDefault(false); + lineNumberFontColorButton->setFlat(false); + + gridLayout_4->addWidget(lineNumberFontColorButton, 3, 1, 1, 1); + + + verticalLayout_5->addLayout(gridLayout_4); + + label_8 = new QLabel(groupBox_2); + label_8->setObjectName(QString::fromUtf8("label_8")); + label_8->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); + + verticalLayout_5->addWidget(label_8); + + horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + verticalLayout_5->addItem(horizontalSpacer_6); + + verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); + + verticalLayout_5->addItem(verticalSpacer_4); + + + gridLayout->addWidget(groupBox_2, 0, 0, 1, 1); + + tabWidget->addTab(colorsTab, QString()); + buildTab = new QWidget(); + buildTab->setObjectName(QString::fromUtf8("buildTab")); + verticalLayout_6 = new QVBoxLayout(buildTab); + verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6")); + formLayout = new QFormLayout(); + formLayout->setObjectName(QString::fromUtf8("formLayout")); + formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); + formLayout->setHorizontalSpacing(12); + formLayout->setVerticalSpacing(12); + formLayout->setContentsMargins(-1, -1, -1, 0); + modeLabel = new QLabel(buildTab); + modeLabel->setObjectName(QString::fromUtf8("modeLabel")); + + formLayout->setWidget(0, QFormLayout::LabelRole, modeLabel); + + horizontalLayout_3 = new QHBoxLayout(); + horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); + x86RadioButton = new QRadioButton(buildTab); + buttonGroup_2 = new QButtonGroup(SettingsWindow); + buttonGroup_2->setObjectName(QString::fromUtf8("buttonGroup_2")); + buttonGroup_2->addButton(x86RadioButton); + x86RadioButton->setObjectName(QString::fromUtf8("x86RadioButton")); + x86RadioButton->setChecked(true); + + horizontalLayout_3->addWidget(x86RadioButton); + + x64RadioButton = new QRadioButton(buildTab); + buttonGroup_2->addButton(x64RadioButton); + x64RadioButton->setObjectName(QString::fromUtf8("x64RadioButton")); + x64RadioButton->setChecked(false); + + horizontalLayout_3->addWidget(x64RadioButton); + + horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_3->addItem(horizontalSpacer); + + + formLayout->setLayout(0, QFormLayout::FieldRole, horizontalLayout_3); + + assemblerLabel = new QLabel(buildTab); + assemblerLabel->setObjectName(QString::fromUtf8("assemblerLabel")); + + formLayout->setWidget(1, QFormLayout::LabelRole, assemblerLabel); + + horizontalLayout_6 = new QHBoxLayout(); + horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6")); + nasmRadioButton = new QRadioButton(buildTab); + buttonGroup = new QButtonGroup(SettingsWindow); + buttonGroup->setObjectName(QString::fromUtf8("buttonGroup")); + buttonGroup->addButton(nasmRadioButton); + nasmRadioButton->setObjectName(QString::fromUtf8("nasmRadioButton")); + nasmRadioButton->setChecked(true); + + horizontalLayout_6->addWidget(nasmRadioButton); + + gasRadioButton = new QRadioButton(buildTab); + buttonGroup->addButton(gasRadioButton); + gasRadioButton->setObjectName(QString::fromUtf8("gasRadioButton")); + + horizontalLayout_6->addWidget(gasRadioButton); + + fasmRadioButton = new QRadioButton(buildTab); + buttonGroup->addButton(fasmRadioButton); + fasmRadioButton->setObjectName(QString::fromUtf8("fasmRadioButton")); + + horizontalLayout_6->addWidget(fasmRadioButton); + + masmRadioButton = new QRadioButton(buildTab); + buttonGroup->addButton(masmRadioButton); + masmRadioButton->setObjectName(QString::fromUtf8("masmRadioButton")); + + horizontalLayout_6->addWidget(masmRadioButton); + + horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); + + horizontalLayout_6->addItem(horizontalSpacer_8); + + + formLayout->setLayout(1, QFormLayout::FieldRole, horizontalLayout_6); + + assemblyLabel = new QLabel(buildTab); + assemblyLabel->setObjectName(QString::fromUtf8("assemblyLabel")); + + formLayout->setWidget(2, QFormLayout::LabelRole, assemblyLabel); + + assemblyOptionsEdit = new QLineEdit(buildTab); + assemblyOptionsEdit->setObjectName(QString::fromUtf8("assemblyOptionsEdit")); + + formLayout->setWidget(2, QFormLayout::FieldRole, assemblyOptionsEdit); + + linkingLabel = new QLabel(buildTab); + linkingLabel->setObjectName(QString::fromUtf8("linkingLabel")); + + formLayout->setWidget(3, QFormLayout::LabelRole, linkingLabel); + + linkingOptionsEdit = new QLineEdit(buildTab); + linkingOptionsEdit->setObjectName(QString::fromUtf8("linkingOptionsEdit")); + + formLayout->setWidget(3, QFormLayout::FieldRole, linkingOptionsEdit); + + assemblerPathLabel = new QLabel(buildTab); + assemblerPathLabel->setObjectName(QString::fromUtf8("assemblerPathLabel")); + + formLayout->setWidget(4, QFormLayout::LabelRole, assemblerPathLabel); + + assemblerPathEdit = new QLineEdit(buildTab); + assemblerPathEdit->setObjectName(QString::fromUtf8("assemblerPathEdit")); + + formLayout->setWidget(4, QFormLayout::FieldRole, assemblerPathEdit); + + linkerPathLabel = new QLabel(buildTab); + linkerPathLabel->setObjectName(QString::fromUtf8("linkerPathLabel")); + + formLayout->setWidget(5, QFormLayout::LabelRole, linkerPathLabel); + + linkerPathEdit = new QLineEdit(buildTab); + linkerPathEdit->setObjectName(QString::fromUtf8("linkerPathEdit")); + + formLayout->setWidget(5, QFormLayout::FieldRole, linkerPathEdit); + + objectFileNameLabel = new QLabel(buildTab); + objectFileNameLabel->setObjectName(QString::fromUtf8("objectFileNameLabel")); + + formLayout->setWidget(6, QFormLayout::LabelRole, objectFileNameLabel); + + objectFileNameEdit = new QLineEdit(buildTab); + objectFileNameEdit->setObjectName(QString::fromUtf8("objectFileNameEdit")); + + formLayout->setWidget(6, QFormLayout::FieldRole, objectFileNameEdit); + + gdbPathLabel = new QLabel(buildTab); + gdbPathLabel->setObjectName(QString::fromUtf8("gdbPathLabel")); + + formLayout->setWidget(7, QFormLayout::LabelRole, gdbPathLabel); + + gdbPathEdit = new QLineEdit(buildTab); + gdbPathEdit->setObjectName(QString::fromUtf8("gdbPathEdit")); + + formLayout->setWidget(7, QFormLayout::FieldRole, gdbPathEdit); + + assemblerWorkingDirectoryLabel = new QLabel(buildTab); + assemblerWorkingDirectoryLabel->setObjectName(QString::fromUtf8("assemblerWorkingDirectoryLabel")); + + formLayout->setWidget(11, QFormLayout::LabelRole, assemblerWorkingDirectoryLabel); + + runInCurrentDirectoryCheckbox = new QCheckBox(buildTab); + runInCurrentDirectoryCheckbox->setObjectName(QString::fromUtf8("runInCurrentDirectoryCheckbox")); + runInCurrentDirectoryCheckbox->setEnabled(true); + + formLayout->setWidget(11, QFormLayout::FieldRole, runInCurrentDirectoryCheckbox); + + disableLinkingLabel = new QLabel(buildTab); + disableLinkingLabel->setObjectName(QString::fromUtf8("disableLinkingLabel")); + + formLayout->setWidget(12, QFormLayout::LabelRole, disableLinkingLabel); + + disableLinkingCheckbox = new QCheckBox(buildTab); + disableLinkingCheckbox->setObjectName(QString::fromUtf8("disableLinkingCheckbox")); + disableLinkingCheckbox->setEnabled(true); + + formLayout->setWidget(12, QFormLayout::FieldRole, disableLinkingCheckbox); + + gdbVerboseLabel = new QLabel(buildTab); + gdbVerboseLabel->setObjectName(QString::fromUtf8("gdbVerboseLabel")); + + formLayout->setWidget(10, QFormLayout::LabelRole, gdbVerboseLabel); + + sasmVerboseCheckBox = new QCheckBox(buildTab); + sasmVerboseCheckBox->setObjectName(QString::fromUtf8("sasmVerboseCheckBox")); + + formLayout->setWidget(10, QFormLayout::FieldRole, sasmVerboseCheckBox); + + MiModusLabel = new QLabel(buildTab); + MiModusLabel->setObjectName(QString::fromUtf8("MiModusLabel")); + + formLayout->setWidget(13, QFormLayout::LabelRole, MiModusLabel); + + MiModusCheckBox = new QCheckBox(buildTab); + MiModusCheckBox->setObjectName(QString::fromUtf8("MiModusCheckBox")); + MiModusCheckBox->setEnabled(true); + + formLayout->setWidget(13, QFormLayout::FieldRole, MiModusCheckBox); + + gdbDisplayLabel = new QLabel(buildTab); + gdbDisplayLabel->setObjectName(QString::fromUtf8("gdbDisplayLabel")); + + formLayout->setWidget(14, QFormLayout::LabelRole, gdbDisplayLabel); + + sasmDisplayCheckBox = new QCheckBox(buildTab); + sasmDisplayCheckBox->setObjectName(QString::fromUtf8("sasmDisplayCheckBox")); + + formLayout->setWidget(14, QFormLayout::FieldRole, sasmDisplayCheckBox); + + + verticalLayout_6->addLayout(formLayout); + + + infoLabel = new QLabel(buildTab); + infoLabel->setObjectName(QString::fromUtf8("infoLabel")); + infoLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); + + verticalLayout_6->addWidget(infoLabel); + + tabWidget->addTab(buildTab, QString()); + + verticalLayout->addWidget(tabWidget); + + buttonBox = new QDialogButtonBox(SettingsWindow); + buttonBox->setObjectName(QString::fromUtf8("buttonBox")); + buttonBox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok); + + verticalLayout->addWidget(buttonBox); + + QWidget::setTabOrder(startWindow, fontSizeSpinBox); + QWidget::setTabOrder(fontSizeSpinBox, fontComboBox); + QWidget::setTabOrder(fontComboBox, resetAllButton); + QWidget::setTabOrder(resetAllButton, language); + + retranslateUi(SettingsWindow); + + tabWidget->setCurrentIndex(2); + quotationColorButton->setDefault(false); + systemColorButton->setDefault(false); + commentsColorButton_2->setDefault(false); + keywordsColorButton->setDefault(false); + keywordsColorButton_2->setDefault(false); + iomacroColorButton_2->setDefault(false); + labelsColorButton->setDefault(false); + quotationColorButton_2->setDefault(false); + memoryColorButton->setDefault(false); + systemColorButton_2->setDefault(false); + labelsColorButton_2->setDefault(false); + iomacroColorButton->setDefault(false); + registersColorButton_2->setDefault(false); + numbersColorButton->setDefault(false); + commentsColorButton->setDefault(false); + memoryColorButton_2->setDefault(false); + registersColorButton->setDefault(false); + numbersColorButton_2->setDefault(false); + fontColorButton->setDefault(false); + debugLineColorButton->setDefault(false); + currentLineColorButton->setDefault(false); + backgroundColorButton->setDefault(false); + lineNumberPanelColorButton->setDefault(false); + lineNumberFontColorButton->setDefault(false); + + + QMetaObject::connectSlotsByName(SettingsWindow); + } // setupUi + + void retranslateUi(QWidget *SettingsWindow) + { + SettingsWindow->setWindowTitle(QApplication::translate("SettingsWindow", "Settings", nullptr)); + settingsLabel->setText(QApplication::translate("SettingsWindow", "SASM Options", nullptr)); + commonSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); + startWindowLabel->setText(QApplication::translate("SettingsWindow", "On start:", nullptr)); + startWindow->setItemText(0, QApplication::translate("SettingsWindow", "Open get started window", nullptr)); + startWindow->setItemText(1, QApplication::translate("SettingsWindow", "Restore previous session", nullptr)); + + languageLabel->setText(QApplication::translate("SettingsWindow", "Language:", nullptr)); + + label_4->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + registersLabel_2->setText(QApplication::translate("SettingsWindow", "Show all registers in debug:", nullptr)); + registersYesRadioButton->setText(QApplication::translate("SettingsWindow", "Yes", nullptr)); + registersNoRadioButton->setText(QApplication::translate("SettingsWindow", "No, show only general purpose", nullptr)); + insertDebugStringLabel->setText(QApplication::translate("SettingsWindow", "Insert debug string:", nullptr)); + insertDebugStringCheckBox->setText(QString()); + codeSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Code editor", nullptr)); + fontLabel->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); + fontSizeLabel->setText(QApplication::translate("SettingsWindow", "Size:", nullptr)); + label->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + label_2->setText(QApplication::translate("SettingsWindow", "Default code editor text:", nullptr)); + resetAllButton->setText(QApplication::translate("SettingsWindow", "Reset all (need a restart)...", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(commonTab), QApplication::translate("SettingsWindow", "Common", nullptr)); + groupBox->setTitle(QApplication::translate("SettingsWindow", "Syntax highlighting", nullptr)); + iomacroBoldCheckBox->setText(QString()); + systemLabel->setText(QApplication::translate("SettingsWindow", "System:", nullptr)); + quotationColorButton->setText(QString()); + systemColorButton->setText(QString()); + numbersItalicCheckBox->setText(QString()); + label_6->setText(QApplication::translate("SettingsWindow", "Bold:", nullptr)); + numbersBoldCheckBox->setText(QString()); + label_7->setText(QApplication::translate("SettingsWindow", "Italic:", nullptr)); + label_3->setText(QApplication::translate("SettingsWindow", "Foreground:", nullptr)); + systemItalicCheckBox->setText(QString()); + commentsColorButton_2->setText(QString()); + keywordsColorButton->setText(QString()); + commentsBoldCheckBox->setText(QString()); + keywordsColorButton_2->setText(QString()); + iomacroColorButton_2->setText(QString()); + memoryItalicCheckBox->setText(QString()); + keywordsLabel->setText(QApplication::translate("SettingsWindow", "Keywords:", nullptr)); + label_5->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); + labelsColorButton->setText(QString()); + numbersLabel->setText(QApplication::translate("SettingsWindow", "Numbers:", nullptr)); + quotationColorButton_2->setText(QString()); + labelsLabel->setText(QApplication::translate("SettingsWindow", "Labels:", nullptr)); + commentsLabel->setText(QApplication::translate("SettingsWindow", "Comments:", nullptr)); + memoryColorButton->setText(QString()); + systemColorButton_2->setText(QString()); + iomacroLabel_2->setText(QApplication::translate("SettingsWindow", "Quotation:", nullptr)); + labelsColorButton_2->setText(QString()); + registersBoldCheckBox->setText(QString()); + quotationBoldCheckBox->setText(QString()); + iomacroColorButton->setText(QString()); + iomacroItalicCheckBox->setText(QString()); + registersColorButton_2->setText(QString()); + keywordsBoldCheckBox->setText(QString()); + memoryBoldCheckBox->setText(QString()); + numbersColorButton->setText(QString()); + quotationItalicCheckBox->setText(QString()); + commentsColorButton->setText(QString()); + labelsItalicCheckBox->setText(QString()); + memoryLabel->setText(QApplication::translate("SettingsWindow", "Memory:", nullptr)); + iomacroLabel->setText(QApplication::translate("SettingsWindow", "I/O macro:", nullptr)); + keywordsItalicCheckBox->setText(QString()); + registersLabel->setText(QApplication::translate("SettingsWindow", "Registers:", nullptr)); + commentsItalicCheckBox->setText(QString()); + labelsBoldCheckBox->setText(QString()); + registersItalicCheckBox->setText(QString()); + systemBoldCheckBox->setText(QString()); + memoryColorButton_2->setText(QString()); + registersColorButton->setText(QString()); + numbersColorButton_2->setText(QString()); + groupBox_2->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); + fontLabel_2->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); + fontColorButton->setText(QString()); + currentLineCheckBox->setText(QApplication::translate("SettingsWindow", "Enable highlighting", nullptr)); + debugLineColorButton->setText(QString()); + currentLineLabel->setText(QApplication::translate("SettingsWindow", "Current line:", nullptr)); + debugLineLabel->setText(QApplication::translate("SettingsWindow", "Debugging line:", nullptr)); + currentLineColorButton->setText(QString()); + backgroundLabel->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); + backgroundColorButton->setText(QString()); + lineNumberPanelLabel->setText(QApplication::translate("SettingsWindow", "Line number panel:", nullptr)); + lineNumberPanelColorButton->setText(QString()); + lineNumberFontLabel->setText(QApplication::translate("SettingsWindow", "Line number font:", nullptr)); + lineNumberFontColorButton->setText(QString()); + label_8->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); + tabWidget->setTabText(tabWidget->indexOf(colorsTab), QApplication::translate("SettingsWindow", "Colors", nullptr)); + modeLabel->setText(QApplication::translate("SettingsWindow", "Mode:", nullptr)); + x86RadioButton->setText(QApplication::translate("SettingsWindow", "x86", nullptr)); + x64RadioButton->setText(QApplication::translate("SettingsWindow", "x64", nullptr)); + assemblerLabel->setText(QApplication::translate("SettingsWindow", "Assembler:", nullptr)); + nasmRadioButton->setText(QApplication::translate("SettingsWindow", "NASM", nullptr)); + gasRadioButton->setText(QApplication::translate("SettingsWindow", "GAS", nullptr)); + fasmRadioButton->setText(QApplication::translate("SettingsWindow", "FASM", nullptr)); + masmRadioButton->setText(QApplication::translate("SettingsWindow", "MASM", nullptr)); + assemblyLabel->setText(QApplication::translate("SettingsWindow", "Assembly options:", nullptr)); + linkingLabel->setText(QApplication::translate("SettingsWindow", "Linking options:", nullptr)); + assemblerPathLabel->setText(QApplication::translate("SettingsWindow", "Assembler path:", nullptr)); + linkerPathLabel->setText(QApplication::translate("SettingsWindow", "Linker path:", nullptr)); + objectFileNameLabel->setText(QApplication::translate("SettingsWindow", "Object file name:", nullptr)); + gdbPathLabel->setText(QApplication::translate("SettingsWindow", "GDB path (Unix only):", nullptr)); + assemblerWorkingDirectoryLabel->setText(QApplication::translate("SettingsWindow", "Build in current directory:", nullptr)); + runInCurrentDirectoryCheckbox->setText(QString()); + disableLinkingLabel->setText(QApplication::translate("SettingsWindow", "Disable linking:", nullptr)); + disableLinkingCheckbox->setText(QString()); + gdbVerboseLabel->setText(QApplication::translate("SettingsWindow", "SASM verbose mode:", nullptr)); + sasmVerboseCheckBox->setText(QString()); + MiModusLabel->setText(QApplication::translate("SettingsWindow", "MI-Mode:", nullptr)); + MiModusCheckBox->setText(QString()); + gdbDisplayLabel->setText(QApplication::translate("SettingsWindow", "SASM display:", nullptr)); + sasmDisplayCheckBox->setText(QString()); + infoLabel->setText(QString()); + tabWidget->setTabText(tabWidget->indexOf(buildTab), QApplication::translate("SettingsWindow", "Build", nullptr)); + } // retranslateUi + +}; + +namespace Ui { + class SettingsWindow: public Ui_SettingsWindow {}; +} // namespace Ui + +QT_END_NAMESPACE + +#endif // UI_SETTINGS_H From 385861c4ada0268c519c06ba279ea410fb3cf632 Mon Sep 17 00:00:00 2001 From: Martin Schreiber Date: Thu, 4 Nov 2021 16:54:44 +0100 Subject: [PATCH 69/86] updated README --- README.md | 184 ++++++++++++++++++++++-------------------------------- 1 file changed, 76 insertions(+), 108 deletions(-) diff --git a/README.md b/README.md index 6cc105e5..8da68b59 100644 --- a/README.md +++ b/README.md @@ -1,108 +1,76 @@ -SASM (SimpleASM) - простая кроссплатформенная среда разработки для языков ассемблера NASM, MASM, GAS, FASM с подсветкой синтаксиса и отладчиком. В SASM Вы можете легко разрабатывать и выполнять программы, написанные на языках ассемблера NASM, MASM, GAS, FASM. Вводите код в форму и запускайте приложение. Программа работает "из коробки" и хорошо подойдет для начинающих изучать язык ассемблера. -Основана на Qt. Распространяется по свободной лицензии GNU GPL v3.0. - -SASM (SimpleASM) - simple Open Source crossplatform IDE for NASM, MASM, GAS, FASM assembly languages. -SASM has syntax highlighting and debugger. The program works out of the box and is great for beginners to learn assembly language. SASM is translated into Russian, English, Turkish (thanks Ali Goren), Chinese (thanks Ahmed Zetao Yang), German (thanks Sebastian Fischer), Italian (thanks Carlo Dapor), Polish (thanks Krzysztof Rossa), Hebrew (thanks Elian Kamal), Spanish (thanks Mariano Cordoba). -Licensed under the GNU GPL v3.0. Based on the Qt. - - - -# How to build and run SASM: - -You need: -<<<<<<< HEAD:README.txt -On Windows: -For building: - C++ compiler (e.g. gcc from MinGW) - make (e.g. mingw32-make from MinGW) - Qt 5 -For running: - Everything needed is included. - -On Linux: -For building: - build-essential - qtbase5-dev - qt5-default -For running: - gcc-multilib (x64 OS) or gcc (x86 OS) - gdb - nasm - -For QT5, install - qt5-default - - -Download sources and unpack their. -Go to directory with their: "cd " -Further print commands: -1) "qmake" (For installing in specific directory on Linux - print: "qmake PREFIX=". By default SASM installs in "/usr/bin" and "usr/share") -2) "make" for Linux and "mingw32-make" for Windows. -3) For Linux: "make install" (command "sasm" will open SASM) or run "sasm" from folder right away or put "sasm" executable file to folder "Linux" (from this folder you can run the program). - For Windows: Put "sasm.exe" executable file to folder "Windows". From this folder you can run the program. Also you can run program right away from SASM folder. - If the program does not start after successful compilation and the error message (0xc000007b) appears, check that the path to GNU Compiler is set correctly in the environment variables. -=========================================================================== -======= - -* On Windows: - - * For building: - * C++ compiler (e.g. gcc from MinGW) - * make (e.g. mingw32-make from MinGW) - * Qt 5 - - * For running: - * Everything needed is included. - - - -* On Linux - * For building: - * gcc (x86) or gcc-multilib (x64) - * gdb - * nasm - - * For QT4, install - * qt4-qmake - * libqt4-dev - * libqt4-core - * libqt4-gui - * libxcb1 - * libxcb-render0 - * libxcb-icccm4 - - * For QT5 building: - * build-essential - * qtbase5-dev - * qt5-default - - * For running: - * gcc-multilib (x64 OS) or gcc (x86 OS) - * gdb - * nasm - - -* Instructions: - * Download sources and unpack them. - * Go to directory with their: "cd " - * 1) "qmake" (For installing in specific directory on Linux - print: "qmake PREFIX=". By default SASM installs in "/usr/bin" and "usr/share") - * 2) "make" for Linux and "mingw32-make" for Windows. - - * For Linux: - * "make install" (command "sasm" will open SASM) or run "sasm" from folder right away or put "sasm" executable file to folder "Linux" (from this folder you can run the program). - * For Windows: - * Put "sasm.exe" executable file to folder "Windows". From this folder you can run the program. - * Also you can run program right away from SASM folder. - * If the program does not start after successful compilation and the error message (0xc000007b) appears, check that the path to GNU Compiler is set correctly in the environment variables. - - -# Prebuild packages - -Also you can download already compiled packages -from site https://dman95.github.io/SASM/ or -from OBS repository https://download.opensuse.org/repositories/home:/Dman95/ - -More help info in file help.html -Also SASM supports doxygen: run "doxygen configfile" to generate documentation. In this documentation you can also find a small developer guide which includes information about adding new assemblers and languages support. - -Copyright © 2013 Dmitriy Manushin +SASM (SimpleASM) - простая кроссплатформенная среда разработки для языков ассемблера NASM, MASM, GAS, FASM с подсветкой синтаксиса и отладчиком. В SASM Вы можете легко разрабатывать и выполнять программы, написанные на языках ассемблера NASM, MASM, GAS, FASM. Вводите код в форму и запускайте приложение. Программа работает "из коробки" и хорошо подойдет для начинающих изучать язык ассемблера. +Основана на Qt. Распространяется по свободной лицензии GNU GPL v3.0. + +SASM (SimpleASM) - simple Open Source crossplatform IDE for NASM, MASM, GAS, FASM assembly languages. +SASM has syntax highlighting and debugger. The program works out of the box and is great for beginners to learn assembly language. SASM is translated into Russian, English, Turkish (thanks Ali Goren), Chinese (thanks Ahmed Zetao Yang), German (thanks Sebastian Fischer), Italian (thanks Carlo Dapor), Polish (thanks Krzysztof Rossa), Hebrew (thanks Elian Kamal), Spanish (thanks Mariano Cordoba). +Licensed under the GNU GPL v3.0. Based on the Qt. + + + +# How to build and run SASM: + + +## Linux + +### Software package dependencies + + * For assembly of SASM programs themselves: + * gcc (x86 OS) or gcc-multilib (x64 OS) + * gdb + * nasm + * Ubuntu 21.10: $ sudo apt install nasm gdb gcc gcc-multilib + + * For QT5 building (recommended): + * build-essential + * qtbase5-dev + * Ubuntu 21.10: $ sudo apt install build-essential qtbase5-dev + + * Compilation of SASM + * $ export QT_SELECT=5 (or 4 for Qt4) + * $ qmake + * OR $ qmake PREFIX= + * $ make -j + * Direct execution: + * run "./sasm" from folder right away + * Installation: + * $ make install + * Command "sasm" will open SASM + + + +## Windows: + + * For building: + * C++ compiler (e.g. gcc from MinGW) + * make (e.g. mingw32-make from MinGW) + * Qt 5 + + * For running: + * Everything needed is already included. + + * Instructions: + * Download sources and unpack source. + * Go to directory with their: "cd " + * 1) "qmake" + * 2) "mingw32-make" for Windows. + + * For Windows: + * Put "sasm.exe" executable file to folder "Windows". From this folder you can run the program. + * Also you can run program right away from SASM folder. + * If the program does not start after successful compilation and the error message (0xc000007b) appears, check that the path to GNU Compiler is set correctly in the environment variables. + + + + +# Prebuild packages + +Also you can download already compiled packages +from site https://dman95.github.io/SASM/ or +from OBS repository https://download.opensuse.org/repositories/home:/Dman95/ + +They might be outdated. + +More help info in file help.html +Also SASM supports doxygen: run "doxygen configfile" to generate documentation. In this documentation you can also find a small developer guide which includes information about adding new assemblers and languages support. + +Copyright © 2013 Dmitriy Manushin From 303b1012b8077f3bafc838d5cb9541b9f55dd628 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sat, 6 Nov 2021 13:32:24 +0100 Subject: [PATCH 70/86] updated stack error --- debugger.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) mode change 100644 => 100755 debugger.cpp diff --git a/debugger.cpp b/debugger.cpp old mode 100644 new mode 100755 index a871c6df..ac6b1dc2 --- a/debugger.cpp +++ b/debugger.cpp @@ -294,7 +294,7 @@ void Debugger::processMessage(QString output, QString error) c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); - doInput(QString("info f 0\n"), infoStack); + doInput(QString("p $sp\n"), infoStack); } //if an error with the wrong name of the section has occurred @@ -320,7 +320,7 @@ void Debugger::processMessage(QString output, QString error) c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); - doInput(QString("info f 0\n"), infoStack); + doInput(QString("p $sp\n"), infoStack); } } @@ -599,7 +599,7 @@ void Debugger::processAction(QString output, QString error) firstStack = false; index = r.indexIn(output); if(index != -1) - stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - addressSizeOffset; + stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16);// - addressSizeOffset; return; } stackInfo info; @@ -742,7 +742,7 @@ void Debugger::processMessageMiMode(QString output, QString error) c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); - doInput(QString("info f 0\n"), infoStack); + doInput(QString("p $sp\n"), infoStack); } //if an error with the wrong name of the section has occurred @@ -768,7 +768,7 @@ void Debugger::processMessageMiMode(QString output, QString error) c++; actionTypeQueue.enqueue(ni); doInput("info inferiors\n", none); - doInput(QString("info f 0\n"), infoStack); + doInput(QString("p $sp\n"), infoStack); } } @@ -1085,7 +1085,7 @@ void Debugger::processActionMiMode(QString output, QString error) firstStack = false; index = r.indexIn(output); if(index != -1) - stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16) - addressSizeOffset; + stackBottom = output.mid(index, r.matchedLength()).toULongLong(0, 16);// - addressSizeOffset; return; } stackInfo info; From 732661d679891613c8f9626296d8cb9e7507e344 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sat, 6 Nov 2021 13:39:39 +0100 Subject: [PATCH 71/86] mi-mode as default --- displayWindow.cpp | 2 +- mainwindow.cpp | 0 ui_settings.h | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 displayWindow.cpp mode change 100644 => 100755 mainwindow.cpp mode change 100644 => 100755 ui_settings.h diff --git a/displayWindow.cpp b/displayWindow.cpp old mode 100644 new mode 100755 index bb1c91d2..822a4d0a --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -234,7 +234,7 @@ void DisplayWindow::changeDisplay(int msgid){ sem_close(sem_consumer); sem_close(sem_producer); if(shmctl(shared_block_id, IPC_RMID, NULL) == IPC_RESULT_ERROR){ - emit printLog(QString("shmctl failed\n"), Qt::red); + //emit printLog(QString("shmctl failed\n"), Qt::red); } #endif qint64 elapsed_time2 = programExecutionTime2.elapsed(); diff --git a/mainwindow.cpp b/mainwindow.cpp old mode 100644 new mode 100755 diff --git a/ui_settings.h b/ui_settings.h old mode 100644 new mode 100755 index 0f7e4119..16c7c4c6 --- a/ui_settings.h +++ b/ui_settings.h @@ -1206,7 +1206,7 @@ class Ui_SettingsWindow MiModusCheckBox = new QCheckBox(buildTab); MiModusCheckBox->setObjectName(QString::fromUtf8("MiModusCheckBox")); - MiModusCheckBox->setEnabled(true); + MiModusCheckBox->setChecked(true); formLayout->setWidget(13, QFormLayout::FieldRole, MiModusCheckBox); From 84a426eb405853206bf15ad824c6a83010506105 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Sat, 6 Nov 2021 13:57:31 +0100 Subject: [PATCH 72/86] added examples --- .../sasm/Projects/display_animation64.asm | 245 ++++++++++++++++++ Linux/share/sasm/Projects/stack_example32.asm | 17 ++ Windows/Projects/stack_example32.asm | 17 ++ 3 files changed, 279 insertions(+) create mode 100644 Linux/share/sasm/Projects/display_animation64.asm create mode 100644 Linux/share/sasm/Projects/stack_example32.asm create mode 100644 Windows/Projects/stack_example32.asm diff --git a/Linux/share/sasm/Projects/display_animation64.asm b/Linux/share/sasm/Projects/display_animation64.asm new file mode 100644 index 00000000..41648aa0 --- /dev/null +++ b/Linux/share/sasm/Projects/display_animation64.asm @@ -0,0 +1,245 @@ +%include "io64.inc" + +section .data + displayArray: times 262144 db 0xff + +section .text +global CMAIN +CMAIN: + mov rbp, rsp; for correct debugging + ;rax = min 1 | rbx = max 510 + mov rbp, rsp + setupDisplay 512, 512, 0, 30 + call quadrat + call quadrat + ret + +quadrat: + mov rax, 1 + mov rbx, 510 + mov rcx, 125 + mov rdx, 385 + + andi: + call clearDisplay + + cmp rax, 205 + jl erstesq + mov rax, 1 + mov rbx, 510 + + erstesq: + + push rax + push rax + push rbx + push rax + call bresenham + add rsp, 32 + + push rax + push rax + push rax + push rbx + call bresenham + add rsp, 32 + + push rax + push rbx + push rbx + push rbx + call bresenham + add rsp, 32 + + push rbx + push rax + push rbx + push rbx + call bresenham + add rsp, 32 + + ;;;; + cmp rcx, 205 + jl zweitesq + mov rcx, 1 + mov rdx, 510 + + zweitesq: + + push rcx + push rcx + push rdx + push rcx + call bresenham + add rsp, 32 + + push rcx + push rcx + push rcx + push rdx + call bresenham + add rsp, 32 + + push rcx + push rdx + push rdx + push rdx + call bresenham + add rsp, 32 + + push rdx + push rcx + push rdx + push rdx + call bresenham + add rsp, 32 + ;;;; + + inc rax + dec rbx + inc rcx + dec rdx + + + updateDisplay displayArray + jmp andi + ret + +bresenham: +;Parameter: esp-24: y-ende | esp-32: x-ende | esp-40: y-anfang | esp-48: x-anfang +;rax = dx, rbx = dy, rcx = x, rdx = y, rdi = fehler, r8 singedflag for add, r9 for tmp +;--- +;swap points if xstart > xend + push rax + push rbx + push rcx + push rdx + mov rax, [rsp+48] + mov rbx, [rsp+64] + cmp rax, rbx + jge noswap + mov [rsp+64], rax + mov [rsp+48], rbx + mov rax, [rsp+40] + mov rbx, [rsp+56] + mov [rsp+56], rax + mov [rsp+40], rbx +noswap: +;--- +;REM Initialisierungen +; dx*2; dy*2 +; x = xstart +; y = ystart +; SETPIXEL x,y +; fehler = dx +;--- + ;Initialisierungen + mov r8, 1 + mov rax, [rsp+48] ;anpassen + mov rbx, [rsp+40] + sub rax, [rsp+64] + sub rbx, [rsp+56] + mov rdi, [rsp+64] + mov rsi, [rsp+56] + call setPixel + mov rcx, [rsp+64] + mov rdx, [rsp+56] + shl rax, 1 + shl rbx, 1 + cmp rbx, 0 + jge skip + mov rdi, rbx + mov rsi, 0 + call absvalue + mov rbx, rdi + mov r8, -1 + skip: + mov rdi, rbx + mov rsi, 0 + call absvalue + cmp rdi, rax + jg teil2 +;----teil1---- + mov rdi, rax + loop: cmp [rsp+48], rcx + jle end + inc rcx + sub rdi, rbx + cmp rdi, 0 + jge if + add rdx, r8 + add rdi, rax + if: push rdi + mov rdi, rcx + mov rsi, rdx + call setPixel + pop rdi + jmp loop + teil2: ;------- + mov rdi, rbx + loop2: cmp [rsp+40], rdx + jle end + add rdx, r8 + sub rdi, rax + cmp rdi, 0 + jge if2 + inc rcx + add rdi, rbx + if2: push rdi + mov rdi, rcx + mov rsi, rdx + call setPixel + pop rdi + jmp loop2 + + end: + mov rdi, [rsp+40] + mov rsi, [rsp+48] + call setPixel + pop rdx + pop rcx + pop rbx + pop rax + ret + +setPixel: + ;x in rdi und y in rsi + push rax + push rbx + push rdx + mov rax, 512 + mov rbx, rsi + mul rbx + add rax, rdi ;rax = y*128 + x --> current index + mov bl, 0x00 + mov [displayArray+rax], bl + pop rdx + pop rbx + pop rax + ret + +absvalue: + ;first parameter in rdi second in rsi -> erg in rdi + cmp rdi, rsi + jl signjump + sub rdi, rsi + ret + signjump: + sub rsi,rdi + mov rdi, rsi + ret + +clearDisplay: + ;clears displayarray + push rax + push rbx + xor rax, rax + clearDisplayloop: + mov rbx, 0xffffffffffffffff + mov [displayArray+rax], rbx + add rax, 8 + cmp rax, 262144 + jl clearDisplayloop + pop rbx + pop rax + ret \ No newline at end of file diff --git a/Linux/share/sasm/Projects/stack_example32.asm b/Linux/share/sasm/Projects/stack_example32.asm new file mode 100644 index 00000000..0a48fd16 --- /dev/null +++ b/Linux/share/sasm/Projects/stack_example32.asm @@ -0,0 +1,17 @@ +%include "io.inc" + +section .text +global CMAIN +CMAIN: + mov ebp, esp; for correct debugging + mov eax, 0xffff1111 + push eax + push 0 + call example_function + pop ax + pop ax + pop eax + ret + +example_function: + ret \ No newline at end of file diff --git a/Windows/Projects/stack_example32.asm b/Windows/Projects/stack_example32.asm new file mode 100644 index 00000000..0a48fd16 --- /dev/null +++ b/Windows/Projects/stack_example32.asm @@ -0,0 +1,17 @@ +%include "io.inc" + +section .text +global CMAIN +CMAIN: + mov ebp, esp; for correct debugging + mov eax, 0xffff1111 + push eax + push 0 + call example_function + pop ax + pop ax + pop eax + ret + +example_function: + ret \ No newline at end of file From 4847536f8301e97cd4c92503d22c6dbe2d17b0fc Mon Sep 17 00:00:00 2001 From: ge69dal Date: Mon, 8 Nov 2021 10:28:38 +0100 Subject: [PATCH 73/86] fix for the stack --- debugger.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/debugger.cpp b/debugger.cpp index ac6b1dc2..66ca02ae 100755 --- a/debugger.cpp +++ b/debugger.cpp @@ -337,7 +337,7 @@ void Debugger::processMessage(QString output, QString error) } if (!pid) { - QRegExp r("Num +Description +Executable"); + QRegExp r("Num +Description"); int index = output.indexOf(r); if (index != -1) { QString processString("process "); @@ -605,8 +605,9 @@ void Debugger::processAction(QString output, QString error) stackInfo info; quint64 address; quint64 value; + QString temporary_line; // TODO for (int i = 0; !stackStream.atEnd(); i++) { - stackStream >> info.value; + info.value = stackStream.readLine(); index = info.value.indexOf(QString("Cannot access memory")); if (index != -1){ emit printLog(QString("Error showing stack"), Qt::red); @@ -785,7 +786,7 @@ void Debugger::processMessageMiMode(QString output, QString error) } if (!pid) { - QRegExp r("Num +Description +Executable"); + QRegExp r("Num +Description"); int index = output.indexOf(r); if (index != -1) { QString processString("process "); @@ -1091,8 +1092,9 @@ void Debugger::processActionMiMode(QString output, QString error) stackInfo info; quint64 address; quint64 value; + QString temporary_line; // TODO for (int i = 0; !stackStream.atEnd(); i++) { - stackStream >> info.value; + info.value = stackStream.readLine(); index = info.value.indexOf(QString("Cannot access memory")); if (index != -1){ emit printLog(QString("Error showing stack"), Qt::red); From 5448612c66f953e69936d065488590074fda6191 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 9 Nov 2021 15:03:17 +0100 Subject: [PATCH 74/86] fix stack --- Linux/share/sasm/NASM/macro.c | 41 ++++++++++++++------- debugger.cpp | 6 ++-- displayWindow.cpp | 67 ++++++++++++++++++++++++++++++----- displayWindow.h | 7 ++++ mainwindow.cpp | 47 ++++++++++++++---------- mainwindow.h | 2 ++ 6 files changed, 130 insertions(+), 40 deletions(-) diff --git a/Linux/share/sasm/NASM/macro.c b/Linux/share/sasm/NASM/macro.c index 26709543..c01a4132 100644 --- a/Linux/share/sasm/NASM/macro.c +++ b/Linux/share/sasm/NASM/macro.c @@ -8,6 +8,8 @@ #include #include #include +#include +#include #define SEM_PRODUCER_FNAME "/myproducer" #define SEM_CONSUMER_FNAME "/myconsumer" @@ -18,8 +20,7 @@ FILE *get_stdin(void) { return stdin; } FILE *get_stdout(void) { return stdout; } void sasm_replace_stdin(void) {dup2(open("input.txt",0),0);} -sem_t* sem_consumer; -sem_t* sem_producer; +int sem_consumer_id, sem_producer_id; int display_size; char is_setup = 0; int shared_block_id; @@ -33,23 +34,27 @@ void setup(int res_x, int res_y, char mode, char fps){ } is_setup = 1; - if(res_x < 100 || res_x > 1024 || res_y < 100 || res_y > 1024 || fps > 60 || fps < 1){ + if(res_x < 100 || res_x > 1024 || res_y < 100 || res_y > 1024 || fps > 30 || fps < 1){ printf("sem_prod failed\n"); fflush(stdin); exit(-1); } - sem_producer = sem_open(SEM_PRODUCER_FNAME, 0); - if(sem_producer == SEM_FAILED){ - printf("sem_prod failed\n"); + struct sembuf sb = {0, -1, 0}; + sem_producer_id = semget(ftok(FILENAME, 'p'), 1, 0); + if(sem_producer_id == -1){ + printf("sem_prod failed(%ld)(%ld)\n", ftok(FILENAME, 'p'), errno); exit(-1); } - sem_consumer = sem_open(SEM_CONSUMER_FNAME, 0); - if(sem_consumer == SEM_FAILED){ + sem_consumer_id = semget(ftok(FILENAME, 'c'), 1, 0); + if(sem_consumer_id == -1){ printf("sem_consumer failed\n"); exit(-1); } - sem_wait(sem_consumer); + if (semop(sem_consumer_id, &sb, 1) == -1){ //sem_wait(sem_consumer); + perror("semop"); + exit(1); + } display_size = (mode) ? res_x*res_y*3 : res_x*res_y; key_t key = ftok(FILENAME, 'f'); @@ -70,7 +75,11 @@ void setup(int res_x, int res_y, char mode, char fps){ } shm_block[8] = mode; shm_block[9] = fps; - sem_post(sem_producer); + sb.sem_op = 1; /* free resource sem_post(sem_producer); */ + if (semop(sem_producer_id, &sb, 1) == -1) { + perror("semop"); + exit(1); + } } void update(char* data){ @@ -79,9 +88,17 @@ void update(char* data){ fflush(stdin); exit(-1); } - sem_wait(sem_consumer); + struct sembuf sb = {0, -1, 0}; + if(semop(sem_consumer_id, &sb, 1) == -1){ //sem_wait(sem_consumer); + perror("semop"); + exit(1); + } memcpy(shm_block, data, display_size); - sem_post(sem_producer); + sb.sem_op = 1; /* free resource sem_post(sem_producer); */ + if (semop(sem_producer_id, &sb, 1) == -1) { + perror("semop"); + exit(1); + } } void sleepFunc(){usleep(10000000);} diff --git a/debugger.cpp b/debugger.cpp index 66ca02ae..3515f548 100755 --- a/debugger.cpp +++ b/debugger.cpp @@ -607,7 +607,8 @@ void Debugger::processAction(QString output, QString error) quint64 value; QString temporary_line; // TODO for (int i = 0; !stackStream.atEnd(); i++) { - info.value = stackStream.readLine(); + //info.value = stackStream.readLine(); + stackStream >> info.value; index = info.value.indexOf(QString("Cannot access memory")); if (index != -1){ emit printLog(QString("Error showing stack"), Qt::red); @@ -1094,7 +1095,8 @@ void Debugger::processActionMiMode(QString output, QString error) quint64 value; QString temporary_line; // TODO for (int i = 0; !stackStream.atEnd(); i++) { - info.value = stackStream.readLine(); + // info.value = stackStream.readLine(); + stackStream >> info.value; index = info.value.indexOf(QString("Cannot access memory")); if (index != -1){ emit printLog(QString("Error showing stack"), Qt::red); diff --git a/displayWindow.cpp b/displayWindow.cpp index 822a4d0a..575faf3b 100755 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -67,6 +67,26 @@ DisplayWindow::DisplayWindow(QWidget *parent) : scrollArea->setWidget(scrollAreaWidgetContents); verticalLayout->addWidget(scrollArea); + + #ifdef Q_OS_WIN32 + #else + /* create producer semaphore | set to 0: */ + if ((sem_pro_id = semget(ftok(FILENAME, 'p'), 1, 0666 | IPC_CREAT)) == -1){ + emit printLog(QString("sem_prod failed (semget)\n"), Qt::red); + } + arg.val = 0; + if (semctl(sem_pro_id, 0, SETVAL, arg) == -1){ + emit printLog(QString("sem_prod failed (semctl)\n"), Qt::red); + } + /* create consumer semaphore | set to 1*/ + if ((sem_con_id = semget(ftok(FILENAME, 'c'), 1, 0666 | IPC_CREAT)) == -1){ + emit printLog(QString("sem_con failed (semget)\n"), Qt::red); + } + arg.val = 1; + if (semctl(sem_con_id, 0, SETVAL, arg) == -1){ + emit printLog(QString("sem_con failed (semctl)\n"), Qt::red); + } + #endif } void DisplayWindow::changeDisplay(int msgid){ @@ -164,7 +184,12 @@ void DisplayWindow::changeDisplay(int msgid){ } CloseHandle(hCreateNamedPipe); #else - sem_wait(sem_producer); + // wait sem_wait(sem_producer); + struct sembuf sb = {0, -1, 0}; + if (semop(sem_pro_id, &sb, 1) == -1){ + emit printLog(QString("sem_pro failed (semop)"+QString(strerror(errno))+"\n"), Qt::red); + } + if(loop){ //setup the shared memory key_t key = ftok(FILENAME, 'f'); @@ -186,19 +211,31 @@ void DisplayWindow::changeDisplay(int msgid){ } mode = block_values[8]; fps = block_values[9]; + if(fps < 1 || fps > 60){ + emit printLog(QString("fps has wrong settings\n"), Qt::red); + fps = 1; + } display_size = (mode) ? res_x*res_y*3 : res_x*res_y; displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); this->setFixedSize(QSize(res_x+60, res_y+92)); scrollAreaWidgetContents->update(); - sem_post(sem_consumer); + // sem_post(sem_consumer); + sb.sem_op = 1; + if (semop(sem_con_id, &sb, 1) == -1) { + emit printLog(QString("sem_con failed (semop)\n"), Qt::red); + } } /// while(loop){ // receive message - sem_wait(sem_producer); + // sem_wait(sem_producer); + sb.sem_op = -1; + if (semop(sem_pro_id, &sb, 1) == -1) { + emit printLog(QString("sem_pro failed (semop)\n"), Qt::red); + } if(!loop) break; // display the message and print on display @@ -228,14 +265,23 @@ void DisplayWindow::changeDisplay(int msgid){ usleep((1000/fps - elapsed_time)*1000); programExecutionTime.start(); scrollAreaWidgetContents->update(); - sem_post(sem_consumer); + //sem_post(sem_consumer); + sb.sem_op = 1; + if (semop(sem_con_id, &sb, 1) == -1) { + emit printLog(QString("sem_con failed (semop)\n"), Qt::red); + } } - //close sema - sem_close(sem_consumer); - sem_close(sem_producer); + //sem_close(sem_consumer); + //sem_close(sem_producer); if(shmctl(shared_block_id, IPC_RMID, NULL) == IPC_RESULT_ERROR){ //emit printLog(QString("shmctl failed\n"), Qt::red); } + if (semctl(sem_pro_id, 0, IPC_RMID, arg) == -1){ + emit printLog(QString("sem_pro failed (close)\n"), Qt::red); + } + if (semctl(sem_con_id, 0, IPC_RMID, arg) == -1){ + emit printLog(QString("sem_con failed (close)\n"), Qt::red); + } #endif qint64 elapsed_time2 = programExecutionTime2.elapsed(); qint64 ass = elapsed_time2; @@ -268,7 +314,12 @@ void DisplayWindow::finish(int msgid){ NULL); CloseHandle(hFile); #else - sem_post(sem_producer); + //sem_post(sem_producer); + struct sembuf sb = {0, -1, 0}; + sb.sem_op = 1; + if (semop(sem_pro_id, &sb, 1) == -1) { + emit printLog(QString("sem_pro failed (semop)\n"), Qt::red); + } #endif } diff --git a/displayWindow.h b/displayWindow.h index 777a5ff8..6d75a09a 100644 --- a/displayWindow.h +++ b/displayWindow.h @@ -65,8 +65,10 @@ #include #include #include +#include #endif #define BLOCK_SIZE 3145728 +#define FILENAME "/tmp" class DisplayWindow : public QWidget { @@ -84,6 +86,11 @@ class DisplayWindow : public QWidget sem_t* sem_producer; sem_t* sem_consumer; int sem_con_id, sem_pro_id; + union semun { + int val; /* used for SETVAL only */ + struct semid_ds *buf; /* used for IPC_STAT and IPC_SET */ + ushort *array; /* used for GETALL and SETALL */ + } arg; #endif protected: diff --git a/mainwindow.cpp b/mainwindow.cpp index 47ee0cc4..752b9b87 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1087,17 +1087,22 @@ void MainWindow::runProgram() displayWindow->hCreateNamedPipe = hCreateNamedPipe; consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1); #else - // setup some samphores - sem_unlink(SEM_CONSUMER_FNAME); - sem_unlink(SEM_PRODUCER_FNAME); - displayWindow->sem_producer = sem_open(SEM_PRODUCER_FNAME, O_CREAT, 0666, 0); - if(displayWindow->sem_producer == SEM_FAILED){ - emit printLog(QString("sem_prod failed\n"), Qt::red); + /* create producer semaphore | set to 0: */ + if ((displayWindow->sem_pro_id = semget(ftok(FILENAME, 'p'), 1, 0666 | IPC_CREAT)) == -1){ + emit printLog(QString("sem_prod failed (semget)\n"), Qt::red); } - displayWindow->sem_consumer = sem_open(SEM_CONSUMER_FNAME, O_CREAT, 0666, 1); - if(displayWindow->sem_consumer == SEM_FAILED){ - emit printLog(QString("sem_consumer failed\n"), Qt::red); + displayWindow->arg.val = 0; + if (semctl(displayWindow->sem_pro_id, 0, SETVAL, displayWindow->arg) == -1){ + emit printLog(QString("sem_prod failed (semctl)\n"), Qt::red); + } + /* create consumer semaphore | set to 1*/ + if ((displayWindow->sem_con_id = semget(ftok(FILENAME, 'c'), 1, 0666 | IPC_CREAT)) == -1){ + emit printLog(QString("sem_con failed (semget)\n"), Qt::red); + } + displayWindow->arg.val = 1; + if (semctl(displayWindow->sem_con_id, 0, SETVAL, displayWindow->arg) == -1){ + emit printLog(QString("sem_con failed (semctl)\n"), Qt::red); } consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); @@ -1278,17 +1283,23 @@ void MainWindow::debug() displayWindow->hCreateNamedPipe = hCreateNamedPipe; consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, -1); #else - sem_unlink(SEM_CONSUMER_FNAME); - sem_unlink(SEM_PRODUCER_FNAME); - - displayWindow->sem_producer = sem_open(SEM_PRODUCER_FNAME, O_CREAT, 0666, 0); - if(displayWindow->sem_producer == SEM_FAILED){ - emit printLog(QString("sem_prod failed\n"), Qt::red); + /* create producer semaphore | set to 0: */ + if ((displayWindow->sem_pro_id = semget(ftok(FILENAME, 'p'), 1, 0666 | IPC_CREAT)) == -1){ + emit printLog(QString("sem_prod failed (semget)\n"), Qt::red); } - displayWindow->sem_consumer = sem_open(SEM_CONSUMER_FNAME, O_CREAT, 0666, 1); - if(displayWindow->sem_consumer == SEM_FAILED){ - emit printLog(QString("sem_consumer failed\n"), Qt::red); + displayWindow->arg.val = 0; + if (semctl(displayWindow->sem_pro_id, 0, SETVAL, displayWindow->arg) == -1){ + emit printLog(QString("sem_prod failed (semctl)\n"), Qt::red); } + /* create consumer semaphore | set to 1*/ + if ((displayWindow->sem_con_id = semget(ftok(FILENAME, 'c'), 1, 0666 | IPC_CREAT)) == -1){ + emit printLog(QString("sem_con failed (semget)\n"), Qt::red); + } + displayWindow->arg.val = 1; + if (semctl(displayWindow->sem_con_id, 0, SETVAL, displayWindow->arg) == -1){ + emit printLog(QString("sem_con failed (semctl)\n"), Qt::red); + } + consumer = new std::thread(&DisplayWindow::changeDisplay, displayWindow, msgid); #endif diff --git a/mainwindow.h b/mainwindow.h index 7208da51..9f146bff 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -88,6 +88,7 @@ #include #include #include +#include /// #include #include @@ -97,6 +98,7 @@ #define SASM_VERSION "3.12.1" #define SEM_PRODUCER_FNAME "/myproducer" #define SEM_CONSUMER_FNAME "/myconsumer" +#define FILENAME "/tmp" #define IPC_RESULT_ERROR (-1) #define BLOCK_SIZE 3145728 From b03571d5e1ce0c1411677b4f122248cc38f67fba Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 9 Nov 2021 16:14:12 +0100 Subject: [PATCH 75/86] removed wrong errorLog print --- displayWindow.cpp | 37 +++++++++++++++++++++---------------- mainwindow.cpp | 1 + 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index 575faf3b..1dbff161 100755 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -68,9 +68,9 @@ DisplayWindow::DisplayWindow(QWidget *parent) : verticalLayout->addWidget(scrollArea); - #ifdef Q_OS_WIN32 + /*#ifdef Q_OS_WIN32 #else - /* create producer semaphore | set to 0: */ + // create producer semaphore | set to 0: if ((sem_pro_id = semget(ftok(FILENAME, 'p'), 1, 0666 | IPC_CREAT)) == -1){ emit printLog(QString("sem_prod failed (semget)\n"), Qt::red); } @@ -78,7 +78,7 @@ DisplayWindow::DisplayWindow(QWidget *parent) : if (semctl(sem_pro_id, 0, SETVAL, arg) == -1){ emit printLog(QString("sem_prod failed (semctl)\n"), Qt::red); } - /* create consumer semaphore | set to 1*/ + // create consumer semaphore | set to 1 if ((sem_con_id = semget(ftok(FILENAME, 'c'), 1, 0666 | IPC_CREAT)) == -1){ emit printLog(QString("sem_con failed (semget)\n"), Qt::red); } @@ -86,7 +86,7 @@ DisplayWindow::DisplayWindow(QWidget *parent) : if (semctl(sem_con_id, 0, SETVAL, arg) == -1){ emit printLog(QString("sem_con failed (semctl)\n"), Qt::red); } - #endif + #endif*/ } void DisplayWindow::changeDisplay(int msgid){ @@ -186,7 +186,7 @@ void DisplayWindow::changeDisplay(int msgid){ #else // wait sem_wait(sem_producer); struct sembuf sb = {0, -1, 0}; - if (semop(sem_pro_id, &sb, 1) == -1){ + if (semop(sem_pro_id, &sb, 1) == -1 && loop){ emit printLog(QString("sem_pro failed (semop)"+QString(strerror(errno))+"\n"), Qt::red); } @@ -224,7 +224,7 @@ void DisplayWindow::changeDisplay(int msgid){ // sem_post(sem_consumer); sb.sem_op = 1; if (semop(sem_con_id, &sb, 1) == -1) { - emit printLog(QString("sem_con failed (semop)\n"), Qt::red); + emit printLog(QString("1 sem_con failed (semop)\n"), Qt::red); } } /// @@ -233,7 +233,7 @@ void DisplayWindow::changeDisplay(int msgid){ // receive message // sem_wait(sem_producer); sb.sem_op = -1; - if (semop(sem_pro_id, &sb, 1) == -1) { + if (semop(sem_pro_id, &sb, 1) == -1 && loop) { emit printLog(QString("sem_pro failed (semop)\n"), Qt::red); } if(!loop) @@ -267,13 +267,13 @@ void DisplayWindow::changeDisplay(int msgid){ scrollAreaWidgetContents->update(); //sem_post(sem_consumer); sb.sem_op = 1; - if (semop(sem_con_id, &sb, 1) == -1) { - emit printLog(QString("sem_con failed (semop)\n"), Qt::red); + if (semop(sem_con_id, &sb, 1) == -1 && loop) { + emit printLog(QString("2 sem_con failed (semop)\n"), Qt::red); } } //sem_close(sem_consumer); //sem_close(sem_producer); - if(shmctl(shared_block_id, IPC_RMID, NULL) == IPC_RESULT_ERROR){ + /*if(shmctl(shared_block_id, IPC_RMID, NULL) == IPC_RESULT_ERROR){ //emit printLog(QString("shmctl failed\n"), Qt::red); } if (semctl(sem_pro_id, 0, IPC_RMID, arg) == -1){ @@ -281,7 +281,7 @@ void DisplayWindow::changeDisplay(int msgid){ } if (semctl(sem_con_id, 0, IPC_RMID, arg) == -1){ emit printLog(QString("sem_con failed (close)\n"), Qt::red); - } + }*/ #endif qint64 elapsed_time2 = programExecutionTime2.elapsed(); qint64 ass = elapsed_time2; @@ -314,11 +314,16 @@ void DisplayWindow::finish(int msgid){ NULL); CloseHandle(hFile); #else - //sem_post(sem_producer); - struct sembuf sb = {0, -1, 0}; - sb.sem_op = 1; - if (semop(sem_pro_id, &sb, 1) == -1) { - emit printLog(QString("sem_pro failed (semop)\n"), Qt::red); + if(loop){ + if(shmctl(shared_block_id, IPC_RMID, NULL) == IPC_RESULT_ERROR){ + emit printLog(QString("shmctl failed\n"), Qt::red); + } + } + if (semctl(sem_pro_id, 0, IPC_RMID, arg) == -1){ + emit printLog(QString("sem_pro failed (close)\n"), Qt::red); + } + if (semctl(sem_con_id, 0, IPC_RMID, arg) == -1){ + emit printLog(QString("sem_con failed (close)\n"), Qt::red); } #endif } diff --git a/mainwindow.cpp b/mainwindow.cpp index 752b9b87..65542ae3 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -1183,6 +1183,7 @@ void MainWindow::stopProgram() stopAction->setEnabled(false); runProcess->kill(); + displayWindow->finish(msgid); printLogWithTime(tr("The program stopped.") + '\n', Qt::darkGreen); } else { From 1c7b82d9c199fde7c68e152c7595e40f35235913 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 9 Nov 2021 18:53:07 +0100 Subject: [PATCH 76/86] added examples --- Linux/share/sasm/Projects/NASMHello.asm | 11 +---------- Linux/share/sasm/Projects/display_animation64.asm | 1 - debugger.cpp | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/Linux/share/sasm/Projects/NASMHello.asm b/Linux/share/sasm/Projects/NASMHello.asm index 2a6af949..64470b2e 100644 --- a/Linux/share/sasm/Projects/NASMHello.asm +++ b/Linux/share/sasm/Projects/NASMHello.asm @@ -1,20 +1,11 @@ -%include "io64.inc" +%include "io.inc" section .data msg db 'Hello, world!', 0 - msg2 db 'adadd', 0 section .text global CMAIN CMAIN: - mov rbp, rsp; for correct debugging - mov rbp, rsp PRINT_STRING msg - mov rbp, rsp - mov ebp, esp - PRINT_STRING msg - NEWLINE NEWLINE - PRINT_STRING msg2 - xor eax, eax ret \ No newline at end of file diff --git a/Linux/share/sasm/Projects/display_animation64.asm b/Linux/share/sasm/Projects/display_animation64.asm index 41648aa0..e57edc0c 100644 --- a/Linux/share/sasm/Projects/display_animation64.asm +++ b/Linux/share/sasm/Projects/display_animation64.asm @@ -8,7 +8,6 @@ global CMAIN CMAIN: mov rbp, rsp; for correct debugging ;rax = min 1 | rbx = max 510 - mov rbp, rsp setupDisplay 512, 512, 0, 30 call quadrat call quadrat diff --git a/debugger.cpp b/debugger.cpp index 3515f548..377e818e 100755 --- a/debugger.cpp +++ b/debugger.cpp @@ -929,7 +929,7 @@ void Debugger::processActionMiMode(QString output, QString error) if (output[output.length() - 1] != '\n') output += QChar('\n'); //process as ni or si - if (output.indexOf(QRegExp("addr=\"0x[0-9a-fA-F]{8,16}\"")) != -1 + if (output.indexOf(QString("*stopped,reason")) != -1 && !backtrace) { actionTypeQueue.enqueue(showLine); processActionMiMode(output); From c82af060978e1c669339e7c7133a5609a13bf8ef Mon Sep 17 00:00:00 2001 From: ge69dal Date: Tue, 9 Nov 2021 21:34:17 +0100 Subject: [PATCH 77/86] displayanimation added --- .../sasm/Projects/display_animation32.asm | 251 ++++++++++++++++++ 1 file changed, 251 insertions(+) create mode 100644 Linux/share/sasm/Projects/display_animation32.asm diff --git a/Linux/share/sasm/Projects/display_animation32.asm b/Linux/share/sasm/Projects/display_animation32.asm new file mode 100644 index 00000000..68bc05b0 --- /dev/null +++ b/Linux/share/sasm/Projects/display_animation32.asm @@ -0,0 +1,251 @@ +%include "io.inc" + +section .data + displayArray: times 262144 db 0xff + +section .text +global CMAIN +CMAIN: + mov ebp, esp + ;eax = min 1 | ebx = max 510 + setupDisplay 512, 512, 0, 30 + call quadrat + call quadrat + ret + +quadrat: + mov eax, 1 + mov ebx, 510 + mov ecx, 125 + mov edx, 385 + + andi: + call clearDisplay + + cmp eax, 205 + jl erstesq + mov eax, 1 + mov ebx, 510 + + erstesq: + + push eax + push eax + push ebx + push eax + call bresenham + add esp, 16 + + push eax + push eax + push eax + push ebx + call bresenham + add esp, 16 + + push eax + push ebx + push ebx + push ebx + call bresenham + add esp, 16 + + push ebx + push eax + push ebx + push ebx + call bresenham + add esp, 16 + + ;;;; + cmp ecx, 205 + jl zweitesq + mov ecx, 1 + mov edx, 510 + + zweitesq: + + push ecx + push ecx + push edx + push ecx + call bresenham + add esp, 16 + + push ecx + push ecx + push ecx + push edx + call bresenham + add esp, 16 + + push ecx + push edx + push edx + push edx + call bresenham + add esp, 16 + + push edx + push ecx + push edx + push edx + call bresenham + add esp, 16 + ;;;; + + inc eax + dec ebx + inc ecx + dec edx + + + updateDisplay displayArray + jmp andi + ret + +bresenham: +;Parameter: esp-24: y-ende | esp-48: x-ende | esp-56: y-anfang | esp-64: x-anfang --> 24, 28, 32, 36 -> : esp+0 +;eax = dx, ebx = dy, ecx = x, edx = y, edi = fehler, esp+0 singedflag for add +;--- +;swap points if xstart > xend + push eax + push ebx + push ecx + push edx + push 1 ;r8 ersatz + mov eax, [esp+28] + mov ebx, [esp+36] + cmp eax, ebx + jge noswap + mov [esp+36], eax + mov [esp+28], ebx + mov eax, [esp+24] + mov ebx, [esp+32] + mov [esp+32], eax + mov [esp+24], ebx +noswap: +;--- +;REM Initialisierungen +; dx*2; dy*2 +; x = xstart +; y = ystart +; SETPIXEL x,y +; fehler = dx +;--- + ;Initialisierungen + ;mov r8, 1 + mov eax, [esp+28] ;anpassen + mov ebx, [esp+24] + sub eax, [esp+36] + sub ebx, [esp+32] + mov edi, [esp+36] + mov esi, [esp+32] + call setPixel + mov ecx, [esp+36] + mov edx, [esp+32] + shl eax, 1 + shl ebx, 1 + cmp ebx, 0 + jge skip + mov edi, ebx + mov esi, 0 + call absvalue + mov ebx, edi + push eax + mov eax, -1 + mov [esp+4], eax + pop eax + skip: + mov edi, ebx + mov esi, 0 + call absvalue + cmp edi, eax + jg teil2 +;----teil1---- + mov edi, eax + loop: cmp [esp+28], ecx + jle end + inc ecx + sub edi, ebx + cmp edi, 0 + jge if + add edx, [esp] + add edi, eax + if: push edi + mov edi, ecx + mov esi, edx + call setPixel + pop edi + jmp loop + teil2: ;------- + mov edi, ebx + loop2: cmp [esp+24], edx + jle end + add edx, [esp] + sub edi, eax + cmp edi, 0 + jge if2 + inc ecx + add edi, ebx + if2: push edi + mov edi, ecx + mov esi, edx + call setPixel + pop edi + jmp loop2 + + end: + mov edi, [esp+24] + mov esi, [esp+28] + call setPixel + pop edx + pop edx + pop ecx + pop ebx + pop eax + ret + +setPixel: + ;x in edi und y in esi + push eax + push ebx + push edx + mov eax, 512 + mov ebx, esi + mul ebx + add eax, edi ;eax = y*128 + x --> current index + mov bl, 0x00 + mov [displayArray+eax], bl + pop edx + pop ebx + pop eax + ret + +absvalue: + ;first parameter in rdi second in rsi -> erg in rdi + cmp edi, esi + jl signjump + sub edi, esi + ret + signjump: + sub esi,edi + mov edi, esi + ret + +clearDisplay: + ;clears displayarray + push eax + push ebx + xor eax, eax + clearDisplayloop: + mov ebx, 0xffffffff + mov [displayArray+eax], ebx + add eax, 4 + cmp eax, 262144 + jl clearDisplayloop + pop ebx + pop eax + ret + +;fehler: wenn gerade nach unten \ No newline at end of file From f5f8a1f710002c9b7ac7a3fac8ddb038c20ce837 Mon Sep 17 00:00:00 2001 From: Martin Schreiber Date: Tue, 9 Nov 2021 22:28:09 +0100 Subject: [PATCH 78/86] removed unused variables --- displayWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index 1dbff161..744d852d 100755 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -283,8 +283,8 @@ void DisplayWindow::changeDisplay(int msgid){ emit printLog(QString("sem_con failed (close)\n"), Qt::red); }*/ #endif - qint64 elapsed_time2 = programExecutionTime2.elapsed(); - qint64 ass = elapsed_time2; + //qint64 elapsed_time2 = programExecutionTime2.elapsed(); + //qint64 ass = elapsed_time2; loop = false; //zoomComboBox->setEditable(false); emit closeDisplay(); From 06622a01f35df6a9dd64a717c019777bb88b79be Mon Sep 17 00:00:00 2001 From: ge69dal Date: Wed, 10 Nov 2021 15:41:47 +0100 Subject: [PATCH 79/86] disabled zoom during processing --- displayWindow.cpp | 27 +++------------------------ 1 file changed, 3 insertions(+), 24 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index 1dbff161..9d5908e3 100755 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -62,35 +62,15 @@ DisplayWindow::DisplayWindow(QWidget *parent) : scrollArea = new QScrollArea(this); scrollArea->setWidgetResizable(true); scrollAreaWidgetContents = new BufferFrame(this); - //scrollAreaWidgetContents->setGeometry(QRect(0, 0, 1218, 1218)); scrollArea->setWidget(scrollAreaWidgetContents); verticalLayout->addWidget(scrollArea); - - /*#ifdef Q_OS_WIN32 - #else - // create producer semaphore | set to 0: - if ((sem_pro_id = semget(ftok(FILENAME, 'p'), 1, 0666 | IPC_CREAT)) == -1){ - emit printLog(QString("sem_prod failed (semget)\n"), Qt::red); - } - arg.val = 0; - if (semctl(sem_pro_id, 0, SETVAL, arg) == -1){ - emit printLog(QString("sem_prod failed (semctl)\n"), Qt::red); - } - // create consumer semaphore | set to 1 - if ((sem_con_id = semget(ftok(FILENAME, 'c'), 1, 0666 | IPC_CREAT)) == -1){ - emit printLog(QString("sem_con failed (semget)\n"), Qt::red); - } - arg.val = 1; - if (semctl(sem_con_id, 0, SETVAL, arg) == -1){ - emit printLog(QString("sem_con failed (semctl)\n"), Qt::red); - } - #endif*/ } void DisplayWindow::changeDisplay(int msgid){ loop = true; + zoomComboBox->setEnabled(false); displayPicture = new QImage(512, 512, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); memset(buffer, 0xff, 512*512); @@ -284,9 +264,8 @@ void DisplayWindow::changeDisplay(int msgid){ }*/ #endif qint64 elapsed_time2 = programExecutionTime2.elapsed(); - qint64 ass = elapsed_time2; loop = false; - //zoomComboBox->setEditable(false); + zoomComboBox->setEnabled(true); emit closeDisplay(); } @@ -334,7 +313,7 @@ void DisplayWindow::zoomSettingsChanged(int value){ scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); this->setFixedSize(QSize(res_x+60, res_y+92)); scrollAreaWidgetContents->update(); - } + } } void DisplayWindow::updateDisplay() { From be4157f8305588a2b00a41b169d5b047e960d3e0 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Wed, 10 Nov 2021 15:43:59 +0100 Subject: [PATCH 80/86] disabled zoom during processing --- Linux/share/sasm/Projects/stack_example32.asm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linux/share/sasm/Projects/stack_example32.asm b/Linux/share/sasm/Projects/stack_example32.asm index 0a48fd16..dde44815 100644 --- a/Linux/share/sasm/Projects/stack_example32.asm +++ b/Linux/share/sasm/Projects/stack_example32.asm @@ -14,4 +14,4 @@ CMAIN: ret example_function: - ret \ No newline at end of file + ret From 689e603ab8bee215fb14d0faa485c40fbd234335 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 12 Nov 2021 09:50:09 +0100 Subject: [PATCH 81/86] fixed pause --- Linux/share/sasm/Projects/NASMHello.asm | 1 + debugger.cpp | 34 +++++++++++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/Linux/share/sasm/Projects/NASMHello.asm b/Linux/share/sasm/Projects/NASMHello.asm index 64470b2e..9ea516d1 100644 --- a/Linux/share/sasm/Projects/NASMHello.asm +++ b/Linux/share/sasm/Projects/NASMHello.asm @@ -6,6 +6,7 @@ section .data section .text global CMAIN CMAIN: + mov ebp, esp; for correct debugging PRINT_STRING msg NEWLINE ret \ No newline at end of file diff --git a/debugger.cpp b/debugger.cpp index 377e818e..4e46a181 100755 --- a/debugger.cpp +++ b/debugger.cpp @@ -333,6 +333,23 @@ void Debugger::processMessage(QString output, QString error) if (output.indexOf(interruptSig) != -1) { stopped = true; emit wasStopped(); + QRegExp r = QRegExp("0x[0-9a-fA-F]{8,16}"); + int index = r.indexIn(output); + if(index != -1){ + quint64 lineNumber = output.mid(index, r.matchedLength()).toULongLong(0, 16); + bool found = false; + for (int i = lines.count() - 1; i >= 0; i--) { + if (lineNumber == lines[i].numInMem) { + lineNumber = lines[i].numInCode; + found = true; + break; + } + } + + if (found) { + emit highlightLine(lineNumber); + } + } return; } @@ -783,6 +800,23 @@ void Debugger::processMessageMiMode(QString output, QString error) if (output.indexOf(interruptSig) != -1) { stopped = true; emit wasStopped(); + QRegExp r = QRegExp("addr=\"0x[0-9a-fA-F]{8,16}"); + int index = r.indexIn(output); + if(index != -1){ + quint64 lineNumber = output.mid(index+6, r.matchedLength()-6).toULongLong(0, 16); + bool found = false; + for (int i = lines.count() - 1; i >= 0; i--) { + if (lineNumber == lines[i].numInMem) { + lineNumber = lines[i].numInCode; + found = true; + break; + } + } + + if (found) { + emit highlightLine(lineNumber); + } + } return; } From 8bbb06e53423371eb7b4b6fda2ce1737a9f7a0bb Mon Sep 17 00:00:00 2001 From: Martin Schreiber Date: Fri, 12 Nov 2021 11:10:28 +0100 Subject: [PATCH 82/86] updated "SASM Project" to "SASM" --- codeeditor.cpp | 2 +- debugger.cpp | 6 +++--- highlighter.cpp | 2 +- main.cpp | 2 +- mainwindow.cpp | 2 +- ruqplaintextedit.cpp | 2 +- ruqtextedit.cpp | 2 +- tab.cpp | 4 ++-- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/codeeditor.cpp b/codeeditor.cpp index fd849c85..f08864ba 100644 --- a/codeeditor.cpp +++ b/codeeditor.cpp @@ -48,7 +48,7 @@ CodeEditor::CodeEditor(QWidget *parent, bool withBeakpoints) : RuQPlainTextEdit(parent), debugImage(":/images/debugLine.png"), breakpointImage(":/images/breakpoint.png"), - settings("SASM Project", "SASM") + settings("SASM", "SASM") { hasBreakpoints = withBeakpoints; prevBlockCount = -1; diff --git a/debugger.cpp b/debugger.cpp index 4e46a181..e0e4ed65 100755 --- a/debugger.cpp +++ b/debugger.cpp @@ -85,7 +85,7 @@ Debugger::Debugger(QTextEdit *tEdit, bool Debugger::run() { - QSettings settings("SASM Project", "SASM"); + QSettings settings("SASM", "SASM"); if (settings.value("mode", QString("x86")).toString() == "x86") addressSizeOffset = 4; else @@ -530,7 +530,7 @@ void Debugger::processAction(QString output, QString error) QTextStream registersStream(&output); QList registers; registersInfo info; - QSettings settings("SASM Project", "SASM"); + QSettings settings("SASM", "SASM"); QSet general; QString ip; @@ -1025,7 +1025,7 @@ void Debugger::processActionMiMode(QString output, QString error) QTextStream registersStream(&output); QList registers; registersInfo info; - QSettings settings("SASM Project", "SASM"); + QSettings settings("SASM", "SASM"); QSet general; QString ip; diff --git a/highlighter.cpp b/highlighter.cpp index 9f09a37c..82c8bf05 100644 --- a/highlighter.cpp +++ b/highlighter.cpp @@ -72,7 +72,7 @@ formats << &keywordFormat << ®isterFormat << &numberFormat << &memoryFormat << &labelFormat << &commentFormat << &systemFormat << &iomacrosFormat << "ationFormat; - QSettings settings("SASM Project", "SASM"); + QSettings settings("SASM", "SASM"); for (int i = 0; i < formats.size(); i++) { formats[i]->setForeground(settings.value(names[i] + "color", defaultColors[i]).value()); formats[i]->setBackground(settings.value(names[i] + "colorbg", QPalette().color(QPalette::Base)).value()); diff --git a/main.cpp b/main.cpp index ede09571..f73f2e92 100644 --- a/main.cpp +++ b/main.cpp @@ -67,7 +67,7 @@ int main(int argc, char *argv[]) return 0; } QTranslator translator, qtTranslator; - QSettings settings("SASM Project", "SASM"); + QSettings settings("SASM", "SASM"); #if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0)) QTextCodec *codec = QTextCodec::codecForName("UTF-8"); QTextCodec::setCodecForCStrings(codec); diff --git a/mainwindow.cpp b/mainwindow.cpp index 65542ae3..03dfc641 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -47,7 +47,7 @@ */ MainWindow::MainWindow(const QStringList &args, QWidget *parent) - : QMainWindow(parent), settings("SASM Project", "SASM") + : QMainWindow(parent), settings("SASM", "SASM") { setWindowTitle("SASM"); setWindowIcon(QIcon(":images/mainIcon.png")); diff --git a/ruqplaintextedit.cpp b/ruqplaintextedit.cpp index e8ab5621..715eb855 100644 --- a/ruqplaintextedit.cpp +++ b/ruqplaintextedit.cpp @@ -48,7 +48,7 @@ RuQPlainTextEdit::RuQPlainTextEdit(QWidget *parent) : QPlainTextEdit(parent) { - QSettings settings("SASM Project", "SASM"); + QSettings settings("SASM", "SASM"); QPalette palette = this->palette(); palette.setColor(QPalette::Base, settings.value("backgroundcolor", palette.color(QPalette::Base)).value()); palette.setColor(QPalette::Text, settings.value("fontcolor", palette.color(QPalette::Text)).value()); diff --git a/ruqtextedit.cpp b/ruqtextedit.cpp index a0b9b934..4eacb643 100644 --- a/ruqtextedit.cpp +++ b/ruqtextedit.cpp @@ -49,7 +49,7 @@ RuQTextEdit::RuQTextEdit(QWidget *parent) : QTextEdit(parent) { setAcceptRichText(false); - QSettings settings("SASM Project", "SASM"); + QSettings settings("SASM", "SASM"); QPalette palette = this->palette(); palette.setColor(QPalette::Base, settings.value("backgroundcolor", palette.color(QPalette::Base)).value()); palette.setColor(QPalette::Text, settings.value("fontcolor", palette.color(QPalette::Text)).value()); diff --git a/tab.cpp b/tab.cpp index 47ae700a..f0852efb 100644 --- a/tab.cpp +++ b/tab.cpp @@ -86,7 +86,7 @@ Tab::Tab(QWidget *parent) : setFonts(); //! Restore state - QSettings settings("SASM Project", "SASM"); + QSettings settings("SASM", "SASM"); restoreGeometry(settings.value("tabgeometry").toByteArray()); restoreState(settings.value("tabwindowstate").toByteArray()); } @@ -97,7 +97,7 @@ Tab::Tab(QWidget *parent) : */ void Tab::setFonts() { - QSettings settings("SASM Project", "SASM"); + QSettings settings("SASM", "SASM"); QFont codeFont; codeFont.setPointSize(settings.value("fontsize", 12).toInt()); From ccc83994c64a85206d7013e227c866280052de6b Mon Sep 17 00:00:00 2001 From: Martin Schreiber Date: Fri, 12 Nov 2021 11:14:31 +0100 Subject: [PATCH 83/86] removed ui_settings.h --- .gitignore | 1 + ui_settings.h | 1406 ------------------------------------------------- 2 files changed, 1 insertion(+), 1406 deletions(-) delete mode 100755 ui_settings.h diff --git a/.gitignore b/.gitignore index 157e7e91..5dd94c60 100644 --- a/.gitignore +++ b/.gitignore @@ -20,6 +20,7 @@ Thumbs.db doc/* .qmake.stash sasm.app +ui_settings.h *.swp *.o diff --git a/ui_settings.h b/ui_settings.h deleted file mode 100755 index 16c7c4c6..00000000 --- a/ui_settings.h +++ /dev/null @@ -1,1406 +0,0 @@ -/******************************************************************************** -** Form generated from reading UI file 'settings.ui' -** -** Created by: Qt User Interface Compiler version 5.12.8 -** -** WARNING! All changes made in this file will be lost when recompiling UI file! -********************************************************************************/ - -#ifndef UI_SETTINGS_H -#define UI_SETTINGS_H - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -QT_BEGIN_NAMESPACE - -class Ui_SettingsWindow -{ -public: - QVBoxLayout *verticalLayout; - QLabel *settingsLabel; - QTabWidget *tabWidget; - QWidget *commonTab; - QVBoxLayout *verticalLayout_4; - QGroupBox *commonSettingsBox; - QVBoxLayout *verticalLayout_3; - QHBoxLayout *horizontalLayout_2; - QLabel *startWindowLabel; - QComboBox *startWindow; - QSpacerItem *horizontalSpacer_2; - QHBoxLayout *horizontalLayout_4; - QLabel *languageLabel; - QComboBox *language; - QSpacerItem *horizontalSpacer_4; - QLabel *label_4; - QHBoxLayout *horizontalLayout_8; - QLabel *registersLabel_2; - QRadioButton *registersYesRadioButton; - QRadioButton *registersNoRadioButton; - QSpacerItem *horizontalSpacer_9; - QHBoxLayout *horizontalLayout_7; - QLabel *insertDebugStringLabel; - QCheckBox *insertDebugStringCheckBox; - QSpacerItem *horizontalSpacer_10; - QGroupBox *codeSettingsBox; - QVBoxLayout *verticalLayout_2; - QHBoxLayout *horizontalLayout_5; - QLabel *fontLabel; - QFontComboBox *fontComboBox; - QLabel *fontSizeLabel; - QSpinBox *fontSizeSpinBox; - QSpacerItem *horizontalSpacer_5; - QLabel *label; - QLabel *label_2; - QWidget *startTextWidget; - QSpacerItem *verticalSpacer_5; - QHBoxLayout *horizontalLayout; - QToolButton *resetAllButton; - QSpacerItem *horizontalSpacer_3; - QSpacerItem *verticalSpacer; - QWidget *colorsTab; - QGridLayout *gridLayout; - QGroupBox *groupBox; - QGridLayout *gridLayout_2; - QCheckBox *iomacroBoldCheckBox; - QLabel *systemLabel; - QPushButton *quotationColorButton; - QPushButton *systemColorButton; - QCheckBox *numbersItalicCheckBox; - QLabel *label_6; - QCheckBox *numbersBoldCheckBox; - QLabel *label_7; - QLabel *label_3; - QCheckBox *systemItalicCheckBox; - QPushButton *commentsColorButton_2; - QPushButton *keywordsColorButton; - QCheckBox *commentsBoldCheckBox; - QPushButton *keywordsColorButton_2; - QPushButton *iomacroColorButton_2; - QCheckBox *memoryItalicCheckBox; - QLabel *keywordsLabel; - QLabel *label_5; - QPushButton *labelsColorButton; - QLabel *numbersLabel; - QPushButton *quotationColorButton_2; - QLabel *labelsLabel; - QLabel *commentsLabel; - QPushButton *memoryColorButton; - QPushButton *systemColorButton_2; - QLabel *iomacroLabel_2; - QPushButton *labelsColorButton_2; - QCheckBox *registersBoldCheckBox; - QCheckBox *quotationBoldCheckBox; - QPushButton *iomacroColorButton; - QCheckBox *iomacroItalicCheckBox; - QPushButton *registersColorButton_2; - QCheckBox *keywordsBoldCheckBox; - QCheckBox *memoryBoldCheckBox; - QPushButton *numbersColorButton; - QCheckBox *quotationItalicCheckBox; - QPushButton *commentsColorButton; - QCheckBox *labelsItalicCheckBox; - QLabel *memoryLabel; - QLabel *iomacroLabel; - QCheckBox *keywordsItalicCheckBox; - QSpacerItem *verticalSpacer_3; - QLabel *registersLabel; - QCheckBox *commentsItalicCheckBox; - QCheckBox *labelsBoldCheckBox; - QCheckBox *registersItalicCheckBox; - QCheckBox *systemBoldCheckBox; - QPushButton *memoryColorButton_2; - QPushButton *registersColorButton; - QPushButton *numbersColorButton_2; - QSpacerItem *horizontalSpacer_7; - QGroupBox *groupBox_2; - QVBoxLayout *verticalLayout_5; - QGridLayout *gridLayout_4; - QLabel *fontLabel_2; - QPushButton *fontColorButton; - QCheckBox *currentLineCheckBox; - QPushButton *debugLineColorButton; - QLabel *currentLineLabel; - QLabel *debugLineLabel; - QPushButton *currentLineColorButton; - QLabel *backgroundLabel; - QPushButton *backgroundColorButton; - QLabel *lineNumberPanelLabel; - QPushButton *lineNumberPanelColorButton; - QLabel *lineNumberFontLabel; - QPushButton *lineNumberFontColorButton; - QLabel *label_8; - QSpacerItem *horizontalSpacer_6; - QSpacerItem *verticalSpacer_4; - QWidget *buildTab; - QVBoxLayout *verticalLayout_6; - QFormLayout *formLayout; - QLabel *modeLabel; - QHBoxLayout *horizontalLayout_3; - QRadioButton *x86RadioButton; - QRadioButton *x64RadioButton; - QSpacerItem *horizontalSpacer; - QLabel *assemblerLabel; - QHBoxLayout *horizontalLayout_6; - QRadioButton *nasmRadioButton; - QRadioButton *gasRadioButton; - QRadioButton *fasmRadioButton; - QRadioButton *masmRadioButton; - QSpacerItem *horizontalSpacer_8; - QLabel *assemblyLabel; - QLineEdit *assemblyOptionsEdit; - QLabel *linkingLabel; - QLineEdit *linkingOptionsEdit; - QLabel *assemblerPathLabel; - QLineEdit *assemblerPathEdit; - QLabel *linkerPathLabel; - QLineEdit *linkerPathEdit; - QLabel *objectFileNameLabel; - QLineEdit *objectFileNameEdit; - QLabel *gdbPathLabel; - QLineEdit *gdbPathEdit; - QLabel *assemblerWorkingDirectoryLabel; - QCheckBox *runInCurrentDirectoryCheckbox; - QLabel *disableLinkingLabel; - QCheckBox *disableLinkingCheckbox; - QLabel *gdbVerboseLabel; - QCheckBox *sasmVerboseCheckBox; - QLabel *MiModusLabel; - QCheckBox *MiModusCheckBox; - QLabel *gdbDisplayLabel; - QCheckBox *sasmDisplayCheckBox; - QLabel *infoLabel; - QDialogButtonBox *buttonBox; - QButtonGroup *buttonGroup; - QButtonGroup *buttonGroup_2; - QButtonGroup *buttonGroup_3; - - void setupUi(QWidget *SettingsWindow) - { - if (SettingsWindow->objectName().isEmpty()) - SettingsWindow->setObjectName(QString::fromUtf8("SettingsWindow")); - SettingsWindow->resize(1702, 971); - verticalLayout = new QVBoxLayout(SettingsWindow); - verticalLayout->setObjectName(QString::fromUtf8("verticalLayout")); - settingsLabel = new QLabel(SettingsWindow); - settingsLabel->setObjectName(QString::fromUtf8("settingsLabel")); - QSizePolicy sizePolicy(QSizePolicy::Preferred, QSizePolicy::Fixed); - sizePolicy.setHorizontalStretch(0); - sizePolicy.setVerticalStretch(0); - sizePolicy.setHeightForWidth(settingsLabel->sizePolicy().hasHeightForWidth()); - settingsLabel->setSizePolicy(sizePolicy); - QFont font; - font.setPointSize(16); - settingsLabel->setFont(font); - settingsLabel->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout->addWidget(settingsLabel); - - tabWidget = new QTabWidget(SettingsWindow); - tabWidget->setObjectName(QString::fromUtf8("tabWidget")); - tabWidget->setLayoutDirection(Qt::LeftToRight); - tabWidget->setElideMode(Qt::ElideNone); - commonTab = new QWidget(); - commonTab->setObjectName(QString::fromUtf8("commonTab")); - verticalLayout_4 = new QVBoxLayout(commonTab); - verticalLayout_4->setObjectName(QString::fromUtf8("verticalLayout_4")); - commonSettingsBox = new QGroupBox(commonTab); - commonSettingsBox->setObjectName(QString::fromUtf8("commonSettingsBox")); - sizePolicy.setHeightForWidth(commonSettingsBox->sizePolicy().hasHeightForWidth()); - commonSettingsBox->setSizePolicy(sizePolicy); - commonSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - verticalLayout_3 = new QVBoxLayout(commonSettingsBox); - verticalLayout_3->setObjectName(QString::fromUtf8("verticalLayout_3")); - horizontalLayout_2 = new QHBoxLayout(); - horizontalLayout_2->setObjectName(QString::fromUtf8("horizontalLayout_2")); - startWindowLabel = new QLabel(commonSettingsBox); - startWindowLabel->setObjectName(QString::fromUtf8("startWindowLabel")); - QSizePolicy sizePolicy1(QSizePolicy::Fixed, QSizePolicy::Fixed); - sizePolicy1.setHorizontalStretch(0); - sizePolicy1.setVerticalStretch(0); - sizePolicy1.setHeightForWidth(startWindowLabel->sizePolicy().hasHeightForWidth()); - startWindowLabel->setSizePolicy(sizePolicy1); - - horizontalLayout_2->addWidget(startWindowLabel); - - startWindow = new QComboBox(commonSettingsBox); - startWindow->addItem(QString()); - startWindow->addItem(QString()); - startWindow->setObjectName(QString::fromUtf8("startWindow")); - QSizePolicy sizePolicy2(QSizePolicy::Minimum, QSizePolicy::Fixed); - sizePolicy2.setHorizontalStretch(0); - sizePolicy2.setVerticalStretch(0); - sizePolicy2.setHeightForWidth(startWindow->sizePolicy().hasHeightForWidth()); - startWindow->setSizePolicy(sizePolicy2); - startWindow->setMinimumSize(QSize(266, 0)); - - horizontalLayout_2->addWidget(startWindow); - - horizontalSpacer_2 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_2->addItem(horizontalSpacer_2); - - - verticalLayout_3->addLayout(horizontalLayout_2); - - horizontalLayout_4 = new QHBoxLayout(); - horizontalLayout_4->setObjectName(QString::fromUtf8("horizontalLayout_4")); - languageLabel = new QLabel(commonSettingsBox); - languageLabel->setObjectName(QString::fromUtf8("languageLabel")); - - horizontalLayout_4->addWidget(languageLabel); - - language = new QComboBox(commonSettingsBox); - language->addItem(QString::fromUtf8("\320\240\321\203\321\201\321\201\320\272\320\270\320\271")); - language->addItem(QString::fromUtf8("English")); - language->addItem(QString::fromUtf8("T\303\274rk")); - language->addItem(QString::fromUtf8("\344\270\255\345\233\275")); - language->addItem(QString::fromUtf8("Deutsch")); - language->addItem(QString::fromUtf8("Italiano")); - language->addItem(QString::fromUtf8("Polski")); - language->addItem(QString::fromUtf8("\327\242\327\221\327\250\327\231\327\252")); - language->addItem(QString::fromUtf8("Espa\303\261ol")); - language->addItem(QString::fromUtf8("Portugu\303\252s")); - language->setObjectName(QString::fromUtf8("language")); - - horizontalLayout_4->addWidget(language); - - horizontalSpacer_4 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_4->addItem(horizontalSpacer_4); - - - verticalLayout_3->addLayout(horizontalLayout_4); - - label_4 = new QLabel(commonSettingsBox); - label_4->setObjectName(QString::fromUtf8("label_4")); - - verticalLayout_3->addWidget(label_4); - - horizontalLayout_8 = new QHBoxLayout(); - horizontalLayout_8->setObjectName(QString::fromUtf8("horizontalLayout_8")); - registersLabel_2 = new QLabel(commonSettingsBox); - registersLabel_2->setObjectName(QString::fromUtf8("registersLabel_2")); - - horizontalLayout_8->addWidget(registersLabel_2); - - registersYesRadioButton = new QRadioButton(commonSettingsBox); - buttonGroup_3 = new QButtonGroup(SettingsWindow); - buttonGroup_3->setObjectName(QString::fromUtf8("buttonGroup_3")); - buttonGroup_3->addButton(registersYesRadioButton); - registersYesRadioButton->setObjectName(QString::fromUtf8("registersYesRadioButton")); - registersYesRadioButton->setChecked(false); - - horizontalLayout_8->addWidget(registersYesRadioButton); - - registersNoRadioButton = new QRadioButton(commonSettingsBox); - buttonGroup_3->addButton(registersNoRadioButton); - registersNoRadioButton->setObjectName(QString::fromUtf8("registersNoRadioButton")); - registersNoRadioButton->setChecked(true); - - horizontalLayout_8->addWidget(registersNoRadioButton); - - horizontalSpacer_9 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_8->addItem(horizontalSpacer_9); - - - verticalLayout_3->addLayout(horizontalLayout_8); - - horizontalLayout_7 = new QHBoxLayout(); - horizontalLayout_7->setObjectName(QString::fromUtf8("horizontalLayout_7")); - insertDebugStringLabel = new QLabel(commonSettingsBox); - insertDebugStringLabel->setObjectName(QString::fromUtf8("insertDebugStringLabel")); - - horizontalLayout_7->addWidget(insertDebugStringLabel); - - insertDebugStringCheckBox = new QCheckBox(commonSettingsBox); - insertDebugStringCheckBox->setObjectName(QString::fromUtf8("insertDebugStringCheckBox")); - insertDebugStringCheckBox->setChecked(true); - - horizontalLayout_7->addWidget(insertDebugStringCheckBox); - - horizontalSpacer_10 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_7->addItem(horizontalSpacer_10); - - - verticalLayout_3->addLayout(horizontalLayout_7); - - - verticalLayout_4->addWidget(commonSettingsBox); - - codeSettingsBox = new QGroupBox(commonTab); - codeSettingsBox->setObjectName(QString::fromUtf8("codeSettingsBox")); - sizePolicy.setHeightForWidth(codeSettingsBox->sizePolicy().hasHeightForWidth()); - codeSettingsBox->setSizePolicy(sizePolicy); - codeSettingsBox->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - verticalLayout_2 = new QVBoxLayout(codeSettingsBox); - verticalLayout_2->setObjectName(QString::fromUtf8("verticalLayout_2")); - horizontalLayout_5 = new QHBoxLayout(); - horizontalLayout_5->setObjectName(QString::fromUtf8("horizontalLayout_5")); - fontLabel = new QLabel(codeSettingsBox); - fontLabel->setObjectName(QString::fromUtf8("fontLabel")); - - horizontalLayout_5->addWidget(fontLabel); - - fontComboBox = new QFontComboBox(codeSettingsBox); - fontComboBox->setObjectName(QString::fromUtf8("fontComboBox")); - fontComboBox->setWritingSystem(QFontDatabase::Latin); - fontComboBox->setFontFilters(QFontComboBox::AllFonts); - QFont font1; - font1.setFamily(QString::fromUtf8("Arial")); - font1.setPointSize(12); - fontComboBox->setCurrentFont(font1); - - horizontalLayout_5->addWidget(fontComboBox); - - fontSizeLabel = new QLabel(codeSettingsBox); - fontSizeLabel->setObjectName(QString::fromUtf8("fontSizeLabel")); - - horizontalLayout_5->addWidget(fontSizeLabel); - - fontSizeSpinBox = new QSpinBox(codeSettingsBox); - fontSizeSpinBox->setObjectName(QString::fromUtf8("fontSizeSpinBox")); - fontSizeSpinBox->setMinimum(5); - fontSizeSpinBox->setMaximum(72); - fontSizeSpinBox->setValue(12); - - horizontalLayout_5->addWidget(fontSizeSpinBox); - - horizontalSpacer_5 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_5->addItem(horizontalSpacer_5); - - - verticalLayout_2->addLayout(horizontalLayout_5); - - label = new QLabel(codeSettingsBox); - label->setObjectName(QString::fromUtf8("label")); - label->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout_2->addWidget(label); - - label_2 = new QLabel(codeSettingsBox); - label_2->setObjectName(QString::fromUtf8("label_2")); - label_2->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout_2->addWidget(label_2); - - startTextWidget = new QWidget(codeSettingsBox); - startTextWidget->setObjectName(QString::fromUtf8("startTextWidget")); - - verticalLayout_2->addWidget(startTextWidget); - - verticalSpacer_5 = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_2->addItem(verticalSpacer_5); - - - verticalLayout_4->addWidget(codeSettingsBox); - - horizontalLayout = new QHBoxLayout(); - horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout")); - resetAllButton = new QToolButton(commonTab); - resetAllButton->setObjectName(QString::fromUtf8("resetAllButton")); - resetAllButton->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - horizontalLayout->addWidget(resetAllButton); - - horizontalSpacer_3 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout->addItem(horizontalSpacer_3); - - - verticalLayout_4->addLayout(horizontalLayout); - - verticalSpacer = new QSpacerItem(20, 0, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_4->addItem(verticalSpacer); - - tabWidget->addTab(commonTab, QString()); - colorsTab = new QWidget(); - colorsTab->setObjectName(QString::fromUtf8("colorsTab")); - gridLayout = new QGridLayout(colorsTab); - gridLayout->setObjectName(QString::fromUtf8("gridLayout")); - groupBox = new QGroupBox(colorsTab); - groupBox->setObjectName(QString::fromUtf8("groupBox")); - gridLayout_2 = new QGridLayout(groupBox); - gridLayout_2->setObjectName(QString::fromUtf8("gridLayout_2")); - iomacroBoldCheckBox = new QCheckBox(groupBox); - iomacroBoldCheckBox->setObjectName(QString::fromUtf8("iomacroBoldCheckBox")); - QSizePolicy sizePolicy3(QSizePolicy::Minimum, QSizePolicy::Minimum); - sizePolicy3.setHorizontalStretch(0); - sizePolicy3.setVerticalStretch(0); - sizePolicy3.setHeightForWidth(iomacroBoldCheckBox->sizePolicy().hasHeightForWidth()); - iomacroBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(iomacroBoldCheckBox, 8, 3, 1, 1); - - systemLabel = new QLabel(groupBox); - systemLabel->setObjectName(QString::fromUtf8("systemLabel")); - - gridLayout_2->addWidget(systemLabel, 7, 0, 1, 1); - - quotationColorButton = new QPushButton(groupBox); - quotationColorButton->setObjectName(QString::fromUtf8("quotationColorButton")); - sizePolicy1.setHeightForWidth(quotationColorButton->sizePolicy().hasHeightForWidth()); - quotationColorButton->setSizePolicy(sizePolicy1); - quotationColorButton->setMinimumSize(QSize(23, 23)); - quotationColorButton->setMaximumSize(QSize(23, 23)); - quotationColorButton->setBaseSize(QSize(0, 0)); - quotationColorButton->setFocusPolicy(Qt::NoFocus); - quotationColorButton->setAutoDefault(false); - quotationColorButton->setFlat(false); - - gridLayout_2->addWidget(quotationColorButton, 9, 1, 1, 1); - - systemColorButton = new QPushButton(groupBox); - systemColorButton->setObjectName(QString::fromUtf8("systemColorButton")); - sizePolicy1.setHeightForWidth(systemColorButton->sizePolicy().hasHeightForWidth()); - systemColorButton->setSizePolicy(sizePolicy1); - systemColorButton->setMinimumSize(QSize(23, 23)); - systemColorButton->setMaximumSize(QSize(23, 23)); - systemColorButton->setBaseSize(QSize(0, 0)); - systemColorButton->setFocusPolicy(Qt::NoFocus); - systemColorButton->setAutoDefault(false); - systemColorButton->setFlat(false); - - gridLayout_2->addWidget(systemColorButton, 7, 1, 1, 1); - - numbersItalicCheckBox = new QCheckBox(groupBox); - numbersItalicCheckBox->setObjectName(QString::fromUtf8("numbersItalicCheckBox")); - sizePolicy3.setHeightForWidth(numbersItalicCheckBox->sizePolicy().hasHeightForWidth()); - numbersItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(numbersItalicCheckBox, 3, 4, 1, 1); - - label_6 = new QLabel(groupBox); - label_6->setObjectName(QString::fromUtf8("label_6")); - - gridLayout_2->addWidget(label_6, 0, 3, 1, 1); - - numbersBoldCheckBox = new QCheckBox(groupBox); - numbersBoldCheckBox->setObjectName(QString::fromUtf8("numbersBoldCheckBox")); - sizePolicy3.setHeightForWidth(numbersBoldCheckBox->sizePolicy().hasHeightForWidth()); - numbersBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(numbersBoldCheckBox, 3, 3, 1, 1); - - label_7 = new QLabel(groupBox); - label_7->setObjectName(QString::fromUtf8("label_7")); - - gridLayout_2->addWidget(label_7, 0, 4, 1, 1); - - label_3 = new QLabel(groupBox); - label_3->setObjectName(QString::fromUtf8("label_3")); - - gridLayout_2->addWidget(label_3, 0, 1, 1, 1); - - systemItalicCheckBox = new QCheckBox(groupBox); - systemItalicCheckBox->setObjectName(QString::fromUtf8("systemItalicCheckBox")); - sizePolicy3.setHeightForWidth(systemItalicCheckBox->sizePolicy().hasHeightForWidth()); - systemItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(systemItalicCheckBox, 7, 4, 1, 1); - - commentsColorButton_2 = new QPushButton(groupBox); - commentsColorButton_2->setObjectName(QString::fromUtf8("commentsColorButton_2")); - sizePolicy1.setHeightForWidth(commentsColorButton_2->sizePolicy().hasHeightForWidth()); - commentsColorButton_2->setSizePolicy(sizePolicy1); - commentsColorButton_2->setMinimumSize(QSize(23, 23)); - commentsColorButton_2->setMaximumSize(QSize(23, 23)); - commentsColorButton_2->setBaseSize(QSize(0, 0)); - commentsColorButton_2->setFocusPolicy(Qt::NoFocus); - commentsColorButton_2->setAutoDefault(false); - commentsColorButton_2->setFlat(false); - - gridLayout_2->addWidget(commentsColorButton_2, 6, 2, 1, 1); - - keywordsColorButton = new QPushButton(groupBox); - keywordsColorButton->setObjectName(QString::fromUtf8("keywordsColorButton")); - sizePolicy1.setHeightForWidth(keywordsColorButton->sizePolicy().hasHeightForWidth()); - keywordsColorButton->setSizePolicy(sizePolicy1); - keywordsColorButton->setMinimumSize(QSize(23, 23)); - keywordsColorButton->setMaximumSize(QSize(23, 23)); - keywordsColorButton->setBaseSize(QSize(0, 0)); - keywordsColorButton->setFocusPolicy(Qt::NoFocus); - keywordsColorButton->setAutoDefault(false); - keywordsColorButton->setFlat(false); - - gridLayout_2->addWidget(keywordsColorButton, 1, 1, 1, 1); - - commentsBoldCheckBox = new QCheckBox(groupBox); - commentsBoldCheckBox->setObjectName(QString::fromUtf8("commentsBoldCheckBox")); - sizePolicy3.setHeightForWidth(commentsBoldCheckBox->sizePolicy().hasHeightForWidth()); - commentsBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(commentsBoldCheckBox, 6, 3, 1, 1); - - keywordsColorButton_2 = new QPushButton(groupBox); - keywordsColorButton_2->setObjectName(QString::fromUtf8("keywordsColorButton_2")); - sizePolicy1.setHeightForWidth(keywordsColorButton_2->sizePolicy().hasHeightForWidth()); - keywordsColorButton_2->setSizePolicy(sizePolicy1); - keywordsColorButton_2->setMinimumSize(QSize(23, 23)); - keywordsColorButton_2->setMaximumSize(QSize(23, 23)); - keywordsColorButton_2->setBaseSize(QSize(0, 0)); - keywordsColorButton_2->setFocusPolicy(Qt::NoFocus); - keywordsColorButton_2->setAutoDefault(false); - keywordsColorButton_2->setFlat(false); - - gridLayout_2->addWidget(keywordsColorButton_2, 1, 2, 1, 1); - - iomacroColorButton_2 = new QPushButton(groupBox); - iomacroColorButton_2->setObjectName(QString::fromUtf8("iomacroColorButton_2")); - sizePolicy1.setHeightForWidth(iomacroColorButton_2->sizePolicy().hasHeightForWidth()); - iomacroColorButton_2->setSizePolicy(sizePolicy1); - iomacroColorButton_2->setMinimumSize(QSize(23, 23)); - iomacroColorButton_2->setMaximumSize(QSize(23, 23)); - iomacroColorButton_2->setBaseSize(QSize(0, 0)); - iomacroColorButton_2->setFocusPolicy(Qt::NoFocus); - iomacroColorButton_2->setAutoDefault(false); - iomacroColorButton_2->setFlat(false); - - gridLayout_2->addWidget(iomacroColorButton_2, 8, 2, 1, 1); - - memoryItalicCheckBox = new QCheckBox(groupBox); - memoryItalicCheckBox->setObjectName(QString::fromUtf8("memoryItalicCheckBox")); - sizePolicy3.setHeightForWidth(memoryItalicCheckBox->sizePolicy().hasHeightForWidth()); - memoryItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(memoryItalicCheckBox, 4, 4, 1, 1); - - keywordsLabel = new QLabel(groupBox); - keywordsLabel->setObjectName(QString::fromUtf8("keywordsLabel")); - - gridLayout_2->addWidget(keywordsLabel, 1, 0, 1, 1); - - label_5 = new QLabel(groupBox); - label_5->setObjectName(QString::fromUtf8("label_5")); - - gridLayout_2->addWidget(label_5, 0, 2, 1, 1); - - labelsColorButton = new QPushButton(groupBox); - labelsColorButton->setObjectName(QString::fromUtf8("labelsColorButton")); - sizePolicy1.setHeightForWidth(labelsColorButton->sizePolicy().hasHeightForWidth()); - labelsColorButton->setSizePolicy(sizePolicy1); - labelsColorButton->setMinimumSize(QSize(23, 23)); - labelsColorButton->setMaximumSize(QSize(23, 23)); - labelsColorButton->setBaseSize(QSize(0, 0)); - labelsColorButton->setFocusPolicy(Qt::NoFocus); - labelsColorButton->setAutoDefault(false); - labelsColorButton->setFlat(false); - - gridLayout_2->addWidget(labelsColorButton, 5, 1, 1, 1); - - numbersLabel = new QLabel(groupBox); - numbersLabel->setObjectName(QString::fromUtf8("numbersLabel")); - - gridLayout_2->addWidget(numbersLabel, 3, 0, 1, 1); - - quotationColorButton_2 = new QPushButton(groupBox); - quotationColorButton_2->setObjectName(QString::fromUtf8("quotationColorButton_2")); - sizePolicy1.setHeightForWidth(quotationColorButton_2->sizePolicy().hasHeightForWidth()); - quotationColorButton_2->setSizePolicy(sizePolicy1); - quotationColorButton_2->setMinimumSize(QSize(23, 23)); - quotationColorButton_2->setMaximumSize(QSize(23, 23)); - quotationColorButton_2->setBaseSize(QSize(0, 0)); - quotationColorButton_2->setFocusPolicy(Qt::NoFocus); - quotationColorButton_2->setAutoDefault(false); - quotationColorButton_2->setFlat(false); - - gridLayout_2->addWidget(quotationColorButton_2, 9, 2, 1, 1); - - labelsLabel = new QLabel(groupBox); - labelsLabel->setObjectName(QString::fromUtf8("labelsLabel")); - - gridLayout_2->addWidget(labelsLabel, 5, 0, 1, 1); - - commentsLabel = new QLabel(groupBox); - commentsLabel->setObjectName(QString::fromUtf8("commentsLabel")); - - gridLayout_2->addWidget(commentsLabel, 6, 0, 1, 1); - - memoryColorButton = new QPushButton(groupBox); - memoryColorButton->setObjectName(QString::fromUtf8("memoryColorButton")); - sizePolicy1.setHeightForWidth(memoryColorButton->sizePolicy().hasHeightForWidth()); - memoryColorButton->setSizePolicy(sizePolicy1); - memoryColorButton->setMinimumSize(QSize(23, 23)); - memoryColorButton->setMaximumSize(QSize(23, 23)); - memoryColorButton->setBaseSize(QSize(0, 0)); - memoryColorButton->setFocusPolicy(Qt::NoFocus); - memoryColorButton->setAutoDefault(false); - memoryColorButton->setFlat(false); - - gridLayout_2->addWidget(memoryColorButton, 4, 1, 1, 1); - - systemColorButton_2 = new QPushButton(groupBox); - systemColorButton_2->setObjectName(QString::fromUtf8("systemColorButton_2")); - sizePolicy1.setHeightForWidth(systemColorButton_2->sizePolicy().hasHeightForWidth()); - systemColorButton_2->setSizePolicy(sizePolicy1); - systemColorButton_2->setMinimumSize(QSize(23, 23)); - systemColorButton_2->setMaximumSize(QSize(23, 23)); - systemColorButton_2->setBaseSize(QSize(0, 0)); - systemColorButton_2->setFocusPolicy(Qt::NoFocus); - systemColorButton_2->setAutoDefault(false); - systemColorButton_2->setFlat(false); - - gridLayout_2->addWidget(systemColorButton_2, 7, 2, 1, 1); - - iomacroLabel_2 = new QLabel(groupBox); - iomacroLabel_2->setObjectName(QString::fromUtf8("iomacroLabel_2")); - - gridLayout_2->addWidget(iomacroLabel_2, 9, 0, 1, 1); - - labelsColorButton_2 = new QPushButton(groupBox); - labelsColorButton_2->setObjectName(QString::fromUtf8("labelsColorButton_2")); - sizePolicy1.setHeightForWidth(labelsColorButton_2->sizePolicy().hasHeightForWidth()); - labelsColorButton_2->setSizePolicy(sizePolicy1); - labelsColorButton_2->setMinimumSize(QSize(23, 23)); - labelsColorButton_2->setMaximumSize(QSize(23, 23)); - labelsColorButton_2->setBaseSize(QSize(0, 0)); - labelsColorButton_2->setFocusPolicy(Qt::NoFocus); - labelsColorButton_2->setAutoDefault(false); - labelsColorButton_2->setFlat(false); - - gridLayout_2->addWidget(labelsColorButton_2, 5, 2, 1, 1); - - registersBoldCheckBox = new QCheckBox(groupBox); - registersBoldCheckBox->setObjectName(QString::fromUtf8("registersBoldCheckBox")); - sizePolicy3.setHeightForWidth(registersBoldCheckBox->sizePolicy().hasHeightForWidth()); - registersBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(registersBoldCheckBox, 2, 3, 1, 1); - - quotationBoldCheckBox = new QCheckBox(groupBox); - quotationBoldCheckBox->setObjectName(QString::fromUtf8("quotationBoldCheckBox")); - sizePolicy3.setHeightForWidth(quotationBoldCheckBox->sizePolicy().hasHeightForWidth()); - quotationBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(quotationBoldCheckBox, 9, 3, 1, 1); - - iomacroColorButton = new QPushButton(groupBox); - iomacroColorButton->setObjectName(QString::fromUtf8("iomacroColorButton")); - sizePolicy1.setHeightForWidth(iomacroColorButton->sizePolicy().hasHeightForWidth()); - iomacroColorButton->setSizePolicy(sizePolicy1); - iomacroColorButton->setMinimumSize(QSize(23, 23)); - iomacroColorButton->setMaximumSize(QSize(23, 23)); - iomacroColorButton->setBaseSize(QSize(0, 0)); - iomacroColorButton->setFocusPolicy(Qt::NoFocus); - iomacroColorButton->setAutoDefault(false); - iomacroColorButton->setFlat(false); - - gridLayout_2->addWidget(iomacroColorButton, 8, 1, 1, 1); - - iomacroItalicCheckBox = new QCheckBox(groupBox); - iomacroItalicCheckBox->setObjectName(QString::fromUtf8("iomacroItalicCheckBox")); - sizePolicy3.setHeightForWidth(iomacroItalicCheckBox->sizePolicy().hasHeightForWidth()); - iomacroItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(iomacroItalicCheckBox, 8, 4, 1, 1); - - registersColorButton_2 = new QPushButton(groupBox); - registersColorButton_2->setObjectName(QString::fromUtf8("registersColorButton_2")); - sizePolicy1.setHeightForWidth(registersColorButton_2->sizePolicy().hasHeightForWidth()); - registersColorButton_2->setSizePolicy(sizePolicy1); - registersColorButton_2->setMinimumSize(QSize(23, 23)); - registersColorButton_2->setMaximumSize(QSize(23, 23)); - registersColorButton_2->setBaseSize(QSize(0, 0)); - registersColorButton_2->setFocusPolicy(Qt::NoFocus); - registersColorButton_2->setAutoDefault(false); - registersColorButton_2->setFlat(false); - - gridLayout_2->addWidget(registersColorButton_2, 2, 2, 1, 1); - - keywordsBoldCheckBox = new QCheckBox(groupBox); - keywordsBoldCheckBox->setObjectName(QString::fromUtf8("keywordsBoldCheckBox")); - sizePolicy3.setHeightForWidth(keywordsBoldCheckBox->sizePolicy().hasHeightForWidth()); - keywordsBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(keywordsBoldCheckBox, 1, 3, 1, 1); - - memoryBoldCheckBox = new QCheckBox(groupBox); - memoryBoldCheckBox->setObjectName(QString::fromUtf8("memoryBoldCheckBox")); - sizePolicy3.setHeightForWidth(memoryBoldCheckBox->sizePolicy().hasHeightForWidth()); - memoryBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(memoryBoldCheckBox, 4, 3, 1, 1); - - numbersColorButton = new QPushButton(groupBox); - numbersColorButton->setObjectName(QString::fromUtf8("numbersColorButton")); - sizePolicy1.setHeightForWidth(numbersColorButton->sizePolicy().hasHeightForWidth()); - numbersColorButton->setSizePolicy(sizePolicy1); - numbersColorButton->setMinimumSize(QSize(23, 23)); - numbersColorButton->setMaximumSize(QSize(23, 23)); - numbersColorButton->setBaseSize(QSize(0, 0)); - numbersColorButton->setFocusPolicy(Qt::NoFocus); - numbersColorButton->setAutoDefault(false); - numbersColorButton->setFlat(false); - - gridLayout_2->addWidget(numbersColorButton, 3, 1, 1, 1); - - quotationItalicCheckBox = new QCheckBox(groupBox); - quotationItalicCheckBox->setObjectName(QString::fromUtf8("quotationItalicCheckBox")); - sizePolicy3.setHeightForWidth(quotationItalicCheckBox->sizePolicy().hasHeightForWidth()); - quotationItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(quotationItalicCheckBox, 9, 4, 1, 1); - - commentsColorButton = new QPushButton(groupBox); - commentsColorButton->setObjectName(QString::fromUtf8("commentsColorButton")); - sizePolicy1.setHeightForWidth(commentsColorButton->sizePolicy().hasHeightForWidth()); - commentsColorButton->setSizePolicy(sizePolicy1); - commentsColorButton->setMinimumSize(QSize(23, 23)); - commentsColorButton->setMaximumSize(QSize(23, 23)); - commentsColorButton->setBaseSize(QSize(0, 0)); - commentsColorButton->setFocusPolicy(Qt::NoFocus); - commentsColorButton->setAutoDefault(false); - commentsColorButton->setFlat(false); - - gridLayout_2->addWidget(commentsColorButton, 6, 1, 1, 1); - - labelsItalicCheckBox = new QCheckBox(groupBox); - labelsItalicCheckBox->setObjectName(QString::fromUtf8("labelsItalicCheckBox")); - sizePolicy3.setHeightForWidth(labelsItalicCheckBox->sizePolicy().hasHeightForWidth()); - labelsItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(labelsItalicCheckBox, 5, 4, 1, 1); - - memoryLabel = new QLabel(groupBox); - memoryLabel->setObjectName(QString::fromUtf8("memoryLabel")); - - gridLayout_2->addWidget(memoryLabel, 4, 0, 1, 1); - - iomacroLabel = new QLabel(groupBox); - iomacroLabel->setObjectName(QString::fromUtf8("iomacroLabel")); - - gridLayout_2->addWidget(iomacroLabel, 8, 0, 1, 1); - - keywordsItalicCheckBox = new QCheckBox(groupBox); - keywordsItalicCheckBox->setObjectName(QString::fromUtf8("keywordsItalicCheckBox")); - sizePolicy3.setHeightForWidth(keywordsItalicCheckBox->sizePolicy().hasHeightForWidth()); - keywordsItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(keywordsItalicCheckBox, 1, 4, 1, 1); - - verticalSpacer_3 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - gridLayout_2->addItem(verticalSpacer_3, 10, 1, 1, 1); - - registersLabel = new QLabel(groupBox); - registersLabel->setObjectName(QString::fromUtf8("registersLabel")); - - gridLayout_2->addWidget(registersLabel, 2, 0, 1, 1); - - commentsItalicCheckBox = new QCheckBox(groupBox); - commentsItalicCheckBox->setObjectName(QString::fromUtf8("commentsItalicCheckBox")); - sizePolicy3.setHeightForWidth(commentsItalicCheckBox->sizePolicy().hasHeightForWidth()); - commentsItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(commentsItalicCheckBox, 6, 4, 1, 1); - - labelsBoldCheckBox = new QCheckBox(groupBox); - labelsBoldCheckBox->setObjectName(QString::fromUtf8("labelsBoldCheckBox")); - sizePolicy3.setHeightForWidth(labelsBoldCheckBox->sizePolicy().hasHeightForWidth()); - labelsBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(labelsBoldCheckBox, 5, 3, 1, 1); - - registersItalicCheckBox = new QCheckBox(groupBox); - registersItalicCheckBox->setObjectName(QString::fromUtf8("registersItalicCheckBox")); - sizePolicy3.setHeightForWidth(registersItalicCheckBox->sizePolicy().hasHeightForWidth()); - registersItalicCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(registersItalicCheckBox, 2, 4, 1, 1); - - systemBoldCheckBox = new QCheckBox(groupBox); - systemBoldCheckBox->setObjectName(QString::fromUtf8("systemBoldCheckBox")); - sizePolicy3.setHeightForWidth(systemBoldCheckBox->sizePolicy().hasHeightForWidth()); - systemBoldCheckBox->setSizePolicy(sizePolicy3); - - gridLayout_2->addWidget(systemBoldCheckBox, 7, 3, 1, 1); - - memoryColorButton_2 = new QPushButton(groupBox); - memoryColorButton_2->setObjectName(QString::fromUtf8("memoryColorButton_2")); - sizePolicy1.setHeightForWidth(memoryColorButton_2->sizePolicy().hasHeightForWidth()); - memoryColorButton_2->setSizePolicy(sizePolicy1); - memoryColorButton_2->setMinimumSize(QSize(23, 23)); - memoryColorButton_2->setMaximumSize(QSize(23, 23)); - memoryColorButton_2->setBaseSize(QSize(0, 0)); - memoryColorButton_2->setFocusPolicy(Qt::NoFocus); - memoryColorButton_2->setAutoDefault(false); - memoryColorButton_2->setFlat(false); - - gridLayout_2->addWidget(memoryColorButton_2, 4, 2, 1, 1); - - registersColorButton = new QPushButton(groupBox); - registersColorButton->setObjectName(QString::fromUtf8("registersColorButton")); - sizePolicy1.setHeightForWidth(registersColorButton->sizePolicy().hasHeightForWidth()); - registersColorButton->setSizePolicy(sizePolicy1); - registersColorButton->setMinimumSize(QSize(23, 23)); - registersColorButton->setMaximumSize(QSize(23, 23)); - registersColorButton->setBaseSize(QSize(0, 0)); - registersColorButton->setFocusPolicy(Qt::NoFocus); - registersColorButton->setAutoDefault(false); - registersColorButton->setFlat(false); - - gridLayout_2->addWidget(registersColorButton, 2, 1, 1, 1); - - numbersColorButton_2 = new QPushButton(groupBox); - numbersColorButton_2->setObjectName(QString::fromUtf8("numbersColorButton_2")); - sizePolicy1.setHeightForWidth(numbersColorButton_2->sizePolicy().hasHeightForWidth()); - numbersColorButton_2->setSizePolicy(sizePolicy1); - numbersColorButton_2->setMinimumSize(QSize(23, 23)); - numbersColorButton_2->setMaximumSize(QSize(23, 23)); - numbersColorButton_2->setBaseSize(QSize(0, 0)); - numbersColorButton_2->setFocusPolicy(Qt::NoFocus); - numbersColorButton_2->setAutoDefault(false); - numbersColorButton_2->setFlat(false); - - gridLayout_2->addWidget(numbersColorButton_2, 3, 2, 1, 1); - - horizontalSpacer_7 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - gridLayout_2->addItem(horizontalSpacer_7, 5, 5, 1, 1); - - - gridLayout->addWidget(groupBox, 0, 2, 1, 1); - - groupBox_2 = new QGroupBox(colorsTab); - groupBox_2->setObjectName(QString::fromUtf8("groupBox_2")); - verticalLayout_5 = new QVBoxLayout(groupBox_2); - verticalLayout_5->setObjectName(QString::fromUtf8("verticalLayout_5")); - gridLayout_4 = new QGridLayout(); - gridLayout_4->setObjectName(QString::fromUtf8("gridLayout_4")); - fontLabel_2 = new QLabel(groupBox_2); - fontLabel_2->setObjectName(QString::fromUtf8("fontLabel_2")); - - gridLayout_4->addWidget(fontLabel_2, 4, 0, 1, 1); - - fontColorButton = new QPushButton(groupBox_2); - fontColorButton->setObjectName(QString::fromUtf8("fontColorButton")); - sizePolicy1.setHeightForWidth(fontColorButton->sizePolicy().hasHeightForWidth()); - fontColorButton->setSizePolicy(sizePolicy1); - fontColorButton->setMinimumSize(QSize(23, 23)); - fontColorButton->setMaximumSize(QSize(23, 23)); - fontColorButton->setBaseSize(QSize(0, 0)); - fontColorButton->setFocusPolicy(Qt::NoFocus); - fontColorButton->setAutoDefault(false); - fontColorButton->setFlat(false); - - gridLayout_4->addWidget(fontColorButton, 4, 1, 1, 1); - - currentLineCheckBox = new QCheckBox(groupBox_2); - currentLineCheckBox->setObjectName(QString::fromUtf8("currentLineCheckBox")); - - gridLayout_4->addWidget(currentLineCheckBox, 5, 2, 1, 1); - - debugLineColorButton = new QPushButton(groupBox_2); - debugLineColorButton->setObjectName(QString::fromUtf8("debugLineColorButton")); - sizePolicy1.setHeightForWidth(debugLineColorButton->sizePolicy().hasHeightForWidth()); - debugLineColorButton->setSizePolicy(sizePolicy1); - debugLineColorButton->setMinimumSize(QSize(23, 23)); - debugLineColorButton->setMaximumSize(QSize(23, 23)); - debugLineColorButton->setBaseSize(QSize(0, 0)); - debugLineColorButton->setFocusPolicy(Qt::NoFocus); - debugLineColorButton->setAutoDefault(false); - debugLineColorButton->setFlat(false); - - gridLayout_4->addWidget(debugLineColorButton, 6, 1, 1, 1); - - currentLineLabel = new QLabel(groupBox_2); - currentLineLabel->setObjectName(QString::fromUtf8("currentLineLabel")); - - gridLayout_4->addWidget(currentLineLabel, 5, 0, 1, 1); - - debugLineLabel = new QLabel(groupBox_2); - debugLineLabel->setObjectName(QString::fromUtf8("debugLineLabel")); - - gridLayout_4->addWidget(debugLineLabel, 6, 0, 1, 1); - - currentLineColorButton = new QPushButton(groupBox_2); - currentLineColorButton->setObjectName(QString::fromUtf8("currentLineColorButton")); - sizePolicy1.setHeightForWidth(currentLineColorButton->sizePolicy().hasHeightForWidth()); - currentLineColorButton->setSizePolicy(sizePolicy1); - currentLineColorButton->setMinimumSize(QSize(23, 23)); - currentLineColorButton->setMaximumSize(QSize(23, 23)); - currentLineColorButton->setBaseSize(QSize(0, 0)); - currentLineColorButton->setFocusPolicy(Qt::NoFocus); - currentLineColorButton->setAutoDefault(false); - currentLineColorButton->setFlat(false); - - gridLayout_4->addWidget(currentLineColorButton, 5, 1, 1, 1); - - backgroundLabel = new QLabel(groupBox_2); - backgroundLabel->setObjectName(QString::fromUtf8("backgroundLabel")); - - gridLayout_4->addWidget(backgroundLabel, 1, 0, 1, 1); - - backgroundColorButton = new QPushButton(groupBox_2); - backgroundColorButton->setObjectName(QString::fromUtf8("backgroundColorButton")); - sizePolicy1.setHeightForWidth(backgroundColorButton->sizePolicy().hasHeightForWidth()); - backgroundColorButton->setSizePolicy(sizePolicy1); - backgroundColorButton->setMinimumSize(QSize(23, 23)); - backgroundColorButton->setMaximumSize(QSize(23, 23)); - backgroundColorButton->setBaseSize(QSize(0, 0)); - backgroundColorButton->setFocusPolicy(Qt::NoFocus); - backgroundColorButton->setAutoDefault(false); - backgroundColorButton->setFlat(false); - - gridLayout_4->addWidget(backgroundColorButton, 1, 1, 1, 1); - - lineNumberPanelLabel = new QLabel(groupBox_2); - lineNumberPanelLabel->setObjectName(QString::fromUtf8("lineNumberPanelLabel")); - - gridLayout_4->addWidget(lineNumberPanelLabel, 2, 0, 1, 1); - - lineNumberPanelColorButton = new QPushButton(groupBox_2); - lineNumberPanelColorButton->setObjectName(QString::fromUtf8("lineNumberPanelColorButton")); - sizePolicy1.setHeightForWidth(lineNumberPanelColorButton->sizePolicy().hasHeightForWidth()); - lineNumberPanelColorButton->setSizePolicy(sizePolicy1); - lineNumberPanelColorButton->setMinimumSize(QSize(23, 23)); - lineNumberPanelColorButton->setMaximumSize(QSize(23, 23)); - lineNumberPanelColorButton->setBaseSize(QSize(0, 0)); - lineNumberPanelColorButton->setFocusPolicy(Qt::NoFocus); - lineNumberPanelColorButton->setAutoDefault(false); - lineNumberPanelColorButton->setFlat(false); - - gridLayout_4->addWidget(lineNumberPanelColorButton, 2, 1, 1, 1); - - lineNumberFontLabel = new QLabel(groupBox_2); - lineNumberFontLabel->setObjectName(QString::fromUtf8("lineNumberFontLabel")); - - gridLayout_4->addWidget(lineNumberFontLabel, 3, 0, 1, 1); - - lineNumberFontColorButton = new QPushButton(groupBox_2); - lineNumberFontColorButton->setObjectName(QString::fromUtf8("lineNumberFontColorButton")); - sizePolicy1.setHeightForWidth(lineNumberFontColorButton->sizePolicy().hasHeightForWidth()); - lineNumberFontColorButton->setSizePolicy(sizePolicy1); - lineNumberFontColorButton->setMinimumSize(QSize(23, 23)); - lineNumberFontColorButton->setMaximumSize(QSize(23, 23)); - lineNumberFontColorButton->setBaseSize(QSize(0, 0)); - lineNumberFontColorButton->setFocusPolicy(Qt::NoFocus); - lineNumberFontColorButton->setAutoDefault(false); - lineNumberFontColorButton->setFlat(false); - - gridLayout_4->addWidget(lineNumberFontColorButton, 3, 1, 1, 1); - - - verticalLayout_5->addLayout(gridLayout_4); - - label_8 = new QLabel(groupBox_2); - label_8->setObjectName(QString::fromUtf8("label_8")); - label_8->setLocale(QLocale(QLocale::English, QLocale::UnitedStates)); - - verticalLayout_5->addWidget(label_8); - - horizontalSpacer_6 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - verticalLayout_5->addItem(horizontalSpacer_6); - - verticalSpacer_4 = new QSpacerItem(20, 40, QSizePolicy::Minimum, QSizePolicy::Expanding); - - verticalLayout_5->addItem(verticalSpacer_4); - - - gridLayout->addWidget(groupBox_2, 0, 0, 1, 1); - - tabWidget->addTab(colorsTab, QString()); - buildTab = new QWidget(); - buildTab->setObjectName(QString::fromUtf8("buildTab")); - verticalLayout_6 = new QVBoxLayout(buildTab); - verticalLayout_6->setObjectName(QString::fromUtf8("verticalLayout_6")); - formLayout = new QFormLayout(); - formLayout->setObjectName(QString::fromUtf8("formLayout")); - formLayout->setFieldGrowthPolicy(QFormLayout::AllNonFixedFieldsGrow); - formLayout->setHorizontalSpacing(12); - formLayout->setVerticalSpacing(12); - formLayout->setContentsMargins(-1, -1, -1, 0); - modeLabel = new QLabel(buildTab); - modeLabel->setObjectName(QString::fromUtf8("modeLabel")); - - formLayout->setWidget(0, QFormLayout::LabelRole, modeLabel); - - horizontalLayout_3 = new QHBoxLayout(); - horizontalLayout_3->setObjectName(QString::fromUtf8("horizontalLayout_3")); - x86RadioButton = new QRadioButton(buildTab); - buttonGroup_2 = new QButtonGroup(SettingsWindow); - buttonGroup_2->setObjectName(QString::fromUtf8("buttonGroup_2")); - buttonGroup_2->addButton(x86RadioButton); - x86RadioButton->setObjectName(QString::fromUtf8("x86RadioButton")); - x86RadioButton->setChecked(true); - - horizontalLayout_3->addWidget(x86RadioButton); - - x64RadioButton = new QRadioButton(buildTab); - buttonGroup_2->addButton(x64RadioButton); - x64RadioButton->setObjectName(QString::fromUtf8("x64RadioButton")); - x64RadioButton->setChecked(false); - - horizontalLayout_3->addWidget(x64RadioButton); - - horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_3->addItem(horizontalSpacer); - - - formLayout->setLayout(0, QFormLayout::FieldRole, horizontalLayout_3); - - assemblerLabel = new QLabel(buildTab); - assemblerLabel->setObjectName(QString::fromUtf8("assemblerLabel")); - - formLayout->setWidget(1, QFormLayout::LabelRole, assemblerLabel); - - horizontalLayout_6 = new QHBoxLayout(); - horizontalLayout_6->setObjectName(QString::fromUtf8("horizontalLayout_6")); - nasmRadioButton = new QRadioButton(buildTab); - buttonGroup = new QButtonGroup(SettingsWindow); - buttonGroup->setObjectName(QString::fromUtf8("buttonGroup")); - buttonGroup->addButton(nasmRadioButton); - nasmRadioButton->setObjectName(QString::fromUtf8("nasmRadioButton")); - nasmRadioButton->setChecked(true); - - horizontalLayout_6->addWidget(nasmRadioButton); - - gasRadioButton = new QRadioButton(buildTab); - buttonGroup->addButton(gasRadioButton); - gasRadioButton->setObjectName(QString::fromUtf8("gasRadioButton")); - - horizontalLayout_6->addWidget(gasRadioButton); - - fasmRadioButton = new QRadioButton(buildTab); - buttonGroup->addButton(fasmRadioButton); - fasmRadioButton->setObjectName(QString::fromUtf8("fasmRadioButton")); - - horizontalLayout_6->addWidget(fasmRadioButton); - - masmRadioButton = new QRadioButton(buildTab); - buttonGroup->addButton(masmRadioButton); - masmRadioButton->setObjectName(QString::fromUtf8("masmRadioButton")); - - horizontalLayout_6->addWidget(masmRadioButton); - - horizontalSpacer_8 = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum); - - horizontalLayout_6->addItem(horizontalSpacer_8); - - - formLayout->setLayout(1, QFormLayout::FieldRole, horizontalLayout_6); - - assemblyLabel = new QLabel(buildTab); - assemblyLabel->setObjectName(QString::fromUtf8("assemblyLabel")); - - formLayout->setWidget(2, QFormLayout::LabelRole, assemblyLabel); - - assemblyOptionsEdit = new QLineEdit(buildTab); - assemblyOptionsEdit->setObjectName(QString::fromUtf8("assemblyOptionsEdit")); - - formLayout->setWidget(2, QFormLayout::FieldRole, assemblyOptionsEdit); - - linkingLabel = new QLabel(buildTab); - linkingLabel->setObjectName(QString::fromUtf8("linkingLabel")); - - formLayout->setWidget(3, QFormLayout::LabelRole, linkingLabel); - - linkingOptionsEdit = new QLineEdit(buildTab); - linkingOptionsEdit->setObjectName(QString::fromUtf8("linkingOptionsEdit")); - - formLayout->setWidget(3, QFormLayout::FieldRole, linkingOptionsEdit); - - assemblerPathLabel = new QLabel(buildTab); - assemblerPathLabel->setObjectName(QString::fromUtf8("assemblerPathLabel")); - - formLayout->setWidget(4, QFormLayout::LabelRole, assemblerPathLabel); - - assemblerPathEdit = new QLineEdit(buildTab); - assemblerPathEdit->setObjectName(QString::fromUtf8("assemblerPathEdit")); - - formLayout->setWidget(4, QFormLayout::FieldRole, assemblerPathEdit); - - linkerPathLabel = new QLabel(buildTab); - linkerPathLabel->setObjectName(QString::fromUtf8("linkerPathLabel")); - - formLayout->setWidget(5, QFormLayout::LabelRole, linkerPathLabel); - - linkerPathEdit = new QLineEdit(buildTab); - linkerPathEdit->setObjectName(QString::fromUtf8("linkerPathEdit")); - - formLayout->setWidget(5, QFormLayout::FieldRole, linkerPathEdit); - - objectFileNameLabel = new QLabel(buildTab); - objectFileNameLabel->setObjectName(QString::fromUtf8("objectFileNameLabel")); - - formLayout->setWidget(6, QFormLayout::LabelRole, objectFileNameLabel); - - objectFileNameEdit = new QLineEdit(buildTab); - objectFileNameEdit->setObjectName(QString::fromUtf8("objectFileNameEdit")); - - formLayout->setWidget(6, QFormLayout::FieldRole, objectFileNameEdit); - - gdbPathLabel = new QLabel(buildTab); - gdbPathLabel->setObjectName(QString::fromUtf8("gdbPathLabel")); - - formLayout->setWidget(7, QFormLayout::LabelRole, gdbPathLabel); - - gdbPathEdit = new QLineEdit(buildTab); - gdbPathEdit->setObjectName(QString::fromUtf8("gdbPathEdit")); - - formLayout->setWidget(7, QFormLayout::FieldRole, gdbPathEdit); - - assemblerWorkingDirectoryLabel = new QLabel(buildTab); - assemblerWorkingDirectoryLabel->setObjectName(QString::fromUtf8("assemblerWorkingDirectoryLabel")); - - formLayout->setWidget(11, QFormLayout::LabelRole, assemblerWorkingDirectoryLabel); - - runInCurrentDirectoryCheckbox = new QCheckBox(buildTab); - runInCurrentDirectoryCheckbox->setObjectName(QString::fromUtf8("runInCurrentDirectoryCheckbox")); - runInCurrentDirectoryCheckbox->setEnabled(true); - - formLayout->setWidget(11, QFormLayout::FieldRole, runInCurrentDirectoryCheckbox); - - disableLinkingLabel = new QLabel(buildTab); - disableLinkingLabel->setObjectName(QString::fromUtf8("disableLinkingLabel")); - - formLayout->setWidget(12, QFormLayout::LabelRole, disableLinkingLabel); - - disableLinkingCheckbox = new QCheckBox(buildTab); - disableLinkingCheckbox->setObjectName(QString::fromUtf8("disableLinkingCheckbox")); - disableLinkingCheckbox->setEnabled(true); - - formLayout->setWidget(12, QFormLayout::FieldRole, disableLinkingCheckbox); - - gdbVerboseLabel = new QLabel(buildTab); - gdbVerboseLabel->setObjectName(QString::fromUtf8("gdbVerboseLabel")); - - formLayout->setWidget(10, QFormLayout::LabelRole, gdbVerboseLabel); - - sasmVerboseCheckBox = new QCheckBox(buildTab); - sasmVerboseCheckBox->setObjectName(QString::fromUtf8("sasmVerboseCheckBox")); - - formLayout->setWidget(10, QFormLayout::FieldRole, sasmVerboseCheckBox); - - MiModusLabel = new QLabel(buildTab); - MiModusLabel->setObjectName(QString::fromUtf8("MiModusLabel")); - - formLayout->setWidget(13, QFormLayout::LabelRole, MiModusLabel); - - MiModusCheckBox = new QCheckBox(buildTab); - MiModusCheckBox->setObjectName(QString::fromUtf8("MiModusCheckBox")); - MiModusCheckBox->setChecked(true); - - formLayout->setWidget(13, QFormLayout::FieldRole, MiModusCheckBox); - - gdbDisplayLabel = new QLabel(buildTab); - gdbDisplayLabel->setObjectName(QString::fromUtf8("gdbDisplayLabel")); - - formLayout->setWidget(14, QFormLayout::LabelRole, gdbDisplayLabel); - - sasmDisplayCheckBox = new QCheckBox(buildTab); - sasmDisplayCheckBox->setObjectName(QString::fromUtf8("sasmDisplayCheckBox")); - - formLayout->setWidget(14, QFormLayout::FieldRole, sasmDisplayCheckBox); - - - verticalLayout_6->addLayout(formLayout); - - - infoLabel = new QLabel(buildTab); - infoLabel->setObjectName(QString::fromUtf8("infoLabel")); - infoLabel->setAlignment(Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop); - - verticalLayout_6->addWidget(infoLabel); - - tabWidget->addTab(buildTab, QString()); - - verticalLayout->addWidget(tabWidget); - - buttonBox = new QDialogButtonBox(SettingsWindow); - buttonBox->setObjectName(QString::fromUtf8("buttonBox")); - buttonBox->setStandardButtons(QDialogButtonBox::Apply|QDialogButtonBox::Cancel|QDialogButtonBox::Ok); - - verticalLayout->addWidget(buttonBox); - - QWidget::setTabOrder(startWindow, fontSizeSpinBox); - QWidget::setTabOrder(fontSizeSpinBox, fontComboBox); - QWidget::setTabOrder(fontComboBox, resetAllButton); - QWidget::setTabOrder(resetAllButton, language); - - retranslateUi(SettingsWindow); - - tabWidget->setCurrentIndex(2); - quotationColorButton->setDefault(false); - systemColorButton->setDefault(false); - commentsColorButton_2->setDefault(false); - keywordsColorButton->setDefault(false); - keywordsColorButton_2->setDefault(false); - iomacroColorButton_2->setDefault(false); - labelsColorButton->setDefault(false); - quotationColorButton_2->setDefault(false); - memoryColorButton->setDefault(false); - systemColorButton_2->setDefault(false); - labelsColorButton_2->setDefault(false); - iomacroColorButton->setDefault(false); - registersColorButton_2->setDefault(false); - numbersColorButton->setDefault(false); - commentsColorButton->setDefault(false); - memoryColorButton_2->setDefault(false); - registersColorButton->setDefault(false); - numbersColorButton_2->setDefault(false); - fontColorButton->setDefault(false); - debugLineColorButton->setDefault(false); - currentLineColorButton->setDefault(false); - backgroundColorButton->setDefault(false); - lineNumberPanelColorButton->setDefault(false); - lineNumberFontColorButton->setDefault(false); - - - QMetaObject::connectSlotsByName(SettingsWindow); - } // setupUi - - void retranslateUi(QWidget *SettingsWindow) - { - SettingsWindow->setWindowTitle(QApplication::translate("SettingsWindow", "Settings", nullptr)); - settingsLabel->setText(QApplication::translate("SettingsWindow", "SASM Options", nullptr)); - commonSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); - startWindowLabel->setText(QApplication::translate("SettingsWindow", "On start:", nullptr)); - startWindow->setItemText(0, QApplication::translate("SettingsWindow", "Open get started window", nullptr)); - startWindow->setItemText(1, QApplication::translate("SettingsWindow", "Restore previous session", nullptr)); - - languageLabel->setText(QApplication::translate("SettingsWindow", "Language:", nullptr)); - - label_4->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - registersLabel_2->setText(QApplication::translate("SettingsWindow", "Show all registers in debug:", nullptr)); - registersYesRadioButton->setText(QApplication::translate("SettingsWindow", "Yes", nullptr)); - registersNoRadioButton->setText(QApplication::translate("SettingsWindow", "No, show only general purpose", nullptr)); - insertDebugStringLabel->setText(QApplication::translate("SettingsWindow", "Insert debug string:", nullptr)); - insertDebugStringCheckBox->setText(QString()); - codeSettingsBox->setTitle(QApplication::translate("SettingsWindow", "Code editor", nullptr)); - fontLabel->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); - fontSizeLabel->setText(QApplication::translate("SettingsWindow", "Size:", nullptr)); - label->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - label_2->setText(QApplication::translate("SettingsWindow", "Default code editor text:", nullptr)); - resetAllButton->setText(QApplication::translate("SettingsWindow", "Reset all (need a restart)...", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(commonTab), QApplication::translate("SettingsWindow", "Common", nullptr)); - groupBox->setTitle(QApplication::translate("SettingsWindow", "Syntax highlighting", nullptr)); - iomacroBoldCheckBox->setText(QString()); - systemLabel->setText(QApplication::translate("SettingsWindow", "System:", nullptr)); - quotationColorButton->setText(QString()); - systemColorButton->setText(QString()); - numbersItalicCheckBox->setText(QString()); - label_6->setText(QApplication::translate("SettingsWindow", "Bold:", nullptr)); - numbersBoldCheckBox->setText(QString()); - label_7->setText(QApplication::translate("SettingsWindow", "Italic:", nullptr)); - label_3->setText(QApplication::translate("SettingsWindow", "Foreground:", nullptr)); - systemItalicCheckBox->setText(QString()); - commentsColorButton_2->setText(QString()); - keywordsColorButton->setText(QString()); - commentsBoldCheckBox->setText(QString()); - keywordsColorButton_2->setText(QString()); - iomacroColorButton_2->setText(QString()); - memoryItalicCheckBox->setText(QString()); - keywordsLabel->setText(QApplication::translate("SettingsWindow", "Keywords:", nullptr)); - label_5->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); - labelsColorButton->setText(QString()); - numbersLabel->setText(QApplication::translate("SettingsWindow", "Numbers:", nullptr)); - quotationColorButton_2->setText(QString()); - labelsLabel->setText(QApplication::translate("SettingsWindow", "Labels:", nullptr)); - commentsLabel->setText(QApplication::translate("SettingsWindow", "Comments:", nullptr)); - memoryColorButton->setText(QString()); - systemColorButton_2->setText(QString()); - iomacroLabel_2->setText(QApplication::translate("SettingsWindow", "Quotation:", nullptr)); - labelsColorButton_2->setText(QString()); - registersBoldCheckBox->setText(QString()); - quotationBoldCheckBox->setText(QString()); - iomacroColorButton->setText(QString()); - iomacroItalicCheckBox->setText(QString()); - registersColorButton_2->setText(QString()); - keywordsBoldCheckBox->setText(QString()); - memoryBoldCheckBox->setText(QString()); - numbersColorButton->setText(QString()); - quotationItalicCheckBox->setText(QString()); - commentsColorButton->setText(QString()); - labelsItalicCheckBox->setText(QString()); - memoryLabel->setText(QApplication::translate("SettingsWindow", "Memory:", nullptr)); - iomacroLabel->setText(QApplication::translate("SettingsWindow", "I/O macro:", nullptr)); - keywordsItalicCheckBox->setText(QString()); - registersLabel->setText(QApplication::translate("SettingsWindow", "Registers:", nullptr)); - commentsItalicCheckBox->setText(QString()); - labelsBoldCheckBox->setText(QString()); - registersItalicCheckBox->setText(QString()); - systemBoldCheckBox->setText(QString()); - memoryColorButton_2->setText(QString()); - registersColorButton->setText(QString()); - numbersColorButton_2->setText(QString()); - groupBox_2->setTitle(QApplication::translate("SettingsWindow", "Common", nullptr)); - fontLabel_2->setText(QApplication::translate("SettingsWindow", "Font:", nullptr)); - fontColorButton->setText(QString()); - currentLineCheckBox->setText(QApplication::translate("SettingsWindow", "Enable highlighting", nullptr)); - debugLineColorButton->setText(QString()); - currentLineLabel->setText(QApplication::translate("SettingsWindow", "Current line:", nullptr)); - debugLineLabel->setText(QApplication::translate("SettingsWindow", "Debugging line:", nullptr)); - currentLineColorButton->setText(QString()); - backgroundLabel->setText(QApplication::translate("SettingsWindow", "Background:", nullptr)); - backgroundColorButton->setText(QString()); - lineNumberPanelLabel->setText(QApplication::translate("SettingsWindow", "Line number panel:", nullptr)); - lineNumberPanelColorButton->setText(QString()); - lineNumberFontLabel->setText(QApplication::translate("SettingsWindow", "Line number font:", nullptr)); - lineNumberFontColorButton->setText(QString()); - label_8->setText(QApplication::translate("SettingsWindow", "To apply the changes require a restart!", nullptr)); - tabWidget->setTabText(tabWidget->indexOf(colorsTab), QApplication::translate("SettingsWindow", "Colors", nullptr)); - modeLabel->setText(QApplication::translate("SettingsWindow", "Mode:", nullptr)); - x86RadioButton->setText(QApplication::translate("SettingsWindow", "x86", nullptr)); - x64RadioButton->setText(QApplication::translate("SettingsWindow", "x64", nullptr)); - assemblerLabel->setText(QApplication::translate("SettingsWindow", "Assembler:", nullptr)); - nasmRadioButton->setText(QApplication::translate("SettingsWindow", "NASM", nullptr)); - gasRadioButton->setText(QApplication::translate("SettingsWindow", "GAS", nullptr)); - fasmRadioButton->setText(QApplication::translate("SettingsWindow", "FASM", nullptr)); - masmRadioButton->setText(QApplication::translate("SettingsWindow", "MASM", nullptr)); - assemblyLabel->setText(QApplication::translate("SettingsWindow", "Assembly options:", nullptr)); - linkingLabel->setText(QApplication::translate("SettingsWindow", "Linking options:", nullptr)); - assemblerPathLabel->setText(QApplication::translate("SettingsWindow", "Assembler path:", nullptr)); - linkerPathLabel->setText(QApplication::translate("SettingsWindow", "Linker path:", nullptr)); - objectFileNameLabel->setText(QApplication::translate("SettingsWindow", "Object file name:", nullptr)); - gdbPathLabel->setText(QApplication::translate("SettingsWindow", "GDB path (Unix only):", nullptr)); - assemblerWorkingDirectoryLabel->setText(QApplication::translate("SettingsWindow", "Build in current directory:", nullptr)); - runInCurrentDirectoryCheckbox->setText(QString()); - disableLinkingLabel->setText(QApplication::translate("SettingsWindow", "Disable linking:", nullptr)); - disableLinkingCheckbox->setText(QString()); - gdbVerboseLabel->setText(QApplication::translate("SettingsWindow", "SASM verbose mode:", nullptr)); - sasmVerboseCheckBox->setText(QString()); - MiModusLabel->setText(QApplication::translate("SettingsWindow", "MI-Mode:", nullptr)); - MiModusCheckBox->setText(QString()); - gdbDisplayLabel->setText(QApplication::translate("SettingsWindow", "SASM display:", nullptr)); - sasmDisplayCheckBox->setText(QString()); - infoLabel->setText(QString()); - tabWidget->setTabText(tabWidget->indexOf(buildTab), QApplication::translate("SettingsWindow", "Build", nullptr)); - } // retranslateUi - -}; - -namespace Ui { - class SettingsWindow: public Ui_SettingsWindow {}; -} // namespace Ui - -QT_END_NAMESPACE - -#endif // UI_SETTINGS_H From 9bca3c5557aae46d32f941da46869a0f51681b29 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 12 Nov 2021 13:16:31 +0100 Subject: [PATCH 84/86] settings clean up --- settings.ui | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/settings.ui b/settings.ui index 8b1035ca..0507c6ea 100644 --- a/settings.ui +++ b/settings.ui @@ -2203,11 +2203,12 @@ + + true + - - - + SASM display: @@ -2219,8 +2220,13 @@ + + false + + + From 0fb0ac331fce6c89632cb85b7e2cbb16d3d41894 Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 12 Nov 2021 17:42:08 +0100 Subject: [PATCH 85/86] change MI as default --- mainwindow.cpp | 6 +++--- mainwindow.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 03dfc641..9617efa6 100755 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -2060,7 +2060,7 @@ void MainWindow::initAssemblerSettings(bool firstOpening) settingsUi.sasmVerboseCheckBox->setChecked(settings.value("sasmverbose", false).toBool()); - settingsUi.MiModusCheckBox->setChecked(settings.value("mi", false).toBool()); + settingsUi.MiModusCheckBox->setChecked(settings.value("mi", true).toBool()); settingsUi.sasmDisplayCheckBox->setChecked(settings.value("display", false).toBool()); @@ -2214,7 +2214,7 @@ void MainWindow::recreateAssembler(bool start) settings.setValue("disablelinking", false); settings.setValue("currentdir", false); settings.setValue("sasmverbose", false); - settings.setValue("mi", false); + settings.setValue("mi", true); settings.setValue("display", false); settings.setValue("gdbpath", "gdb"); settings.setValue("assemblerpath", assembler->getAssemblerPath()); @@ -2241,7 +2241,7 @@ void MainWindow::backupSettings() backupGDBPath = settings.value("gdbpath", "gdb").toString(); backupGDBVerbose = settings.value("sasmverbose", false).toBool(); backupGDBDisplay = settings.value("display", false).toBool(); - backupGDBMi = settings.value("mi", false).toBool(); + backupGDBMi = settings.value("mi", true).toBool(); backupDisableLinking = settings.value("disablelinking", false).toBool(); backupCurrentDir = settings.value("currentdir", false).toBool(); backupStartText = settings.value("starttext", assembler->getStartText()).toString(); diff --git a/mainwindow.h b/mainwindow.h index 9f146bff..b6432b9f 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -238,9 +238,9 @@ class MainWindow : public QMainWindow QString backupLinkerOptions; QString backupObjectFileName; QString backupGDBPath; - QString backupGDBVerbose; - QString backupGDBMi; - QString backupGDBDisplay; + bool backupGDBVerbose; + bool backupGDBMi; + bool backupGDBDisplay; bool backupDisableLinking; bool backupCurrentDir; QString backupAssemblerPath; From d5fa0a248391c0d7e852f37b26743cbd5c9420ef Mon Sep 17 00:00:00 2001 From: ge69dal Date: Fri, 12 Nov 2021 18:12:37 +0100 Subject: [PATCH 86/86] make displayWindow editable --- displayWindow.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/displayWindow.cpp b/displayWindow.cpp index a463c963..0f103c8e 100755 --- a/displayWindow.cpp +++ b/displayWindow.cpp @@ -48,7 +48,7 @@ DisplayWindow::DisplayWindow(QWidget *parent) : QWidget(parent) { zoom = 1; - this->setFixedSize(QSize(512+50, 512+125)); + this->resize(QSize(512+50, 512+125)); this->setStyleSheet("background-color:grey;"); verticalLayout = new QVBoxLayout(this); zoomComboBox = new QComboBox(this); @@ -82,7 +82,7 @@ void DisplayWindow::changeDisplay(int msgid){ qint64 fps = 30; QElapsedTimer programExecutionTime; QElapsedTimer programExecutionTime2; - this->setFixedSize(QSize(512+60, 512+92)); + this->resize(QSize(512+60, 512+92)); scrollAreaWidgetContents->update(); programExecutionTime.start(); programExecutionTime2.start(); @@ -111,7 +111,7 @@ void DisplayWindow::changeDisplay(int msgid){ display_size = (mode) ? res_x*res_y*3 : res_x*res_y; displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); - this->setFixedSize(QSize(res_x+60, res_y+92)); + this->resize(QSize(res_x+60, res_y+92)); scrollAreaWidgetContents->setFixedSize(res_x*zoom, res_y*zoom); scrollAreaWidgetContents->update(); } else { @@ -199,7 +199,7 @@ void DisplayWindow::changeDisplay(int msgid){ displayPicture = new QImage(res_x, res_y, QImage::Format_RGB32); displayPicture->fill(qRgb(255, 255, 255)); scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); - this->setFixedSize(QSize(res_x+60, res_y+92)); + this->resize(QSize(res_x+60, res_y+92)); scrollAreaWidgetContents->update(); // sem_post(sem_consumer); sb.sem_op = 1; @@ -310,7 +310,7 @@ void DisplayWindow::zoomSettingsChanged(int value){ if(!loop){ zoom = std::pow(2, value); scrollAreaWidgetContents->setFixedSize(res_x*zoom+26, res_y*zoom+26); - this->setFixedSize(QSize(res_x+60, res_y+92)); + this->resize(QSize(res_x+60, res_y+92)); scrollAreaWidgetContents->update(); } }