work save
This commit is contained in:
parent
3ff9a6dafe
commit
62527a04ae
|
@ -16,7 +16,8 @@ SOURCES += \
|
||||||
compiler/executablerunner.cpp \
|
compiler/executablerunner.cpp \
|
||||||
compiler/filecompiler.cpp \
|
compiler/filecompiler.cpp \
|
||||||
compiler/stdincompiler.cpp \
|
compiler/stdincompiler.cpp \
|
||||||
cpudialog.cpp \
|
settingsdialog/debuggeneralwidget.cpp \
|
||||||
|
widgets/cpudialog.cpp \
|
||||||
debugger.cpp \
|
debugger.cpp \
|
||||||
editor.cpp \
|
editor.cpp \
|
||||||
editorlist.cpp \
|
editorlist.cpp \
|
||||||
|
@ -67,7 +68,8 @@ HEADERS += \
|
||||||
compiler/executablerunner.h \
|
compiler/executablerunner.h \
|
||||||
compiler/filecompiler.h \
|
compiler/filecompiler.h \
|
||||||
compiler/stdincompiler.h \
|
compiler/stdincompiler.h \
|
||||||
cpudialog.h \
|
settingsdialog/debuggeneralwidget.h \
|
||||||
|
widgets/cpudialog.h \
|
||||||
debugger.h \
|
debugger.h \
|
||||||
editor.h \
|
editor.h \
|
||||||
editorlist.h \
|
editorlist.h \
|
||||||
|
@ -112,7 +114,8 @@ HEADERS += \
|
||||||
widgets/qpatchedcombobox.h
|
widgets/qpatchedcombobox.h
|
||||||
|
|
||||||
FORMS += \
|
FORMS += \
|
||||||
cpudialog.ui \
|
settingsdialog/debuggeneralwidget.ui \
|
||||||
|
widgets/cpudialog.ui \
|
||||||
mainwindow.ui \
|
mainwindow.ui \
|
||||||
settingsdialog/compilersetdirectorieswidget.ui \
|
settingsdialog/compilersetdirectorieswidget.ui \
|
||||||
settingsdialog/compilersetoptionwidget.ui \
|
settingsdialog/compilersetoptionwidget.ui \
|
||||||
|
|
|
@ -99,8 +99,8 @@ void CompilerManager::run(const QString &filename, const QString &arguments, con
|
||||||
} else {
|
} else {
|
||||||
mRunner = new ExecutableRunner(filename,arguments,workDir);
|
mRunner = new ExecutableRunner(filename,arguments,workDir);
|
||||||
}
|
}
|
||||||
connect(mRunner, &ExecutableRunner::terminated, this ,&CompilerManager::onRunnerTerminated);
|
connect(mRunner, &ExecutableRunner::finished, this ,&CompilerManager::onRunnerTerminated);
|
||||||
connect(mRunner, &ExecutableRunner::terminated, pMainWindow ,&MainWindow::onRunFinished);
|
connect(mRunner, &ExecutableRunner::finished, pMainWindow ,&MainWindow::onRunFinished);
|
||||||
connect(mRunner, &ExecutableRunner::runErrorOccurred, pMainWindow ,&MainWindow::onRunErrorOccured);
|
connect(mRunner, &ExecutableRunner::runErrorOccurred, pMainWindow ,&MainWindow::onRunErrorOccured);
|
||||||
mRunner->start();
|
mRunner->start();
|
||||||
}
|
}
|
||||||
|
@ -134,8 +134,9 @@ void CompilerManager::onCompileFinished()
|
||||||
void CompilerManager::onRunnerTerminated()
|
void CompilerManager::onRunnerTerminated()
|
||||||
{
|
{
|
||||||
QMutexLocker locker(&mRunnerMutex);
|
QMutexLocker locker(&mRunnerMutex);
|
||||||
delete mRunner;
|
ExecutableRunner* p=mRunner;
|
||||||
mRunner=nullptr;
|
mRunner=nullptr;
|
||||||
|
p->deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CompilerManager::onCompileIssue(PCompileIssue)
|
void CompilerManager::onCompileIssue(PCompileIssue)
|
||||||
|
|
|
@ -49,8 +49,12 @@ void ExecutableRunner::run()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (mStop) {
|
if (mStop) {
|
||||||
|
process.closeReadChannel(QProcess::StandardOutput);
|
||||||
|
process.closeReadChannel(QProcess::StandardError);
|
||||||
|
process.closeWriteChannel();
|
||||||
process.terminate();
|
process.terminate();
|
||||||
//break;
|
process.kill();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (errorOccurred)
|
if (errorOccurred)
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
#include "cpudialog.h"
|
|
||||||
#include "ui_cpudialog.h"
|
|
||||||
|
|
||||||
CPUDialog::CPUDialog(QWidget *parent) :
|
|
||||||
QDialog(parent),
|
|
||||||
ui(new Ui::CPUDialog)
|
|
||||||
{
|
|
||||||
ui->setupUi(this);
|
|
||||||
}
|
|
||||||
|
|
||||||
CPUDialog::~CPUDialog()
|
|
||||||
{
|
|
||||||
delete ui;
|
|
||||||
}
|
|
|
@ -1,22 +0,0 @@
|
||||||
#ifndef CPUDIALOG_H
|
|
||||||
#define CPUDIALOG_H
|
|
||||||
|
|
||||||
#include <QDialog>
|
|
||||||
|
|
||||||
namespace Ui {
|
|
||||||
class CPUDialog;
|
|
||||||
}
|
|
||||||
|
|
||||||
class CPUDialog : public QDialog
|
|
||||||
{
|
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
|
||||||
explicit CPUDialog(QWidget *parent = nullptr);
|
|
||||||
~CPUDialog();
|
|
||||||
|
|
||||||
private:
|
|
||||||
Ui::CPUDialog *ui;
|
|
||||||
};
|
|
||||||
|
|
||||||
#endif // CPUDIALOG_H
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include "mainwindow.h"
|
#include "mainwindow.h"
|
||||||
#include "editor.h"
|
#include "editor.h"
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "cpudialog.h"
|
#include "widgets/cpudialog.h"
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -16,6 +16,7 @@ Debugger::Debugger(QObject *parent) : QObject(parent)
|
||||||
mBreakpointModel=new BreakpointModel(this);
|
mBreakpointModel=new BreakpointModel(this);
|
||||||
mBacktraceModel=new BacktraceModel(this);
|
mBacktraceModel=new BacktraceModel(this);
|
||||||
mWatchModel = new WatchModel(this);
|
mWatchModel = new WatchModel(this);
|
||||||
|
mRegisterModel = new RegisterModel(this);
|
||||||
mExecuting = false;
|
mExecuting = false;
|
||||||
mUseUTF8 = false;
|
mUseUTF8 = false;
|
||||||
mReader = nullptr;
|
mReader = nullptr;
|
||||||
|
@ -74,8 +75,9 @@ void Debugger::clearUpReader()
|
||||||
// MainForm.LeftPageControl.ActivePageIndex := LeftPageIndexBackup;
|
// MainForm.LeftPageControl.ActivePageIndex := LeftPageIndexBackup;
|
||||||
|
|
||||||
// // Close CPU window
|
// // Close CPU window
|
||||||
// if Assigned(CPUForm) then
|
if (pMainWindow->cpuDialog()!=nullptr) {
|
||||||
// CPUForm.Close;
|
pMainWindow->cpuDialog()->close();
|
||||||
|
}
|
||||||
|
|
||||||
// Free resources
|
// Free resources
|
||||||
pMainWindow->removeActiveBreakpoints();
|
pMainWindow->removeActiveBreakpoints();
|
||||||
|
@ -84,6 +86,8 @@ void Debugger::clearUpReader()
|
||||||
|
|
||||||
pMainWindow->updateAppTitle();
|
pMainWindow->updateAppTitle();
|
||||||
|
|
||||||
|
pMainWindow->updateDebugEval("");
|
||||||
|
|
||||||
mBacktraceModel->clear();
|
mBacktraceModel->clear();
|
||||||
|
|
||||||
for(PWatchVar var:mWatchModel->watchVars()) {
|
for(PWatchVar var:mWatchModel->watchVars()) {
|
||||||
|
@ -109,6 +113,11 @@ void Debugger::onClearLocals()
|
||||||
pMainWindow->txtLocals()->clear();
|
pMainWindow->txtLocals()->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RegisterModel *Debugger::registerModel() const
|
||||||
|
{
|
||||||
|
return mRegisterModel;
|
||||||
|
}
|
||||||
|
|
||||||
WatchModel *Debugger::watchModel() const
|
WatchModel *Debugger::watchModel() const
|
||||||
{
|
{
|
||||||
return mWatchModel;
|
return mWatchModel;
|
||||||
|
@ -391,7 +400,9 @@ void Debugger::syncFinishedParsing()
|
||||||
|
|
||||||
// An evaluation variable has been processed. Forward the results
|
// An evaluation variable has been processed. Forward the results
|
||||||
if (mReader->doevalready) {
|
if (mReader->doevalready) {
|
||||||
emit evalReady(mReader->mEvalValue);
|
pMainWindow->updateDebugEval(mReader->mEvalValue);
|
||||||
|
mReader->mEvalValue="";
|
||||||
|
mReader->doevalready = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// show command output
|
// show command output
|
||||||
|
@ -427,12 +438,18 @@ void Debugger::syncFinishedParsing()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Some part of the CPU form has been updated
|
// Some part of the CPU form has been updated
|
||||||
if (pMainWindow->cpuDialog()->isVisible() && !mReader->doreceivedsignal) {
|
if (pMainWindow->cpuDialog()!=nullptr && !mReader->doreceivedsignal) {
|
||||||
// if (mReader->doregistersready)
|
if (mReader->doregistersready) {
|
||||||
// CPUForm.OnRegistersReady;
|
mRegisterModel->update(mReader->mRegisters);
|
||||||
|
mReader->mRegisters.clear();
|
||||||
|
mReader->doregistersready = false;
|
||||||
|
}
|
||||||
|
|
||||||
// if (mReader->dodisassemblerready)
|
if (mReader->dodisassemblerready) {
|
||||||
// CPUForm.OnAssemblerReady;
|
pMainWindow->cpuDialog()->setDisassembly(mReader->mDisassembly);
|
||||||
|
mReader->mDisassembly.clear();
|
||||||
|
mReader->dodisassemblerready = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mReader->doupdateexecution) {
|
if (mReader->doupdateexecution) {
|
||||||
|
@ -477,9 +494,8 @@ void Debugger::syncFinishedParsing()
|
||||||
|
|
||||||
|
|
||||||
// CPU form updates itself when spawned, don't update twice!
|
// CPU form updates itself when spawned, don't update twice!
|
||||||
if ((mReader->doupdatecpuwindow && !spawnedcpuform) && (pMainWindow->cpuDialog()->isVisible())) {
|
if ((mReader->doupdatecpuwindow && !spawnedcpuform) && (pMainWindow->cpuDialog()!=nullptr)) {
|
||||||
sendCommand("disas", "");
|
pMainWindow->cpuDialog()->updateInfo();
|
||||||
sendCommand("info registers", "");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -573,12 +589,11 @@ AnnotationType DebugReader::getAnnotation(const QString &s)
|
||||||
} else if ((mCurrentCmd) && (mCurrentCmd->command == "info args")) {
|
} else if ((mCurrentCmd) && (mCurrentCmd->command == "info args")) {
|
||||||
//hack to catch params
|
//hack to catch params
|
||||||
result = AnnotationType::TParam;
|
result = AnnotationType::TParam;
|
||||||
} else if (t.startsWith("rax ") || t.startsWith("eax ")) {
|
} else if ((mCurrentCmd) && (mCurrentCmd->command == "info") && (mCurrentCmd->params=="registers")) {
|
||||||
// Hack fix to catch register dump
|
// Hack fix to catch register dump
|
||||||
result = AnnotationType::TInfoReg;
|
result = AnnotationType::TInfoReg;
|
||||||
} else {
|
} else if ((mCurrentCmd) && (mCurrentCmd->command == "disas")) {
|
||||||
// Another hack to catch assembler
|
// Another hack to catch assembler
|
||||||
if (t.startsWith("Dump of assembler code for function "))
|
|
||||||
result = AnnotationType::TInfoAsm;
|
result = AnnotationType::TInfoAsm;
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
|
@ -750,9 +765,6 @@ QString DebugReader::getRemainingLine()
|
||||||
|
|
||||||
void DebugReader::handleDisassembly()
|
void DebugReader::handleDisassembly()
|
||||||
{
|
{
|
||||||
if (mDisassembly.isEmpty())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// Get info message
|
// Get info message
|
||||||
QString s = getNextLine();
|
QString s = getNextLine();
|
||||||
|
|
||||||
|
@ -762,7 +774,7 @@ void DebugReader::handleDisassembly()
|
||||||
s = getNextLine();
|
s = getNextLine();
|
||||||
|
|
||||||
// Add lines of disassembly
|
// Add lines of disassembly
|
||||||
while (!s.isEmpty() && (s != "End of assembler dump")) {
|
while (!s.isEmpty() && (s != "End of assembler dump.")) {
|
||||||
mDisassembly.append(s);
|
mDisassembly.append(s);
|
||||||
s = getNextLine();
|
s = getNextLine();
|
||||||
}
|
}
|
||||||
|
@ -941,7 +953,7 @@ void DebugReader::handleRegisters()
|
||||||
PRegister reg = std::make_shared<Register>();
|
PRegister reg = std::make_shared<Register>();
|
||||||
// Cut name from 1 to first space
|
// Cut name from 1 to first space
|
||||||
int x = s.indexOf(' ');
|
int x = s.indexOf(' ');
|
||||||
reg->name = s.mid(0,x-1);
|
reg->name = s.mid(0,x);
|
||||||
s.remove(0,x);
|
s.remove(0,x);
|
||||||
// Remove spaces
|
// Remove spaces
|
||||||
s = TrimLeft(s);
|
s = TrimLeft(s);
|
||||||
|
@ -950,14 +962,15 @@ void DebugReader::handleRegisters()
|
||||||
x = s.indexOf('\t');
|
x = s.indexOf('\t');
|
||||||
if (x<0)
|
if (x<0)
|
||||||
x = s.indexOf(' ');
|
x = s.indexOf(' ');
|
||||||
reg->hexValue = s.mid(0,x - 1);
|
reg->hexValue = s.mid(0,x);
|
||||||
s.remove(0,x); // delete tab too
|
s.remove(0,x); // delete tab too
|
||||||
s = TrimLeft(s);
|
s = TrimLeft(s);
|
||||||
|
|
||||||
// Remaining part contains decimal value
|
// Remaining part contains decimal value
|
||||||
reg->decValue = s;
|
reg->decValue = s;
|
||||||
|
|
||||||
mRegisters.append(reg);
|
if (!reg->name.trimmed().isEmpty())
|
||||||
|
mRegisters.append(reg);
|
||||||
s = getNextLine();
|
s = getNextLine();
|
||||||
if (s.isEmpty())
|
if (s.isEmpty())
|
||||||
break;
|
break;
|
||||||
|
@ -1350,7 +1363,11 @@ void DebugReader::run()
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (mStop) {
|
if (mStop) {
|
||||||
|
mProcess->closeReadChannel(QProcess::StandardOutput);
|
||||||
|
mProcess->closeReadChannel(QProcess::StandardError);
|
||||||
|
mProcess->closeWriteChannel();
|
||||||
mProcess->terminate();
|
mProcess->terminate();
|
||||||
|
mProcess->kill();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (errorOccurred)
|
if (errorOccurred)
|
||||||
|
@ -1722,3 +1739,75 @@ void WatchModel::notifyUpdated(PWatchVar var)
|
||||||
qDebug()<<"dataChanged"<<row<<":"<<var->text;
|
qDebug()<<"dataChanged"<<row<<":"<<var->text;
|
||||||
emit dataChanged(createIndex(row,0,var.get()),createIndex(row,0,var.get()));
|
emit dataChanged(createIndex(row,0,var.get()),createIndex(row,0,var.get()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
RegisterModel::RegisterModel(QObject *parent):QAbstractTableModel(parent)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
int RegisterModel::rowCount(const QModelIndex &parent) const
|
||||||
|
{
|
||||||
|
return mRegisters.count();
|
||||||
|
}
|
||||||
|
|
||||||
|
int RegisterModel::columnCount(const QModelIndex &parent) const
|
||||||
|
{
|
||||||
|
return 3;
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariant RegisterModel::data(const QModelIndex &index, int role) const
|
||||||
|
{
|
||||||
|
if (!index.isValid())
|
||||||
|
return QVariant();
|
||||||
|
if (index.row()<0 || index.row() >= static_cast<int>(mRegisters.size()))
|
||||||
|
return QVariant();
|
||||||
|
PRegister reg = mRegisters[index.row()];
|
||||||
|
if (!reg)
|
||||||
|
return QVariant();
|
||||||
|
switch (role) {
|
||||||
|
case Qt::DisplayRole:
|
||||||
|
switch (index.column()) {
|
||||||
|
case 0:
|
||||||
|
return reg->name;
|
||||||
|
case 1:
|
||||||
|
return reg->hexValue;
|
||||||
|
case 2:
|
||||||
|
return reg->decValue;
|
||||||
|
default:
|
||||||
|
return QVariant();
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return QVariant();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
QVariant RegisterModel::headerData(int section, Qt::Orientation orientation, int role) const
|
||||||
|
{
|
||||||
|
if (orientation == Qt::Horizontal && role == Qt::DisplayRole) {
|
||||||
|
switch(section) {
|
||||||
|
case 0:
|
||||||
|
return tr("Register");
|
||||||
|
case 1:
|
||||||
|
return tr("Value(Hex)");
|
||||||
|
case 2:
|
||||||
|
return tr("Value(Dec)");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return QVariant();
|
||||||
|
}
|
||||||
|
|
||||||
|
void RegisterModel::update(const QList<PRegister> ®s)
|
||||||
|
{
|
||||||
|
beginResetModel();
|
||||||
|
mRegisters.clear();
|
||||||
|
mRegisters.append(regs);
|
||||||
|
endResetModel();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void RegisterModel::clear()
|
||||||
|
{
|
||||||
|
beginResetModel();
|
||||||
|
mRegisters.clear();
|
||||||
|
endResetModel();
|
||||||
|
}
|
||||||
|
|
|
@ -82,6 +82,20 @@ struct Register {
|
||||||
|
|
||||||
using PRegister = std::shared_ptr<Register>;
|
using PRegister = std::shared_ptr<Register>;
|
||||||
|
|
||||||
|
class RegisterModel: public QAbstractTableModel {
|
||||||
|
Q_OBJECT
|
||||||
|
public:
|
||||||
|
explicit RegisterModel(QObject* parent = nullptr);
|
||||||
|
int rowCount(const QModelIndex &parent) const override;
|
||||||
|
int columnCount(const QModelIndex &parent) const override;
|
||||||
|
QVariant data(const QModelIndex &index, int role) const override;
|
||||||
|
QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
|
||||||
|
void update(const QList<PRegister>& regs);
|
||||||
|
void clear();
|
||||||
|
private:
|
||||||
|
QList<PRegister> mRegisters;
|
||||||
|
};
|
||||||
|
|
||||||
class BreakpointModel: public QAbstractTableModel {
|
class BreakpointModel: public QAbstractTableModel {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
// QAbstractItemModel interface
|
// QAbstractItemModel interface
|
||||||
|
@ -199,10 +213,10 @@ public:
|
||||||
|
|
||||||
WatchModel *watchModel() const;
|
WatchModel *watchModel() const;
|
||||||
|
|
||||||
|
RegisterModel *registerModel() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void stop();
|
void stop();
|
||||||
signals:
|
|
||||||
void evalReady(QString value);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void sendWatchCommand(PWatchVar var);
|
void sendWatchCommand(PWatchVar var);
|
||||||
|
@ -221,11 +235,12 @@ private slots:
|
||||||
private:
|
private:
|
||||||
bool mExecuting;
|
bool mExecuting;
|
||||||
bool mCommandChanged;
|
bool mCommandChanged;
|
||||||
BreakpointModel* mBreakpointModel;
|
BreakpointModel *mBreakpointModel;
|
||||||
bool mUseUTF8;
|
bool mUseUTF8;
|
||||||
BacktraceModel* mBacktraceModel;
|
BacktraceModel *mBacktraceModel;
|
||||||
WatchModel* mWatchModel;
|
WatchModel *mWatchModel;
|
||||||
DebugReader* mReader;
|
RegisterModel *mRegisterModel;
|
||||||
|
DebugReader *mReader;
|
||||||
int mLeftPageIndexBackup;
|
int mLeftPageIndexBackup;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -285,7 +300,7 @@ private:
|
||||||
void skipSpaces();
|
void skipSpaces();
|
||||||
void skipToAnnotation();
|
void skipToAnnotation();
|
||||||
private:
|
private:
|
||||||
Debugger* mDebugger;
|
Debugger *mDebugger;
|
||||||
QString mDebuggerPath;
|
QString mDebuggerPath;
|
||||||
QRecursiveMutex mCmdQueueMutex;
|
QRecursiveMutex mCmdQueueMutex;
|
||||||
QSemaphore mStartSemaphore;
|
QSemaphore mStartSemaphore;
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include <iconv.h>
|
#include <iconv.h>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
#include "settings.h"
|
||||||
|
|
||||||
EditorList::EditorList(QTabWidget* leftPageWidget,
|
EditorList::EditorList(QTabWidget* leftPageWidget,
|
||||||
QTabWidget* rightPageWidget,
|
QTabWidget* rightPageWidget,
|
||||||
|
@ -86,7 +87,11 @@ bool EditorList::closeEditor(Editor* editor, bool transferFocus, bool force) {
|
||||||
//todo: activate & focus the previous editor
|
//todo: activate & focus the previous editor
|
||||||
}
|
}
|
||||||
|
|
||||||
delete editor;
|
if (pSettings->history().addToOpenedFiles(editor->filename())) {
|
||||||
|
pMainWindow->rebuildOpenedFileHisotryMenu();
|
||||||
|
}
|
||||||
|
|
||||||
|
editor->deleteLater();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -70,6 +70,7 @@ int main(int argc, char *argv[])
|
||||||
settings->editor().load();
|
settings->editor().load();
|
||||||
settings->executor().load();
|
settings->executor().load();
|
||||||
settings->debugger().load();
|
settings->debugger().load();
|
||||||
|
settings->history().load();
|
||||||
|
|
||||||
//Translation must be loaded after language setting is loaded
|
//Translation must be loaded after language setting is loaded
|
||||||
QTranslator trans;
|
QTranslator trans;
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
#include "settings.h"
|
#include "settings.h"
|
||||||
#include "qsynedit/Constants.h"
|
#include "qsynedit/Constants.h"
|
||||||
#include "debugger.h"
|
#include "debugger.h"
|
||||||
#include "cpudialog.h"
|
#include "widgets/cpudialog.h"
|
||||||
|
|
||||||
|
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
|
@ -87,7 +87,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
ui->actionEncode_in_ANSI->setCheckable(true);
|
ui->actionEncode_in_ANSI->setCheckable(true);
|
||||||
ui->actionEncode_in_UTF_8->setCheckable(true);
|
ui->actionEncode_in_UTF_8->setCheckable(true);
|
||||||
|
|
||||||
mCPUDialog = new CPUDialog(this);
|
mCPUDialog = nullptr;
|
||||||
|
|
||||||
updateEditorActions();
|
updateEditorActions();
|
||||||
applySettings();
|
applySettings();
|
||||||
|
@ -95,6 +95,7 @@ MainWindow::MainWindow(QWidget *parent)
|
||||||
openCloseMessageSheet(false);
|
openCloseMessageSheet(false);
|
||||||
mPreviousHeight = 250;
|
mPreviousHeight = 250;
|
||||||
|
|
||||||
|
connect(ui->debugConsole,&QConsole::commandInput,this,&MainWindow::onDebugCommandInput);
|
||||||
}
|
}
|
||||||
|
|
||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
|
@ -227,6 +228,7 @@ void MainWindow::applySettings()
|
||||||
QApplication * app = dynamic_cast<QApplication*>(QApplication::instance());
|
QApplication * app = dynamic_cast<QApplication*>(QApplication::instance());
|
||||||
app->setFont(font);
|
app->setFont(font);
|
||||||
this->setFont(font);
|
this->setFont(font);
|
||||||
|
updateDebuggerSettings();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::removeActiveBreakpoints()
|
void MainWindow::removeActiveBreakpoints()
|
||||||
|
@ -322,6 +324,12 @@ void MainWindow::changeDebugOutputLastline(const QString &test)
|
||||||
ui->debugConsole->changeLastLine(test);
|
ui->debugConsole->changeLastLine(test);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::updateDebugEval(const QString &value)
|
||||||
|
{
|
||||||
|
ui->txtEvalOutput->clear();
|
||||||
|
ui->txtEvalOutput->appendPlainText(value);
|
||||||
|
}
|
||||||
|
|
||||||
QPlainTextEdit *MainWindow::txtLocals()
|
QPlainTextEdit *MainWindow::txtLocals()
|
||||||
{
|
{
|
||||||
return ui->txtLocals;
|
return ui->txtLocals;
|
||||||
|
@ -403,6 +411,13 @@ void MainWindow::updateCompilerSet()
|
||||||
mCompilerSet->setCurrentIndex(index);
|
mCompilerSet->setCurrentIndex(index);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::updateDebuggerSettings()
|
||||||
|
{
|
||||||
|
ui->debugConsole->setFont(QFont(
|
||||||
|
pSettings->debugger().fontName(),
|
||||||
|
pSettings->debugger().fontSize()));
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::checkSyntaxInBack(Editor *e)
|
void MainWindow::checkSyntaxInBack(Editor *e)
|
||||||
{
|
{
|
||||||
if (e==nullptr)
|
if (e==nullptr)
|
||||||
|
@ -1059,6 +1074,20 @@ void MainWindow::onRunFinished()
|
||||||
updateAppTitle();
|
updateAppTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::cleanUpCPUDialog()
|
||||||
|
{
|
||||||
|
CPUDialog* ptr=mCPUDialog;
|
||||||
|
mCPUDialog=nullptr;
|
||||||
|
ptr->deleteLater();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::onDebugCommandInput(const QString &command)
|
||||||
|
{
|
||||||
|
if (mDebugger->executing()) {
|
||||||
|
mDebugger->sendCommand(command,"");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void MainWindow::on_actionCompile_triggered()
|
void MainWindow::on_actionCompile_triggered()
|
||||||
{
|
{
|
||||||
mCompileSuccessionTask.reset();
|
mCompileSuccessionTask.reset();
|
||||||
|
@ -1331,8 +1360,6 @@ void MainWindow::on_actionStep_Over_triggered()
|
||||||
mDebugger->invalidateAllVars();
|
mDebugger->invalidateAllVars();
|
||||||
mDebugger->sendCommand("next", "");
|
mDebugger->sendCommand("next", "");
|
||||||
mDebugger->updateDebugInfo();
|
mDebugger->updateDebugInfo();
|
||||||
// if (CPUForm) then
|
|
||||||
// CPUForm.UpdateInfo;
|
|
||||||
mDebugger->refreshWatchVars();
|
mDebugger->refreshWatchVars();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1344,8 +1371,6 @@ void MainWindow::on_actionStep_Into_triggered()
|
||||||
mDebugger->invalidateAllVars();
|
mDebugger->invalidateAllVars();
|
||||||
mDebugger->sendCommand("step", "");
|
mDebugger->sendCommand("step", "");
|
||||||
mDebugger->updateDebugInfo();
|
mDebugger->updateDebugInfo();
|
||||||
// if (CPUForm) then
|
|
||||||
// CPUForm.UpdateInfo;
|
|
||||||
mDebugger->refreshWatchVars();
|
mDebugger->refreshWatchVars();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1358,8 +1383,6 @@ void MainWindow::on_actionStep_Out_triggered()
|
||||||
mDebugger->invalidateAllVars();
|
mDebugger->invalidateAllVars();
|
||||||
mDebugger->sendCommand("finish", "");
|
mDebugger->sendCommand("finish", "");
|
||||||
mDebugger->updateDebugInfo();
|
mDebugger->updateDebugInfo();
|
||||||
// if (CPUForm) then
|
|
||||||
// CPUForm.UpdateInfo;
|
|
||||||
mDebugger->refreshWatchVars();
|
mDebugger->refreshWatchVars();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1375,8 +1398,6 @@ void MainWindow::on_actionRun_To_Cursor_triggered()
|
||||||
mDebugger->sendCommand("tbreak", QString(" %1").arg(e->caretY()));
|
mDebugger->sendCommand("tbreak", QString(" %1").arg(e->caretY()));
|
||||||
mDebugger->sendCommand("continue", "");
|
mDebugger->sendCommand("continue", "");
|
||||||
mDebugger->updateDebugInfo();
|
mDebugger->updateDebugInfo();
|
||||||
// if (CPUForm) then
|
|
||||||
// CPUForm.UpdateInfo;
|
|
||||||
mDebugger->refreshWatchVars();
|
mDebugger->refreshWatchVars();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1390,8 +1411,6 @@ void MainWindow::on_actionContinue_triggered()
|
||||||
mDebugger->invalidateAllVars();
|
mDebugger->invalidateAllVars();
|
||||||
mDebugger->sendCommand("continue", "");
|
mDebugger->sendCommand("continue", "");
|
||||||
mDebugger->updateDebugInfo();
|
mDebugger->updateDebugInfo();
|
||||||
// if (CPUForm) then
|
|
||||||
// CPUForm.UpdateInfo;
|
|
||||||
mDebugger->refreshWatchVars();
|
mDebugger->refreshWatchVars();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1420,3 +1439,20 @@ void MainWindow::on_actionAdd_Watch_triggered()
|
||||||
mDebugger->addWatchVar(s);
|
mDebugger->addWatchVar(s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_actionView_CPU_Window_triggered()
|
||||||
|
{
|
||||||
|
if (mCPUDialog==nullptr) {
|
||||||
|
mCPUDialog = new CPUDialog(this);
|
||||||
|
connect(mCPUDialog, &CPUDialog::closed, this, &MainWindow::cleanUpCPUDialog);
|
||||||
|
}
|
||||||
|
mCPUDialog->show();
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::on_txtEvaludate_returnPressed()
|
||||||
|
{
|
||||||
|
QString s=ui->txtEvaludate->text().trimmed();
|
||||||
|
if (!s.isEmpty()) {
|
||||||
|
mDebugger->sendCommand("print",s,false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -52,6 +52,7 @@ public:
|
||||||
void updateCompileActions();
|
void updateCompileActions();
|
||||||
void updateEditorColorSchemes();
|
void updateEditorColorSchemes();
|
||||||
void updateCompilerSet();
|
void updateCompilerSet();
|
||||||
|
void updateDebuggerSettings();
|
||||||
void checkSyntaxInBack(Editor* e);
|
void checkSyntaxInBack(Editor* e);
|
||||||
bool compile(bool rebuild=false);
|
bool compile(bool rebuild=false);
|
||||||
void runExecutable(const QString& exeName, const QString& filename=QString());
|
void runExecutable(const QString& exeName, const QString& filename=QString());
|
||||||
|
@ -65,6 +66,7 @@ public:
|
||||||
void updateAppTitle();
|
void updateAppTitle();
|
||||||
void addDebugOutput(const QString& text);
|
void addDebugOutput(const QString& text);
|
||||||
void changeDebugOutputLastline(const QString& text);
|
void changeDebugOutputLastline(const QString& text);
|
||||||
|
void updateDebugEval(const QString& value);
|
||||||
|
|
||||||
QPlainTextEdit* txtLocals();
|
QPlainTextEdit* txtLocals();
|
||||||
|
|
||||||
|
@ -159,6 +161,10 @@ private slots:
|
||||||
|
|
||||||
void on_actionAdd_Watch_triggered();
|
void on_actionAdd_Watch_triggered();
|
||||||
|
|
||||||
|
void on_actionView_CPU_Window_triggered();
|
||||||
|
|
||||||
|
void on_txtEvaludate_returnPressed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void onCompileLog(const QString& msg);
|
void onCompileLog(const QString& msg);
|
||||||
void onCompileIssue(PCompileIssue issue);
|
void onCompileIssue(PCompileIssue issue);
|
||||||
|
@ -166,6 +172,8 @@ public slots:
|
||||||
void onCompileErrorOccured(const QString& reason);
|
void onCompileErrorOccured(const QString& reason);
|
||||||
void onRunErrorOccured(const QString& reason);
|
void onRunErrorOccured(const QString& reason);
|
||||||
void onRunFinished();
|
void onRunFinished();
|
||||||
|
void cleanUpCPUDialog();
|
||||||
|
void onDebugCommandInput(const QString& command);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void setupActions();
|
void setupActions();
|
||||||
|
|
|
@ -393,14 +393,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="cbEvaluate">
|
<widget class="QLineEdit" name="txtEvaludate"/>
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -415,8 +408,11 @@
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QTabWidget" name="debugViews">
|
<widget class="QTabWidget" name="debugViews">
|
||||||
|
<property name="tabPosition">
|
||||||
|
<enum>QTabWidget::North</enum>
|
||||||
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>3</number>
|
<number>2</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabDebugConsole">
|
<widget class="QWidget" name="tabDebugConsole">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -465,7 +461,11 @@
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTableView" name="tblStackTrace"/>
|
<widget class="QTableView" name="tblStackTrace">
|
||||||
|
<property name="textElideMode">
|
||||||
|
<enum>Qt::ElideNone</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -487,7 +487,11 @@
|
||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTableView" name="tblBreakpoints"/>
|
<widget class="QTableView" name="tblBreakpoints">
|
||||||
|
<property name="textElideMode">
|
||||||
|
<enum>Qt::ElideNone</enum>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
@ -584,7 +588,9 @@
|
||||||
<addaction name="actionRun_To_Cursor"/>
|
<addaction name="actionRun_To_Cursor"/>
|
||||||
<addaction name="actionContinue"/>
|
<addaction name="actionContinue"/>
|
||||||
<addaction name="actionStop_Execution"/>
|
<addaction name="actionStop_Execution"/>
|
||||||
|
<addaction name="separator"/>
|
||||||
<addaction name="actionAdd_Watch"/>
|
<addaction name="actionAdd_Watch"/>
|
||||||
|
<addaction name="actionView_CPU_Window"/>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QMenu" name="menuEdit">
|
<widget class="QMenu" name="menuEdit">
|
||||||
<property name="title">
|
<property name="title">
|
||||||
|
@ -1067,6 +1073,11 @@
|
||||||
<string>Add Watch...</string>
|
<string>Add Watch...</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionView_CPU_Window">
|
||||||
|
<property name="text">
|
||||||
|
<string>View CPU Window...</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
|
@ -98,6 +98,11 @@ QString Settings::filename() const
|
||||||
return mFilename;
|
return mFilename;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Settings::History& Settings::history()
|
||||||
|
{
|
||||||
|
return mHistory;
|
||||||
|
}
|
||||||
|
|
||||||
Settings::Debugger& Settings::debugger()
|
Settings::Debugger& Settings::debugger()
|
||||||
{
|
{
|
||||||
return mDebugger;
|
return mDebugger;
|
||||||
|
@ -187,6 +192,11 @@ int Settings::_Base::intValue(const QString &key, int defaultValue)
|
||||||
return value(key,defaultValue).toInt();
|
return value(key,defaultValue).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QStringList Settings::_Base::stringListValue(const QString &key, const QStringList &defaultValue)
|
||||||
|
{
|
||||||
|
return value(key,defaultValue).toStringList();
|
||||||
|
}
|
||||||
|
|
||||||
QColor Settings::_Base::colorValue(const QString &key, const QColor& defaultValue)
|
QColor Settings::_Base::colorValue(const QString &key, const QColor& defaultValue)
|
||||||
{
|
{
|
||||||
return value(key,defaultValue).value<QColor>();
|
return value(key,defaultValue).value<QColor>();
|
||||||
|
@ -2275,14 +2285,93 @@ void Settings::Debugger::setShowAnnotations(bool showAnnotations)
|
||||||
mShowAnnotations = showAnnotations;
|
mShowAnnotations = showAnnotations;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Settings::Debugger::fontName() const
|
||||||
|
{
|
||||||
|
return mFontName;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::Debugger::setFontName(const QString &fontName)
|
||||||
|
{
|
||||||
|
mFontName = fontName;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Settings::Debugger::useIntelStyle() const
|
||||||
|
{
|
||||||
|
return mUseIntelStyle;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::Debugger::setUseIntelStyle(bool useIntelStyle)
|
||||||
|
{
|
||||||
|
mUseIntelStyle = useIntelStyle;
|
||||||
|
}
|
||||||
|
|
||||||
|
int Settings::Debugger::fontSize() const
|
||||||
|
{
|
||||||
|
return mFontSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::Debugger::setFontSize(int fontSize)
|
||||||
|
{
|
||||||
|
mFontSize = fontSize;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Settings::Debugger::onlyShowMono() const
|
||||||
|
{
|
||||||
|
return mOnlyShowMono;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::Debugger::setOnlyShowMono(bool onlyShowMono)
|
||||||
|
{
|
||||||
|
mOnlyShowMono = onlyShowMono;
|
||||||
|
}
|
||||||
|
|
||||||
void Settings::Debugger::doSave()
|
void Settings::Debugger::doSave()
|
||||||
{
|
{
|
||||||
saveValue("show_command_log", mShowCommandLog);
|
saveValue("show_command_log", mShowCommandLog);
|
||||||
saveValue("show_annotations", mShowAnnotations);
|
saveValue("show_annotations", mShowAnnotations);
|
||||||
|
saveValue("font_name",mFontName);
|
||||||
|
saveValue("only_show_mono",mOnlyShowMono);
|
||||||
|
saveValue("font_size",mFontSize);
|
||||||
|
boolValue("use_intel_style",mUseIntelStyle);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Settings::Debugger::doLoad()
|
void Settings::Debugger::doLoad()
|
||||||
{
|
{
|
||||||
mShowCommandLog = boolValue("show_command_log",true);
|
mShowCommandLog = boolValue("show_command_log",true);
|
||||||
mShowAnnotations = boolValue("show_annotations",true);
|
mShowAnnotations = boolValue("show_annotations",false);
|
||||||
|
mFontName = stringValue("font_name","Consolas");
|
||||||
|
mOnlyShowMono = boolValue("only_show_mono",true);
|
||||||
|
mFontSize = intValue("font_size",10);
|
||||||
|
mUseIntelStyle = boolValue("use_intel_style",true);
|
||||||
|
}
|
||||||
|
|
||||||
|
Settings::History::History(Settings *settings):_Base(settings, SETTING_HISTORY)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Settings::History::addToOpenedFiles(const QString &filename)
|
||||||
|
{
|
||||||
|
if (!QFile(filename).exists())
|
||||||
|
return false;
|
||||||
|
if (openedFiles().indexOf(filename)>=0)
|
||||||
|
return false;
|
||||||
|
if (openedFiles().size()>=15) {
|
||||||
|
openedFiles().pop_front();
|
||||||
|
}
|
||||||
|
openedFiles().append(filename);
|
||||||
|
return true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::History::doSave()
|
||||||
|
{
|
||||||
|
saveValue("opened_files", mOpenedFiles);
|
||||||
|
saveValue("opened_projects", mOpenedProjects);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Settings::History::doLoad()
|
||||||
|
{
|
||||||
|
mOpenedFiles = stringListValue("opened_files");
|
||||||
|
mOpenedProjects =stringListValue("opened_projects");
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#define SETTING_ENVIRONMENT "Environment"
|
#define SETTING_ENVIRONMENT "Environment"
|
||||||
#define SETTING_EXECUTOR "Executor"
|
#define SETTING_EXECUTOR "Executor"
|
||||||
#define SETTING_DEBUGGER "Debugger"
|
#define SETTING_DEBUGGER "Debugger"
|
||||||
|
#define SETTING_HISTORY "HISTORY"
|
||||||
#define SETTING_COMPILTER_SETS "CompilerSets"
|
#define SETTING_COMPILTER_SETS "CompilerSets"
|
||||||
#define SETTING_COMPILTER_SETS_DEFAULT_INDEX "defaultIndex"
|
#define SETTING_COMPILTER_SETS_DEFAULT_INDEX "defaultIndex"
|
||||||
#define SETTING_COMPILTER_SETS_COUNT "count"
|
#define SETTING_COMPILTER_SETS_COUNT "count"
|
||||||
|
@ -57,6 +58,7 @@ private:
|
||||||
QVariant value(const QString &key, const QVariant& defaultValue);
|
QVariant value(const QString &key, const QVariant& defaultValue);
|
||||||
bool boolValue(const QString &key, bool defaultValue);
|
bool boolValue(const QString &key, bool defaultValue);
|
||||||
int intValue(const QString &key, int defaultValue);
|
int intValue(const QString &key, int defaultValue);
|
||||||
|
QStringList stringListValue(const QString &key, const QStringList& defaultValue=QStringList());
|
||||||
QColor colorValue(const QString &key, const QColor& defaultValue);
|
QColor colorValue(const QString &key, const QColor& defaultValue);
|
||||||
QString stringValue(const QString &key, const QString& defaultValue);
|
QString stringValue(const QString &key, const QString& defaultValue);
|
||||||
void save();
|
void save();
|
||||||
|
@ -369,6 +371,23 @@ public:
|
||||||
void doLoad() override;
|
void doLoad() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
class History: public _Base {
|
||||||
|
public:
|
||||||
|
explicit History(Settings *settings);
|
||||||
|
|
||||||
|
QStringList& openedFiles();
|
||||||
|
QStringList& openedProjects();
|
||||||
|
bool addToOpenedFiles(const QString& filename);
|
||||||
|
private:
|
||||||
|
QStringList mOpenedFiles;
|
||||||
|
QStringList mOpenedProjects;
|
||||||
|
|
||||||
|
// _Base interface
|
||||||
|
protected:
|
||||||
|
void doSave() override;
|
||||||
|
void doLoad() override;
|
||||||
|
};
|
||||||
|
|
||||||
class Executor: public _Base {
|
class Executor: public _Base {
|
||||||
public:
|
public:
|
||||||
explicit Executor(Settings * settings);
|
explicit Executor(Settings * settings);
|
||||||
|
@ -398,9 +417,25 @@ public:
|
||||||
bool showAnnotations() const;
|
bool showAnnotations() const;
|
||||||
void setShowAnnotations(bool showAnnotations);
|
void setShowAnnotations(bool showAnnotations);
|
||||||
|
|
||||||
|
bool onlyShowMono() const;
|
||||||
|
void setOnlyShowMono(bool onlyShowMono);
|
||||||
|
|
||||||
|
int fontSize() const;
|
||||||
|
void setFontSize(int fontSize);
|
||||||
|
|
||||||
|
bool useIntelStyle() const;
|
||||||
|
void setUseIntelStyle(bool useIntelStyle);
|
||||||
|
|
||||||
|
QString fontName() const;
|
||||||
|
void setFontName(const QString &fontName);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool mShowCommandLog;
|
bool mShowCommandLog;
|
||||||
bool mShowAnnotations;
|
bool mShowAnnotations;
|
||||||
|
QString mFontName;
|
||||||
|
bool mOnlyShowMono;
|
||||||
|
int mFontSize;
|
||||||
|
bool mUseIntelStyle;
|
||||||
|
|
||||||
// _Base interface
|
// _Base interface
|
||||||
protected:
|
protected:
|
||||||
|
@ -585,9 +620,9 @@ public:
|
||||||
Environment& environment();
|
Environment& environment();
|
||||||
Executor& executor();
|
Executor& executor();
|
||||||
Debugger& debugger();
|
Debugger& debugger();
|
||||||
|
History& history();
|
||||||
QString filename() const;
|
QString filename() const;
|
||||||
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString mFilename;
|
QString mFilename;
|
||||||
QSettings mSettings;
|
QSettings mSettings;
|
||||||
|
@ -597,6 +632,7 @@ private:
|
||||||
CompilerSets mCompilerSets;
|
CompilerSets mCompilerSets;
|
||||||
Executor mExecutor;
|
Executor mExecutor;
|
||||||
Debugger mDebugger;
|
Debugger mDebugger;
|
||||||
|
History mHistory;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
#include "debuggeneralwidget.h"
|
||||||
|
#include "ui_debuggeneralwidget.h"
|
||||||
|
#include "../settings.h"
|
||||||
|
#include "../mainwindow.h"
|
||||||
|
|
||||||
|
DebugGeneralWidget::DebugGeneralWidget(const QString& name, const QString& group, QWidget *parent) :
|
||||||
|
SettingsWidget(name,group,parent),
|
||||||
|
ui(new Ui::DebugGeneralWidget)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugGeneralWidget::~DebugGeneralWidget()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebugGeneralWidget::doLoad()
|
||||||
|
{
|
||||||
|
ui->chkOnlyMono->setChecked(pSettings->debugger().onlyShowMono());
|
||||||
|
ui->cbFont->setCurrentFont(QFont(pSettings->debugger().fontName()));
|
||||||
|
ui->sbFontSize->setValue(pSettings->debugger().fontSize());
|
||||||
|
ui->chkShowLog->setChecked(pSettings->debugger().showCommandLog());
|
||||||
|
ui->chkShowFullAnnotation->setChecked(pSettings->debugger().showAnnotations());
|
||||||
|
if (pSettings->debugger().useIntelStyle()) {
|
||||||
|
ui->rbIntel->setChecked(true);
|
||||||
|
} else {
|
||||||
|
ui->rbATT->setChecked(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebugGeneralWidget::doSave()
|
||||||
|
{
|
||||||
|
pSettings->debugger().setOnlyShowMono(ui->chkOnlyMono->isChecked());
|
||||||
|
pSettings->debugger().setFontName(ui->cbFont->currentFont().family());
|
||||||
|
pSettings->debugger().setFontSize(ui->sbFontSize->value());
|
||||||
|
pSettings->debugger().setShowCommandLog(ui->chkShowLog->isChecked());
|
||||||
|
pSettings->debugger().setShowAnnotations(ui->chkShowFullAnnotation->isChecked());
|
||||||
|
pSettings->debugger().setUseIntelStyle(ui->rbIntel->isChecked());
|
||||||
|
|
||||||
|
pSettings->debugger().save();
|
||||||
|
pMainWindow->updateDebuggerSettings();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DebugGeneralWidget::on_chkOnlyMono_stateChanged(int)
|
||||||
|
{
|
||||||
|
if (ui->chkOnlyMono->isChecked()) {
|
||||||
|
ui->cbFont->setFontFilters(QFontComboBox::FontFilter::MonospacedFonts);
|
||||||
|
} else {
|
||||||
|
ui->cbFont->setFontFilters(QFontComboBox::FontFilter::AllFonts);
|
||||||
|
}
|
||||||
|
}
|
|
@ -0,0 +1,30 @@
|
||||||
|
#ifndef DEBUGGENERALWIDGET_H
|
||||||
|
#define DEBUGGENERALWIDGET_H
|
||||||
|
|
||||||
|
#include <QWidget>
|
||||||
|
#include "settingswidget.h"
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class DebugGeneralWidget;
|
||||||
|
}
|
||||||
|
|
||||||
|
class DebugGeneralWidget : public SettingsWidget
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit DebugGeneralWidget(const QString& name, const QString& group, QWidget *parent = nullptr);
|
||||||
|
~DebugGeneralWidget();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Ui::DebugGeneralWidget *ui;
|
||||||
|
|
||||||
|
// SettingsWidget interface
|
||||||
|
protected:
|
||||||
|
void doLoad() override;
|
||||||
|
void doSave() override;
|
||||||
|
private slots:
|
||||||
|
void on_chkOnlyMono_stateChanged(int arg1);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // DEBUGGENERALWIDGET_H
|
|
@ -0,0 +1,202 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>DebugGeneralWidget</class>
|
||||||
|
<widget class="QWidget" name="DebugGeneralWidget">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>677</width>
|
||||||
|
<height>563</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox">
|
||||||
|
<property name="title">
|
||||||
|
<string>Debug Console</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label">
|
||||||
|
<property name="text">
|
||||||
|
<string>Font:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QFontComboBox" name="cbFont"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkOnlyMono">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show only monospaced fonts</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QWidget" name="widget_2" native="true">
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>0</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QLabel" name="label_2">
|
||||||
|
<property name="text">
|
||||||
|
<string>Size:</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QSpinBox" name="sbFontSize"/>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="horizontalSpacer_2">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>40</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkShowLog">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show debug logs in the debug console</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QCheckBox" name="chkShowFullAnnotation">
|
||||||
|
<property name="text">
|
||||||
|
<string>Show full gdb annotations</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QGroupBox" name="groupBox_2">
|
||||||
|
<property name="title">
|
||||||
|
<string>Disassembly Coding Style</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
|
<property name="leftMargin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
|
<number>11</number>
|
||||||
|
</property>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbIntel">
|
||||||
|
<property name="text">
|
||||||
|
<string>Intel</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">grpCPUDisassembly</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<widget class="QRadioButton" name="rbATT">
|
||||||
|
<property name="text">
|
||||||
|
<string>AT&&T</string>
|
||||||
|
</property>
|
||||||
|
<attribute name="buttonGroup">
|
||||||
|
<string notr="true">grpCPUDisassembly</string>
|
||||||
|
</attribute>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item>
|
||||||
|
<spacer name="verticalSpacer">
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Qt::Vertical</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint" stdset="0">
|
||||||
|
<size>
|
||||||
|
<width>20</width>
|
||||||
|
<height>40</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
<buttongroups>
|
||||||
|
<buttongroup name="grpCPUDisassembly"/>
|
||||||
|
</buttongroups>
|
||||||
|
</ui>
|
|
@ -10,6 +10,7 @@
|
||||||
#include "editorsymbolcompletionwidget.h"
|
#include "editorsymbolcompletionwidget.h"
|
||||||
#include "environmentappearencewidget.h"
|
#include "environmentappearencewidget.h"
|
||||||
#include "executorgeneralwidget.h"
|
#include "executorgeneralwidget.h"
|
||||||
|
#include "debuggeneralwidget.h"
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
#include <QModelIndex>
|
#include <QModelIndex>
|
||||||
|
@ -63,6 +64,10 @@ SettingsDialog::SettingsDialog(QWidget *parent) :
|
||||||
pExecutorGeneralWidget->init();
|
pExecutorGeneralWidget->init();
|
||||||
addWidget(pExecutorGeneralWidget);
|
addWidget(pExecutorGeneralWidget);
|
||||||
|
|
||||||
|
pDebugGeneralWidget = new DebugGeneralWidget(tr("General"),tr("Debugger"));
|
||||||
|
pDebugGeneralWidget->init();
|
||||||
|
addWidget(pDebugGeneralWidget);
|
||||||
|
|
||||||
ui->widgetsView->expandAll();
|
ui->widgetsView->expandAll();
|
||||||
//select the first widget of the first group
|
//select the first widget of the first group
|
||||||
auto groupIndex = ui->widgetsView->model()->index(0,0);
|
auto groupIndex = ui->widgetsView->model()->index(0,0);
|
||||||
|
|
|
@ -19,6 +19,7 @@ class EditorColorSchemeWidget;
|
||||||
class EditorSyntaxCheckWidget;
|
class EditorSyntaxCheckWidget;
|
||||||
class EnvironmentAppearenceWidget;
|
class EnvironmentAppearenceWidget;
|
||||||
class ExecutorGeneralWidget;
|
class ExecutorGeneralWidget;
|
||||||
|
class DebugGeneralWidget;
|
||||||
class SettingsWidget;
|
class SettingsWidget;
|
||||||
class SettingsDialog : public QDialog
|
class SettingsDialog : public QDialog
|
||||||
{
|
{
|
||||||
|
@ -48,15 +49,16 @@ private:
|
||||||
QList<SettingsWidget*> mSettingWidgets;
|
QList<SettingsWidget*> mSettingWidgets;
|
||||||
QStandardItemModel model;
|
QStandardItemModel model;
|
||||||
|
|
||||||
CompilerSetOptionWidget* pCompilerSetOptionWidget;
|
CompilerSetOptionWidget *pCompilerSetOptionWidget;
|
||||||
EditorGeneralWidget* pEditorGeneralWidget;
|
EditorGeneralWidget *pEditorGeneralWidget;
|
||||||
EditorFontWidget* pEditorFontWidget;
|
EditorFontWidget *pEditorFontWidget;
|
||||||
EditorClipboardWidget *pEditorClipboardWidget;
|
EditorClipboardWidget *pEditorClipboardWidget;
|
||||||
EditorColorSchemeWidget *pEditorColorSchemeWidget;
|
EditorColorSchemeWidget *pEditorColorSchemeWidget;
|
||||||
EnvironmentAppearenceWidget* pEnvironmentAppearenceWidget;
|
EnvironmentAppearenceWidget *pEnvironmentAppearenceWidget;
|
||||||
EditorSymbolCompletionWidget* pEditorSymbolCompletionWidget;
|
EditorSymbolCompletionWidget *pEditorSymbolCompletionWidget;
|
||||||
EditorSyntaxCheckWidget* pEditorSyntaxCheckWidget;
|
EditorSyntaxCheckWidget *pEditorSyntaxCheckWidget;
|
||||||
ExecutorGeneralWidget * pExecutorGeneralWidget;
|
ExecutorGeneralWidget *pExecutorGeneralWidget;
|
||||||
|
DebugGeneralWidget *pDebugGeneralWidget;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SETTINGSDIALOG_H
|
#endif // SETTINGSDIALOG_H
|
||||||
|
|
|
@ -0,0 +1,83 @@
|
||||||
|
#include "cpudialog.h"
|
||||||
|
#include "ui_cpudialog.h"
|
||||||
|
#include "../HighlighterManager.h"
|
||||||
|
#include "../mainwindow.h"
|
||||||
|
#include "../debugger.h"
|
||||||
|
#include "../settings.h"
|
||||||
|
|
||||||
|
CPUDialog::CPUDialog(QWidget *parent) :
|
||||||
|
QDialog(parent),
|
||||||
|
ui(new Ui::CPUDialog)
|
||||||
|
{
|
||||||
|
ui->setupUi(this);
|
||||||
|
ui->txtCode->setHighlighter(highlighterManager.getAsmHighlighter());
|
||||||
|
highlighterManager.applyColorScheme(ui->txtCode->highlighter(),
|
||||||
|
pSettings->editor().colorScheme());
|
||||||
|
ui->lstRegister->setModel(pMainWindow->debugger()->registerModel());
|
||||||
|
|
||||||
|
ui->rdIntel->setChecked(true);
|
||||||
|
// RadioATT.Checked := devData.UseATTSyntax;
|
||||||
|
// RadioIntel.Checked := not devData.UseATTSyntax;
|
||||||
|
|
||||||
|
// fRegisters := TList.Create;
|
||||||
|
// fAssembler := TStringList.Create;
|
||||||
|
updateInfo();
|
||||||
|
}
|
||||||
|
|
||||||
|
CPUDialog::~CPUDialog()
|
||||||
|
{
|
||||||
|
delete ui;
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPUDialog::updateInfo()
|
||||||
|
{
|
||||||
|
if (pMainWindow->debugger()->executing()) {
|
||||||
|
// Load the registers..
|
||||||
|
sendSyntaxCommand();
|
||||||
|
pMainWindow->debugger()->sendCommand("info", "registers");
|
||||||
|
pMainWindow->debugger()->sendCommand("disas", "");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPUDialog::setDisassembly(const QStringList &lines)
|
||||||
|
{
|
||||||
|
if (lines.size()>0) {
|
||||||
|
ui->txtFunctionName->setText(lines[0]);
|
||||||
|
}
|
||||||
|
int activeLine = -1;
|
||||||
|
for (int i=1;i<lines.size();i++) {
|
||||||
|
QString line = lines[i];
|
||||||
|
if (line.startsWith("=>")) {
|
||||||
|
activeLine = i;
|
||||||
|
}
|
||||||
|
ui->txtCode->lines()->add(line);
|
||||||
|
}
|
||||||
|
if (activeLine!=-1)
|
||||||
|
ui->txtCode->setCaretXY(BufferCoord{1,activeLine});
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPUDialog::sendSyntaxCommand()
|
||||||
|
{
|
||||||
|
// Set disassembly flavor
|
||||||
|
if (ui->rdIntel->isChecked()) {
|
||||||
|
pMainWindow->debugger()->sendCommand("set disassembly-flavor", "intel");
|
||||||
|
} else {
|
||||||
|
pMainWindow->debugger()->sendCommand("set disassembly-flavor", "att");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPUDialog::closeEvent(QCloseEvent *event)
|
||||||
|
{
|
||||||
|
QDialog::closeEvent(event);
|
||||||
|
emit closed();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPUDialog::on_rdIntel_toggled(bool)
|
||||||
|
{
|
||||||
|
sendSyntaxCommand();
|
||||||
|
}
|
||||||
|
|
||||||
|
void CPUDialog::on_rdATT_toggled(bool)
|
||||||
|
{
|
||||||
|
sendSyntaxCommand();
|
||||||
|
}
|
|
@ -0,0 +1,33 @@
|
||||||
|
#ifndef CPUDIALOG_H
|
||||||
|
#define CPUDIALOG_H
|
||||||
|
|
||||||
|
#include <QDialog>
|
||||||
|
|
||||||
|
namespace Ui {
|
||||||
|
class CPUDialog;
|
||||||
|
}
|
||||||
|
|
||||||
|
class CPUDialog : public QDialog
|
||||||
|
{
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
public:
|
||||||
|
explicit CPUDialog(QWidget *parent = nullptr);
|
||||||
|
~CPUDialog();
|
||||||
|
void updateInfo();
|
||||||
|
void setDisassembly(const QStringList& lines);
|
||||||
|
signals:
|
||||||
|
void closed();
|
||||||
|
private:
|
||||||
|
void sendSyntaxCommand();
|
||||||
|
private:
|
||||||
|
Ui::CPUDialog *ui;
|
||||||
|
// QWidget interface
|
||||||
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *event) override;
|
||||||
|
private slots:
|
||||||
|
void on_rdIntel_toggled(bool checked);
|
||||||
|
void on_rdATT_toggled(bool checked);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // CPUDIALOG_H
|
|
@ -11,7 +11,7 @@
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Dialog</string>
|
<string>CPU Info</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<property name="leftMargin">
|
<property name="leftMargin">
|
||||||
|
@ -28,12 +28,6 @@
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QSplitter" name="splitter">
|
<widget class="QSplitter" name="splitter">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
|
@ -86,7 +80,7 @@
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="txtCode">
|
<widget class="SynEdit" name="txtCode">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
|
@ -154,21 +148,26 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QTableWidget" name="tableRegister">
|
<widget class="QTableView" name="lstRegister">
|
||||||
<property name="sizePolicy">
|
<property name="editTriggers">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="columnCount">
|
<property name="textElideMode">
|
||||||
<number>0</number>
|
<enum>Qt::ElideNone</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
|
<customwidgets>
|
||||||
|
<customwidget>
|
||||||
|
<class>SynEdit</class>
|
||||||
|
<extends>QFrame</extends>
|
||||||
|
<header location="global">qsynedit/Synedit.h</header>
|
||||||
|
<container>1</container>
|
||||||
|
</customwidget>
|
||||||
|
</customwidgets>
|
||||||
<resources/>
|
<resources/>
|
||||||
<connections/>
|
<connections/>
|
||||||
<buttongroups>
|
<buttongroups>
|
Loading…
Reference in New Issue