/usr/include/qupzilla/mainapplication.h is in libqupzilla-dev 1.8.9~dfsg1-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 | /* ============================================================
* QupZilla - WebKit based browser
* Copyright (C) 2010-2014 David Rosca <nowrep@gmail.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
* ============================================================ */
#ifndef MAINAPPLICATION_H
#define MAINAPPLICATION_H
#define mApp MainApplication::instance()
#include <QList>
#include <QPointer>
#include "qtsingleapplication/qtsingleapplication.h"
#include "restoremanager.h"
#include "qzcommon.h"
class QMenu;
class QNetworkDiskCache;
class History;
class AutoFill;
class MainMenu;
class Bookmarks;
class CookieJar;
class AutoSaver;
class RSSManager;
class PluginProxy;
class BrowserWindow;
class NetworkManager;
class BrowsingLibrary;
class DownloadManager;
class UserAgentManager;
class SearchEnginesManager;
class HTML5PermissionsManager;
class RegisterQAppAssociation;
class DesktopNotificationsFactory;
class QUPZILLA_EXPORT MainApplication : public QtSingleApplication
{
Q_OBJECT
public:
explicit MainApplication(int &argc, char** argv);
~MainApplication();
bool isClosing() const;
bool isRestoring() const;
bool isPrivate() const;
bool isPortable() const;
bool isStartingAfterCrash() const;
int windowCount() const;
QList<BrowserWindow*> windows() const;
BrowserWindow* getWindow() const;
BrowserWindow* createWindow(Qz::BrowserWindowType type, const QUrl &startUrl = QUrl());
bool restoreSession(BrowserWindow* window, RestoreData restoreData);
void destroyRestoreManager();
void reloadSettings();
// Name of current Qt style
QString styleName() const;
// TODO: Move translating into own class (LocaleManager ?)
QString currentLanguageFile() const;
QString currentLanguage() const;
History* history();
Bookmarks* bookmarks();
AutoFill* autoFill();
CookieJar* cookieJar();
PluginProxy* plugins();
QNetworkDiskCache* networkCache();
BrowsingLibrary* browsingLibrary();
RSSManager* rssManager();
NetworkManager* networkManager();
RestoreManager* restoreManager();
DownloadManager* downloadManager();
UserAgentManager* userAgentManager();
SearchEnginesManager* searchEnginesManager();
HTML5PermissionsManager* html5PermissionsManager();
DesktopNotificationsFactory* desktopNotifications();
static MainApplication* instance();
public slots:
void addNewTab(const QUrl &url = QUrl());
void startPrivateBrowsing(const QUrl &startUrl = QUrl());
void reloadUserStyleSheet();
void restoreOverrideCursor();
void changeOcurred();
void quitApplication();
signals:
void settingsReloaded();
private slots:
void postLaunch();
void saveSession();
void saveSettings();
void messageReceived(const QString &message);
void windowDestroyed(QObject* window);
void onFocusChanged();
void checkDefaultWebBrowser();
private:
enum PostLaunchAction {
OpenDownloadManager,
OpenNewTab,
ToggleFullScreen
};
void loadSettings();
void loadTheme(const QString &name);
void translateApp();
void backupSavedSessions();
QUrl userStyleSheet(const QString &filePath) const;
bool m_isPrivate;
bool m_isPortable;
bool m_isClosing;
bool m_isRestoring;
bool m_isStartingAfterCrash;
History* m_history;
Bookmarks* m_bookmarks;
AutoFill* m_autoFill;
CookieJar* m_cookieJar;
PluginProxy* m_plugins;
QNetworkDiskCache* m_networkCache;
BrowsingLibrary* m_browsingLibrary;
RSSManager* m_rssManager;
NetworkManager* m_networkManager;
RestoreManager* m_restoreManager;
DownloadManager* m_downloadManager;
UserAgentManager* m_userAgentManager;
SearchEnginesManager* m_searchEnginesManager;
HTML5PermissionsManager* m_html5PermissionsManager;
DesktopNotificationsFactory* m_desktopNotifications;
AutoSaver* m_autoSaver;
QList<BrowserWindow*> m_windows;
QPointer<BrowserWindow> m_lastActiveWindow;
QList<PostLaunchAction> m_postLaunchActions;
QString m_languageFile;
#if defined(Q_OS_WIN) && !defined(Q_OS_OS2)
public:
RegisterQAppAssociation* associationManager();
private:
RegisterQAppAssociation* m_registerQAppAssociation;
#endif
#ifdef Q_OS_MAC
public:
bool event(QEvent* e);
#endif
};
#endif // MAINAPPLICATION_H
|