Falkon Develop
Cross-platform Qt-based web browser
preferences.h
Go to the documentation of this file.
1/* ============================================================
2* Falkon - Qt web browser
3* Copyright (C) 2010-2018 David Rosca <nowrep@gmail.com>
4*
5* This program is free software: you can redistribute it and/or modify
6* it under the terms of the GNU General Public License as published by
7* the Free Software Foundation, either version 3 of the License, or
8* (at your option) any later version.
9*
10* This program is distributed in the hope that it will be useful,
11* but WITHOUT ANY WARRANTY; without even the implied warranty of
12* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13* GNU General Public License for more details.
14*
15* You should have received a copy of the GNU General Public License
16* along with this program. If not, see <http://www.gnu.org/licenses/>.
17* ============================================================ */
18#ifndef PREFERENCES_H
19#define PREFERENCES_H
20
21#include <QUrl>
22#include <QDialog>
23#include <QPointer>
24
25#include "qzcommon.h"
26
27namespace Ui
28{
29class Preferences;
30}
31
32class QAbstractButton;
33class QListWidgetItem;
34
35class AutoFillManager;
36class BrowserWindow;
37class PluginsManager;
39class ThemeManager;
40
41class FALKON_EXPORT Preferences : public QDialog
42{
43 Q_OBJECT
44
45public:
46 explicit Preferences(BrowserWindow* window);
47 ~Preferences() override;
48
49private Q_SLOTS:
50 void saveSettings();
51
52 void buttonClicked(QAbstractButton* button);
53 void showStackedPage(QListWidgetItem* item);
54
55 void chooseDownPath();
56 void showCookieManager();
57 void useActualHomepage();
58 void useActualNewTab();
59 void showAcceptLanguage();
60 void chooseUserStyleClicked();
61 void deleteHtml5storage();
62 void chooseExternalDownloadManager();
63 void openUserAgentManager();
64 void openJsOptions();
65 void openSearchEnginesManager();
66 void openCertificateManager();
67 void openProtocolHandlersManager();
68 void openSchemesManager();
69
70 void searchFromAddressBarChanged(bool state);
71 void saveHistoryChanged(bool state);
72 void allowHtml5storageChanged(bool state);
73 void downLocChanged(bool state);
74 void allowCacheChanged(bool state);
75 void setManualProxyConfigurationEnabled(bool state);
76 void useExternalDownManagerChanged(bool state);
77 void changeCachePathClicked();
78 void allowPluginsToggled(bool checked);
79
80 void newTabChanged(int value);
81 void afterLaunchChanged(int value);
82
83 void createProfile();
84 void deleteProfile();
85 void startProfileIndexChanged(int index);
86
87 void setProgressBarColorIcon(QColor col = QColor());
88 void selectCustomProgressBarColor();
89
90 void showNotificationPreview();
91
92 void makeFalkonDefault();
93
94private:
95 void closeEvent(QCloseEvent* event) override;
96
97 Ui::Preferences* ui;
98 BrowserWindow* m_window;
99 AutoFillManager* m_autoFillManager;
100 PluginsManager* m_pluginsList;
101 ThemeManager* m_themesManager;
102 QPointer<DesktopNotification> m_notification;
103
104 QUrl m_homepage;
105 QUrl m_newTabUrl;
106 QString m_actProfileName;
107 int m_afterLaunch;
108 int m_onNewTab;
109 QPoint m_notifPosition;
110};
111
112#endif // PREFERENCES_H
int value(const QColor &c)
Definition: colors.cpp:238
State state
#define FALKON_EXPORT
Definition: qzcommon.h:28