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:
32 bool createParams(mCoreMemorySearchParams*);
33
34 Ui::MemorySearch m_ui;
35
36 GameController* m_controller;
37
38 mCoreMemorySearchResults m_results;
39 QByteArray m_string;
40};
41
42}
43
44#endif