src/platform/qt/CoreManager.h (view raw)
1/* Copyright (c) 2013-2017 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 <QFileInfo>
9#include <QObject>
10#include <QString>
11
12struct mCoreConfig;
13struct VFile;
14
15namespace QGBA {
16
17class CoreController;
18class MultiplayerController;
19
20class CoreManager : public QObject {
21Q_OBJECT
22
23public:
24 void setConfig(const mCoreConfig*);
25 void setMultiplayerController(MultiplayerController*);
26 void setPreload(bool preload) { m_preload = preload; }
27
28public slots:
29 CoreController* loadGame(const QString& path);
30 CoreController* loadGame(VFile* vf, const QString& path, const QString& base);
31 CoreController* loadBIOS(int platform, const QString& path);
32
33signals:
34 void coreLoaded(CoreController*);
35
36private:
37 const mCoreConfig* m_config = nullptr;
38 MultiplayerController* m_multiplayer = nullptr;
39 bool m_preload = false;
40};
41
42}