all repos — mgba @ db8bb29c5a7b7efcd4d086ee383870a2565792e2

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 QGroupBox {
19Q_OBJECT
20
21public:
22	AssetTile(QWidget* parent = nullptr);
23	void setController(std::shared_ptr<CoreController>);
24	void addCustomProperty(const QString& id, const QString& visibleName);
25
26public slots:
27	void setPalette(int);
28	void setBoundary(int boundary, int set0, int set1);
29	void selectIndex(int);
30	void setFlip(bool h, bool v);
31	void selectColor(int);
32	void setCustomProperty(const QString& id, const QVariant& value);
33
34private:
35	Ui::AssetTile m_ui;
36
37	mCacheSet* m_cacheSet;
38	mTileCache* m_tileCaches[2];
39	int m_paletteId = 0;
40	int m_index = 0;
41
42	int m_addressWidth;
43	int m_addressBase;
44	int m_boundary;
45	int m_boundaryBase;
46	bool m_flipH = false;
47	bool m_flipV = false;
48
49	QMap<QString, QLabel*> m_customProperties;
50};
51
52}