all repos — mgba @ 129af691054cb1acffd9a2be9eb9f1dbf47f51df

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 <memory>
10
11#include "ui_MemorySearch.h"
12
13#include <mgba/core/mem-search.h>
14
15namespace QGBA {
16
17class CoreController;
18
19class MemorySearch : public QWidget {
20Q_OBJECT
21
22public:
23	static constexpr size_t LIMIT = 10000;
24
25	MemorySearch(std::shared_ptr<CoreController> controller, QWidget* parent = nullptr);
26	~MemorySearch();
27
28public slots:
29	void refresh();
30	void search();
31	void searchWithin();
32
33private slots:
34	void openMemory();
35
36private:
37	bool createParams(mCoreMemorySearchParams*);
38
39	Ui::MemorySearch m_ui;
40
41	std::shared_ptr<CoreController> m_controller;
42
43	mCoreMemorySearchResults m_results;
44	QByteArray m_string;
45};
46
47}
48
49#endif