1
0
mirror of https://github.com/RPCS3/rpcs3.git synced 2024-11-22 10:42:36 +01:00
rpcs3/rpcs3/headless_application.h
2021-04-09 21:03:49 +02:00

37 lines
731 B
C++

#pragma once
#include <QCoreApplication>
#include "main_application.h"
#include <functional>
/** Headless RPCS3 Application Class
* The main point of this class is to do application initialization and initialize callbacks.
*/
class headless_application : public QCoreApplication, public main_application
{
Q_OBJECT
public:
headless_application(int& argc, char** argv);
/** Call this method before calling app.exec */
bool Init() override;
private:
void InitializeCallbacks();
void InitializeConnects() const;
QThread* get_thread() override
{
return thread();
}
Q_SIGNALS:
void RequestCallAfter(std::function<void()> func);
private Q_SLOTS:
static void HandleCallAfter(const std::function<void()>& func);
};