Files
chatterino2/src/Application.hpp
2018-06-28 19:57:06 +02:00

84 lines
1.7 KiB
C++

#pragma once
#include "singletons/Resources.hpp"
#include <QApplication>
namespace chatterino {
class TwitchServer;
class PubSub;
class CommandController;
class HighlightController;
class IgnoreController;
class TaggedUsersController;
class AccountController;
class ModerationActions;
class Themes;
class WindowManager;
class Logging;
class Paths;
class AccountManager;
class Emotes;
class NativeMessaging;
class Settings;
class Fonts;
class Resources;
class Application
{
Application(int _argc, char **_argv);
public:
static void instantiate(int argc, char **argv);
~Application() = delete;
void construct();
void initialize();
void load();
int run(QApplication &qtApp);
friend void test();
Paths *paths = nullptr;
Themes *themes = nullptr;
WindowManager *windows = nullptr;
Logging *logging = nullptr;
CommandController *commands = nullptr;
HighlightController *highlights = nullptr;
IgnoreController *ignores = nullptr;
TaggedUsersController *taggedUsers = nullptr;
AccountController *accounts = nullptr;
Emotes *emotes = nullptr;
NativeMessaging *nativeMessaging = nullptr;
Settings *settings = nullptr;
Fonts *fonts = nullptr;
Resources *resources = nullptr;
ModerationActions *moderationActions = nullptr;
/// Provider-specific
struct {
TwitchServer *server = nullptr;
PubSub *pubsub = nullptr;
} twitch;
void save();
// Special application mode that only initializes the native messaging host
static void runNativeMessagingHost();
private:
int argc;
char **argv;
};
Application *getApp();
bool appInitialized();
} // namespace chatterino