MemoryViewWidget: Refactor. Remove OnItemChanged signal and QSignalBlocker - replace with a signal that is only sent at the correct time.

This commit is contained in:
TryTwo
2023-11-22 00:51:27 -07:00
parent 696b363f47
commit 2e006d9787
2 changed files with 43 additions and 17 deletions

View File

@ -3,6 +3,7 @@
#pragma once
#include <QStyledItemDelegate>
#include <QWidget>
#include "Common/CommonTypes.h"
@ -22,6 +23,21 @@ class CPUThreadGuard;
class System;
} // namespace Core
// Captures direct editing of the table.
class TableEditDelegate : public QStyledItemDelegate
{
Q_OBJECT
public:
explicit TableEditDelegate(QObject* parent) : QStyledItemDelegate(parent) {}
void setModelData(QWidget* editor, QAbstractItemModel* model,
const QModelIndex& index) const override;
signals:
void editFinished(const int row, const int column, const QString& text) const;
};
class MemoryViewTable;
class MemoryViewWidget final : public QWidget