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