all repos — mgba @ 7a5190e95e517f8b1030340e72ae0288bb601f29

mGBA Game Boy Advance Emulator

src/platform/qt/MemorySearch.h (view raw)

 1/* Copyright (c) 2013-2017 Jeffrey Pfau
 2 *
 3 * This Source Code Form is subject to the terms of the Mozilla Public
 4 * License, v. 2.0. If a copy of the MPL was not distributed with this
 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 6#ifndef QGBA_MEMORY_SEARCH
 7#define QGBA_MEMORY_SEARCH
 8
 9#include "ui_MemorySearch.h"
10
11#include <mgba/core/mem-search.h>
12
13namespace QGBA {
14
15class GameController;
16
17class MemorySearch : public QWidget {
18Q_OBJECT
19
20public:
21	static constexpr size_t LIMIT = 10000;
22
23	MemorySearch(GameController* controller, QWidget* parent = nullptr);
24	~MemorySearch();
25
26public slots:
27	void refresh();
28	void search();
29	void searchWithin();
30
31private slots:
32	void openMemory();
33
34private:
35	bool createParams(mCoreMemorySearchParams*);
36
37	Ui::MemorySearch m_ui;
38
39	GameController* m_controller;
40
41	mCoreMemorySearchResults m_results;
42	QByteArray m_string;
43};
44
45}
46
47#endif