all repos — mgba @ 9bef681c7d15ab97afdc306709ea2160ab649d82

mGBA Game Boy Advance Emulator

src/platform/qt/TileView.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_TILE_VIEW
 7#define QGBA_TILE_VIEW
 8
 9#include <QWidget>
10
11#include "GameController.h"
12
13#include "ui_TileView.h"
14
15extern "C" {
16#include "gba/renderers/tile-cache.h"
17}
18
19namespace QGBA {
20
21class TileView : public QWidget {
22Q_OBJECT
23
24public:
25	TileView(GameController* controller, QWidget* parent = nullptr);
26
27public slots:
28	void updateTiles(bool force = false);
29	void updatePalette(int);
30
31private slots:
32	void selectIndex(int);
33
34protected:
35	void resizeEvent(QResizeEvent*) override;
36	void showEvent(QShowEvent*) override;
37
38private:
39	Ui::TileView m_ui;
40
41	GameController* m_controller;
42	GBAVideoTileCache* m_tileCache;
43	GBAVideoTileCacheStatus m_tileStatus;
44	int m_paletteId;
45	QTimer m_updateTimer;
46};
47
48}
49
50#endif