all repos — mgba @ 7c8d253123733d667e271668f00bacceb390175d

mGBA Game Boy Advance Emulator

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#pragma once
 7
 8#include "ui_AssetTile.h"
 9
10#include <memory>
11
12#include <mgba/core/cache-set.h>
13
14namespace QGBA {
15
16class CoreController;
17
18class AssetTile : public AssetInfo {
19Q_OBJECT
20
21public:
22	AssetTile(QWidget* parent = nullptr);
23	void setController(std::shared_ptr<CoreController>);
24
25public slots:
26	void setPalette(int);
27	void setBoundary(int boundary, int set0, int set1);
28	void selectIndex(int);
29	void setFlip(bool h, bool v);
30	void selectColor(int);
31
32protected:
33	int customLocation(const QString& id = {}) override;
34
35private:
36	Ui::AssetTile m_ui;
37
38	mCacheSet* m_cacheSet;
39	mTileCache* m_tileCaches[2];
40	int m_paletteId = 0;
41	int m_index = 0;
42
43	int m_addressWidth;
44	int m_addressBase;
45	int m_boundary;
46	int m_boundaryBase;
47	bool m_flipH = false;
48	bool m_flipV = false;
49
50	QMap<QString, QLabel*> m_customProperties;
51};
52
53}