mirror of
https://github.com/epasveer/seer.git
synced 2026-08-29 08:34:42 +08:00
Compare commits
5 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 62596d3234 | |||
| afa4d70072 | |||
| 5183339a2b | |||
| fe6fa48306 | |||
| 41f78b68da |
@@ -115,6 +115,7 @@ set(HEADER_FILES
|
||||
SeerParallelStacksVisualizerWidget.h
|
||||
SeerParallelStacksGraphicsView.h
|
||||
SeerParallelStacksCommon.h
|
||||
SeerParallelStacksSettingsDialog.h
|
||||
SeerGdbMonitorWidget.h
|
||||
SeerRegisterValuesBrowserWidget.h
|
||||
SeerRegisterEditValueDialog.h
|
||||
@@ -233,6 +234,7 @@ set(SOURCE_FILES
|
||||
SeerParallelStacksVisualizerWidget.cpp
|
||||
SeerParallelStacksGraphicsView.cpp
|
||||
SeerParallelStacksCommon.cpp
|
||||
SeerParallelStacksSettingsDialog.cpp
|
||||
SeerGdbMonitorWidget.cpp
|
||||
SeerRegisterValuesBrowserWidget.cpp
|
||||
SeerRegisterEditValueDialog.cpp
|
||||
|
||||
@@ -398,7 +398,10 @@ void SeerArrayVisualizerWidget::handleText (const QString& text) {
|
||||
|
||||
//qDebug() << text;
|
||||
|
||||
if (text.contains(QRegularExpression("^([0-9]+)\\^done,value="))) {
|
||||
static const QRegularExpression valueResponse = QRegularExpression("^([0-9]+)\\^done,value=");
|
||||
static const QRegularExpression memoryResponse = QRegularExpression("^([0-9]+)\\^done,memory=");
|
||||
static const QRegularExpression errorResponse = QRegularExpression("^([0-9]+)\\^error,msg=");
|
||||
if (text.contains(valueResponse)) {
|
||||
|
||||
// 11^done,value="1"
|
||||
// 11^done,value="0x7fffffffd538"
|
||||
@@ -527,7 +530,7 @@ void SeerArrayVisualizerWidget::handleText (const QString& text) {
|
||||
handlebRefreshButton();
|
||||
}
|
||||
|
||||
}else if (text.contains(QRegularExpression("^([0-9]+)\\^done,memory="))) {
|
||||
}else if (text.contains(memoryResponse)) {
|
||||
|
||||
// 3^done,memory=[{begin="0x0000000000613e70",offset="0x0000000000000000",end="0x0000000000613e71",contents="00"}]
|
||||
// 4^done,memory=[{begin="0x0000000000613e70",offset="0x0000000000000000",end="0x0000000000613ed4",contents="000000000000000000000000"}]
|
||||
@@ -632,7 +635,7 @@ void SeerArrayVisualizerWidget::handleText (const QString& text) {
|
||||
}
|
||||
}
|
||||
|
||||
}else if (text.contains(QRegularExpression("^([0-9]+)\\^error,msg="))) {
|
||||
}else if (text.contains(errorResponse)) {
|
||||
|
||||
// 12^error,msg="No symbol \"return\" in current context."
|
||||
// 13^error,msg="No symbol \"cout\" in current context."
|
||||
|
||||
@@ -439,7 +439,7 @@ int SeerEditorWidgetAssemblyArea::miniMapAreaWidth () {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 120;
|
||||
return 80;
|
||||
}
|
||||
|
||||
int SeerEditorWidgetAssemblyArea::offsetAreaWidth () {
|
||||
|
||||
@@ -192,7 +192,7 @@ int SeerEditorWidgetSourceArea::miniMapAreaWidth () {
|
||||
return 0;
|
||||
}
|
||||
|
||||
return 120;
|
||||
return 80;
|
||||
}
|
||||
|
||||
void SeerEditorWidgetSourceArea::updateLineNumberArea (const QRect& rect, int dy) {
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
// SPDX-FileCopyrightText: 2026 Ernie Pasveer <epasveer@att.net>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "SeerParallelStacksSettingsDialog.h"
|
||||
#include <QtWidgets/QMessageBox>
|
||||
#include <QtCore/QSettings>
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
SeerParallelStacksSettingsDialog::SeerParallelStacksSettingsDialog (QWidget* parent) : QDialog(parent) {
|
||||
|
||||
// Set up the UI.
|
||||
setupUi(this);
|
||||
|
||||
// Setup the widgets
|
||||
|
||||
// Connect things.
|
||||
|
||||
// Restore window settings.
|
||||
readSettings();
|
||||
}
|
||||
|
||||
SeerParallelStacksSettingsDialog::~SeerParallelStacksSettingsDialog () {
|
||||
}
|
||||
|
||||
void SeerParallelStacksSettingsDialog::setShowMinimap (const QString& when) {
|
||||
}
|
||||
|
||||
QString SeerParallelStacksSettingsDialog::showMinimap () const {
|
||||
}
|
||||
|
||||
void SeerParallelStacksSettingsDialog::setShowFullFunctionName (bool flag) {
|
||||
}
|
||||
|
||||
bool SeerParallelStacksSettingsDialog::showFullFunctionName () const {
|
||||
}
|
||||
|
||||
void SeerParallelStacksSettingsDialog::setFunctionNameLenght (int length) {
|
||||
}
|
||||
|
||||
int SeerParallelStacksSettingsDialog::functionNameLenght () const {
|
||||
}
|
||||
|
||||
void SeerParallelStacksSettingsDialog::setShowFullStackSize (bool flag) {
|
||||
}
|
||||
|
||||
bool SeerParallelStacksSettingsDialog::showFullStackSize () const {
|
||||
}
|
||||
|
||||
void SeerParallelStacksSettingsDialog::setStackSize (int size) {
|
||||
}
|
||||
|
||||
int SeerParallelStacksSettingsDialog::stackSize () const {
|
||||
}
|
||||
|
||||
void SeerParallelStacksSettingsDialog::writeSettings() {
|
||||
|
||||
QSettings settings;
|
||||
|
||||
settings.beginGroup("parallelstackssettingsdialog"); {
|
||||
settings.setValue("size", size());
|
||||
}settings.endGroup();
|
||||
}
|
||||
|
||||
void SeerParallelStacksSettingsDialog::readSettings() {
|
||||
|
||||
QSettings settings;
|
||||
|
||||
settings.beginGroup("parallelstackssettingsdialog"); {
|
||||
if (settings.contains("size")) {
|
||||
resize(settings.value("size", QSize(400, 225)).toSize());
|
||||
}
|
||||
} settings.endGroup();
|
||||
}
|
||||
|
||||
void SeerParallelStacksSettingsDialog::resizeEvent (QResizeEvent* event) {
|
||||
|
||||
// Write window settings.
|
||||
writeSettings();
|
||||
|
||||
QWidget::resizeEvent(event);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
// SPDX-FileCopyrightText: 2026 Ernie Pasveer <epasveer@att.net>
|
||||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <QtWidgets/QDialog>
|
||||
#include <QtCore/QString>
|
||||
#include <QtCore/QVector>
|
||||
|
||||
#include "ui_SeerParallelStacksSettingsDialog.h"
|
||||
|
||||
class SeerParallelStacksSettingsDialog : public QDialog, protected Ui::SeerParallelStacksSettingsDialogForm {
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit SeerParallelStacksSettingsDialog (QWidget* parent = 0);
|
||||
~SeerParallelStacksSettingsDialog ();
|
||||
|
||||
void setShowMinimap (const QString& when);
|
||||
QString showMinimap () const;
|
||||
|
||||
void setShowFullFunctionName (bool flag);
|
||||
bool showFullFunctionName () const;
|
||||
void setFunctionNameLenght (int length);
|
||||
int functionNameLenght () const;
|
||||
|
||||
void setShowFullStackSize (bool flag);
|
||||
bool showFullStackSize () const;
|
||||
void setStackSize (int size);
|
||||
int stackSize () const;
|
||||
|
||||
public slots:
|
||||
|
||||
private slots:
|
||||
|
||||
protected:
|
||||
void writeSettings ();
|
||||
void readSettings ();
|
||||
void resizeEvent (QResizeEvent* event);
|
||||
|
||||
private:
|
||||
};
|
||||
|
||||
@@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>SeerParallelStacksSettingsDialogForm</class>
|
||||
<widget class="QDialog" name="SeerParallelStacksSettingsDialogForm">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>373</width>
|
||||
<height>200</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Seer - ParallelStacks Settings</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
<property name="title">
|
||||
<string>ParallelStacks Settings</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QLabel" name="showMinimapLabel">
|
||||
<property name="text">
|
||||
<string>Show Minimap</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="QRadioButton" name="showMinimapWhenNeededRadioButton">
|
||||
<property name="toolTip">
|
||||
<string>Only show the minimap if the contents exceeds the display area.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>When needed</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">minimapbuttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<widget class="QSpinBox" name="stackFrameSizeSpinBox">
|
||||
<property name="toolTip">
|
||||
<string>Keep N frames of the stack. Omit the middle frames.</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="functionNameLengthLabel">
|
||||
<property name="text">
|
||||
<string>Function Name Length</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QRadioButton" name="functionNameLengthAllRadioButton">
|
||||
<property name="toolTip">
|
||||
<string>Keep the full length of function names.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Full</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QRadioButton" name="showMiniMapAlwaysRadioButton">
|
||||
<property name="toolTip">
|
||||
<string>Always show the minimap.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Always</string>
|
||||
</property>
|
||||
<attribute name="buttonGroup">
|
||||
<string notr="true">minimapbuttonGroup</string>
|
||||
</attribute>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="1">
|
||||
<widget class="QRadioButton" name="stackFrameSizeAllRadioButton">
|
||||
<property name="toolTip">
|
||||
<string>Keep all frames of the stack.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="0">
|
||||
<widget class="QLabel" name="stackFrameSizeLabel">
|
||||
<property name="text">
|
||||
<string>Stack Frame Size</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QSpinBox" name="functionNameLengthSpinBox">
|
||||
<property name="toolTip">
|
||||
<string>Keep N characters of the function name. Omit the middle characters.</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>999</number>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<number>5</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>10</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</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>4</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QDialogButtonBox" name="buttonBox">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="standardButtons">
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>groupBox</zorder>
|
||||
<zorder>buttonBox</zorder>
|
||||
<zorder>verticalSpacer</zorder>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>accepted()</signal>
|
||||
<receiver>SeerParallelStacksSettingsDialogForm</receiver>
|
||||
<slot>accept()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>227</x>
|
||||
<y>179</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>157</x>
|
||||
<y>199</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>buttonBox</sender>
|
||||
<signal>rejected()</signal>
|
||||
<receiver>SeerParallelStacksSettingsDialogForm</receiver>
|
||||
<slot>reject()</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>295</x>
|
||||
<y>185</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>286</x>
|
||||
<y>199</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<buttongroups>
|
||||
<buttongroup name="minimapbuttonGroup"/>
|
||||
</buttongroups>
|
||||
</ui>
|
||||
@@ -3,6 +3,7 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
#include "SeerParallelStacksVisualizerWidget.h"
|
||||
#include "SeerParallelStacksSettingsDialog.h"
|
||||
#include "SeerParallelStacksCommon.h"
|
||||
#include "SeerHelpPageDialog.h"
|
||||
#include "SeerUtl.h"
|
||||
@@ -40,6 +41,7 @@ SeerParallelStacksVisualizerWidget::SeerParallelStacksVisualizerWidget (QWidget*
|
||||
QObject::connect(helpToolButton, &QToolButton::clicked, this, &SeerParallelStacksVisualizerWidget::handleHelpButton);
|
||||
QObject::connect(printToolButton, &QToolButton::clicked, this, &SeerParallelStacksVisualizerWidget::handlePrintButton);
|
||||
QObject::connect(saveToolButton, &QToolButton::clicked, this, &SeerParallelStacksVisualizerWidget::handleSaveButton);
|
||||
QObject::connect(settingsToolButton, &QToolButton::clicked, this, &SeerParallelStacksVisualizerWidget::handleSettingsButton);
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6, 6, 3)
|
||||
QObject::connect(QGuiApplication::styleHints(), &QStyleHints::colorSchemeChanged, this, &SeerParallelStacksVisualizerWidget::handleThemeChanged);
|
||||
#endif
|
||||
@@ -238,6 +240,19 @@ void SeerParallelStacksVisualizerWidget::handleSaveButton () {
|
||||
QMessageBox::information(this, "Done", "Scene saved to:\n" + fileName);
|
||||
}
|
||||
|
||||
void SeerParallelStacksVisualizerWidget::handleSettingsButton () {
|
||||
|
||||
// Bring up the settings dialog.
|
||||
SeerParallelStacksSettingsDialog dlg(this);
|
||||
|
||||
// Set dialog things.
|
||||
|
||||
// Execute the dialog.
|
||||
if (dlg.exec()) {
|
||||
// Set things.
|
||||
}
|
||||
}
|
||||
|
||||
void SeerParallelStacksVisualizerWidget::handleThemeChanged () {
|
||||
|
||||
// Colorize icons for theme.
|
||||
|
||||
@@ -28,6 +28,7 @@ class SeerParallelStacksVisualizerWidget : public QWidget, protected Ui::SeerPar
|
||||
void handleHelpButton ();
|
||||
void handlePrintButton ();
|
||||
void handleSaveButton ();
|
||||
void handleSettingsButton ();
|
||||
void handleThemeChanged ();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -68,6 +68,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="settingsToolButton">
|
||||
<property name="toolTip">
|
||||
<string>Settings.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string/>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="resource.qrc">
|
||||
<normaloff>:/seer/resources/RelaxLightIcons/application-menu.svg</normaloff>:/seer/resources/RelaxLightIcons/application-menu.svg</iconset>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="refreshToolButton">
|
||||
<property name="toolTip">
|
||||
|
||||
Reference in New Issue
Block a user