src/platform/qt/BattleChipView.h (view raw)
1/* Copyright (c) 2013-2019 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 <QDialog>
9
10#include <memory>
11
12#include <mgba/core/interface.h>
13
14#include "ui_BattleChipView.h"
15
16namespace QGBA {
17
18class CoreController;
19
20class BattleChipView : public QDialog {
21Q_OBJECT
22
23public:
24 BattleChipView(std::shared_ptr<CoreController> controller, QWidget* parent = nullptr);
25 ~BattleChipView();
26
27public slots:
28 void setFlavor(int);
29 void insertChip(bool);
30
31private:
32 void loadChipNames(int);
33
34 Ui::BattleChipView m_ui;
35
36 QMap<int, int> m_chipIndexToId;
37 std::shared_ptr<CoreController> m_controller;
38};
39
40}