MCPcopy Create free account
hub / github.com/PolyMC/PolyMC / Application

Class Application

launcher/Application.h:81–305  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79#define APPLICATION (static_cast<Application *>(QCoreApplication::instance()))
80
81class Application : public QApplication
82{
83 // friends for the purpose of limiting access to deprecated stuff
84 Q_OBJECT
85public:
86 enum Status {
87 StartingUp,
88 Failed,
89 Succeeded,
90 Initialized
91 };
92
93 enum Capability {
94 None = 0,
95
96 SupportsMSA = 1 << 0,
97 SupportsFlame = 1 << 1,
98 SupportsGameMode = 1 << 2,
99 SupportsMangoHud = 1 << 3,
100 };
101 Q_DECLARE_FLAGS(Capabilities, Capability)
102
103public:
104 Application(int &argc, char **argv);
105 virtual ~Application();
106
107 bool event(QEvent* event) override;
108
109 std::shared_ptr<SettingsObject> settings() const {
110 return m_settings;
111 }
112
113 qint64 timeSinceStart() const {
114 return startTime.msecsTo(QDateTime::currentDateTime());
115 }
116
117 QIcon getThemedIcon(const QString& name);
118
119 bool isFlatpak();
120
121 void setIconTheme(const QString& name);
122
123 std::vector<ITheme *> getValidApplicationThemes();
124
125 void setApplicationTheme(const QString& name, bool initial);
126
127 shared_qobject_ptr<UpdateChecker> updateChecker() {
128 return m_updateChecker;
129 }
130
131 std::shared_ptr<TranslationsModel> translations();
132
133 std::shared_ptr<JavaInstallList> javalist();
134
135 std::shared_ptr<InstanceList> instances() const {
136 return m_instances;
137 }
138

Callers

nothing calls this directly

Calls 1

QStringClass · 0.85

Tested by

no test coverage detected