2025-08-26 17:26:05 -05:00
|
|
|
// SPDX-FileCopyrightText: 2021 Ernie Pasveer <epasveer@att.net>
|
|
|
|
|
//
|
|
|
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
|
|
2024-10-02 18:04:46 -05:00
|
|
|
#include "SeerStackDumpSettingsDialog.h"
|
|
|
|
|
#include "SeerRegisterTreeWidgetItem.h"
|
|
|
|
|
#include <QtWidgets/QMessageBox>
|
|
|
|
|
#include <QtWidgets/QFileDialog>
|
|
|
|
|
#include <QtGui/QRegularExpressionValidator>
|
|
|
|
|
#include <QtCore/QRegularExpression>
|
|
|
|
|
#include <QtCore/QSettings>
|
|
|
|
|
#include <QtCore/QList>
|
|
|
|
|
#include <QtCore/QDebug>
|
|
|
|
|
|
|
|
|
|
SeerStackDumpSettingsDialog::SeerStackDumpSettingsDialog (QWidget* parent) : QDialog(parent) {
|
|
|
|
|
|
|
|
|
|
// Set up the UI.
|
|
|
|
|
setupUi(this);
|
|
|
|
|
|
2024-10-06 12:21:13 -05:00
|
|
|
spHighLightColorButton->setFrameStyle(QFrame::Box|QFrame::Plain);
|
|
|
|
|
spHighLightColorButton->setLineWidth(1);
|
|
|
|
|
|
2024-10-02 18:04:46 -05:00
|
|
|
// Setup the widgets
|
|
|
|
|
setStackPointerExpression("$sp");
|
2024-10-05 12:13:37 -05:00
|
|
|
setStackPointerColor(QColor("lightGray"));
|
2024-10-05 10:37:29 -05:00
|
|
|
setBytesBeforeSP(16);
|
|
|
|
|
setBytesAfterSP(16);
|
2024-10-02 18:04:46 -05:00
|
|
|
setAsciiBytes(8);
|
|
|
|
|
|
|
|
|
|
// Connect things.
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SeerStackDumpSettingsDialog::~SeerStackDumpSettingsDialog () {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SeerStackDumpSettingsDialog::setStackPointerExpression (const QString& expression) {
|
|
|
|
|
spExpressionLineEdit->setText(expression);
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-05 12:13:37 -05:00
|
|
|
void SeerStackDumpSettingsDialog::setStackPointerColor (const QColor& color) {
|
|
|
|
|
spHighLightColorButton->setColor(color);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
QColor SeerStackDumpSettingsDialog::stackPointerColor () const {
|
|
|
|
|
return spHighLightColorButton->color();
|
|
|
|
|
}
|
|
|
|
|
|
2024-10-02 18:04:46 -05:00
|
|
|
QString SeerStackDumpSettingsDialog::stackPointerExpression () const {
|
|
|
|
|
return spExpressionLineEdit->text();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SeerStackDumpSettingsDialog::setBytesBeforeSP (int nbytes) {
|
|
|
|
|
preBytesSpinBox->setValue(nbytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int SeerStackDumpSettingsDialog::bytesBeforeSP () const {
|
|
|
|
|
return preBytesSpinBox->value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SeerStackDumpSettingsDialog::setBytesAfterSP (int nbytes) {
|
|
|
|
|
postBytesSpinBox->setValue(nbytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int SeerStackDumpSettingsDialog::bytesAfterSP () const {
|
|
|
|
|
return postBytesSpinBox->value();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SeerStackDumpSettingsDialog::setAsciiBytes (int nbytes) {
|
|
|
|
|
asciiBytesSpinBox->setValue(nbytes);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int SeerStackDumpSettingsDialog::asciiBytes () const {
|
|
|
|
|
return asciiBytesSpinBox->value();
|
|
|
|
|
}
|
|
|
|
|
|