18#ifndef MAINAPPLICATION_H
19#define MAINAPPLICATION_H
21#define mApp MainApplication::instance()
31class QWebEngineProfile;
32class QWebEngineSettings;
33class QNetworkAccessManager;
34class QWebEngineDownloadRequest;
74 bool isClosing()
const;
75 bool isPrivate()
const;
76 bool isPortable()
const;
77 bool isStartingAfterCrash()
const;
79 int windowCount()
const;
80 QList<BrowserWindow*> windows()
const;
85 AfterLaunch afterLaunch()
const;
89 void destroyRestoreManager();
90 void reloadSettings();
93 QString styleName()
const;
96 QByteArray wmClass()
const;
117 QWebEngineProfile* webProfile()
const;
118 QWebEngineSettings *webSettings()
const;
120 QByteArray saveState()
const;
124 static bool isTestModeEnabled();
125 static void setTestModeEnabled(
bool enabled);
128 void addNewTab(
const QUrl &url = QUrl());
129 void startPrivateBrowsing(
const QUrl &startUrl = QUrl());
131 void reloadUserStyleSheet();
132 void restoreOverrideCursor();
134 void changeOccurred();
135 void quitApplication();
147 void windowDestroyed(QObject* window);
148 void onFocusChanged();
149 void runDeferredPostLaunchActions();
151 void downloadRequested(QWebEngineDownloadRequest *download);
154 enum PostLaunchAction {
161 void loadTheme(
const QString &name);
163 void setupUserScripts();
164 void setUserStyleSheet(
const QString &filePath);
166 void checkDefaultWebBrowser();
167 void checkOptimizeDatabase();
169 void registerAllowedSchemes();
174 bool m_isStartingAfterCrash;
195 QWebEngineProfile* m_webProfile;
200 QByteArray m_wmClass;
202 QList<BrowserWindow*> m_windows;
203 QPointer<BrowserWindow> m_lastActiveWindow;
205 QList<PostLaunchAction> m_postLaunchActions;
207 void createJumpList();
208 void initPulseSupport();
210#if defined(Q_OS_WIN) && !defined(Q_OS_OS2)
220 bool event(QEvent* e);
void activeWindowChanged(BrowserWindow *window)
The QtSingleApplication class provides an API to detect and communicate with running instances of an ...
void messageReceived(const QString &message)