all repos — mgba @ f3b66397a2a598e5cfb63acd0c0b84f5796d0802

mGBA Game Boy Advance Emulator

src/platform/qt/AssetView.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_VIEW
 7#define QGBA_ASSET_VIEW
 8
 9#include <QWidget>
10
11#include "GameController.h"
12
13namespace QGBA {
14
15class AssetView : public QWidget {
16Q_OBJECT
17
18public:
19	AssetView(GameController* controller, QWidget* parent = nullptr);
20
21protected slots:
22	void updateTiles(bool force = false);
23
24protected:
25#ifdef M_CORE_GBA
26	virtual void updateTilesGBA(bool force) = 0;
27#endif
28#ifdef M_CORE_GB
29	virtual void updateTilesGB(bool force) = 0;
30#endif
31
32	void resizeEvent(QResizeEvent*) override;
33	void showEvent(QShowEvent*) override;
34
35	const std::shared_ptr<mTileCache> m_tileCache;
36
37private:
38	GameController* m_controller;
39	QTimer m_updateTimer;
40};
41
42}
43
44#endif