CheatSearchWidget: Add checkbox to toggle Current Value autoupdate

This commit is contained in:
Dentomologist
2023-10-29 15:20:23 -07:00
parent fdb7328c73
commit 9230266529
3 changed files with 50 additions and 16 deletions

View File

@ -39,8 +39,14 @@ public:
explicit CheatSearchWidget(std::unique_ptr<Cheats::CheatSearchSessionBase> session);
~CheatSearchWidget() override;
bool UpdateTableAllCurrentValues();
void UpdateTableVisibleCurrentValues();
enum class UpdateSource
{
User,
Auto,
};
bool UpdateTableAllCurrentValues(UpdateSource source);
void UpdateTableVisibleCurrentValues(UpdateSource source);
signals:
void ActionReplayCodeGenerated(const ActionReplay::ARCode& ar_code);
@ -61,7 +67,8 @@ private:
void RefreshCurrentValueTableItem(QTableWidgetItem* current_value_table_item);
void RefreshGUICurrentValues(size_t begin_index, size_t end_index);
bool UpdateTableRows(const Core::CPUThreadGuard& guard, size_t begin_index, size_t end_index);
bool UpdateTableRows(const Core::CPUThreadGuard& guard, size_t begin_index, size_t end_index,
UpdateSource source);
void RecreateGUITable();
void GenerateARCode();
int GetVisibleRowsBeginIndex() const;
@ -86,5 +93,6 @@ private:
QPushButton* m_reset_button;
QCheckBox* m_parse_values_as_hex_checkbox;
QCheckBox* m_display_values_in_hex_checkbox;
QCheckBox* m_autoupdate_current_values;
QTableWidget* m_address_table;
};