src/platform/qt/AssetTile.h (view raw)
1/* Copyright (c) 2013-2016 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_ASSET_TILE
7#define QGBA_ASSET_TILE
8
9#include "ui_AssetTile.h"
10
11#include <memory>
12
13#include <mgba/core/tile-cache.h>
14
15namespace QGBA {
16
17class CoreController;
18
19class AssetTile : public QGroupBox {
20Q_OBJECT
21
22public:
23 AssetTile(QWidget* parent = nullptr);
24 void setController(std::shared_ptr<CoreController>);
25
26public slots:
27 void setPalette(int);
28 void setPaletteSet(int, int boundary, int max);
29 void selectIndex(int);
30 void selectColor(int);
31
32private:
33 Ui::AssetTile m_ui;
34
35 mTileCache* m_tileCache;
36 int m_paletteId = 0;
37 int m_paletteSet = 0;
38 int m_index = 0;
39
40 int m_addressWidth;
41 int m_addressBase;
42 int m_boundary;
43 int m_boundaryBase;
44};
45
46}
47
48#endif