28 #ifndef dooble_settings_h
29 #define dooble_settings_h
32 #include <QFutureWatcher>
34 #include <QProgressDialog>
35 #include <QReadWriteLock>
36 #include <QSqlDatabase>
39 #include <QWebEnginePage>
41 #include "dooble_main_window.h"
42 #include "ui_dooble_settings.h"
60 static QString cookie_policy_string(
int index);
61 static QString use_material_icons(
void);
62 static QString zoom_frame_location_string(
int index);
63 static QStringList s_spell_checker_dictionaries;
64 static QVariant getenv(
const QString &n);
65 static QVariant setting(
const QString &k,
66 const QVariant &default_value = QVariant(
""));
67 static bool has_dooble_credentials(
void);
68 static bool has_dooble_credentials_temporary(
void);
69 static bool set_setting(
const QString &key,
const QVariant &value);
70 static bool site_has_javascript_block_popup_exception(
const QUrl &url);
71 static int main_menu_bar_visible_key(
void);
72 static int site_feature_permission(
const QUrl &url,
73 QWebEnginePage::Feature feature);
74 static void prepare_web_engine_environment_variables(
void);
75 static void remove_setting(
const QString &key);
76 void restore(
bool read_database);
77 void set_settings_path(
const QString &path);
78 void set_site_feature_permission(
const QUrl &url,
79 QWebEnginePage::Feature feature,
81 void show_normal(QWidget *parent);
82 void show_panel(dooble_settings::Panels panel);
88 void closeEvent(QCloseEvent *event);
89 void keyPressEvent(QKeyEvent *event);
90 void resizeEvent(QResizeEvent *event);
93 QFuture<QList<QByteArray> > m_pbkdf2_future;
94 QFutureWatcher<QList<QByteArray> > m_pbkdf2_future_watcher;
95 QPointer<QProgressDialog> m_pbkdf2_dialog;
97 Ui_dooble_settings m_ui;
98 static QHash<QString, QString> s_web_engine_settings_environment;
99 static QHash<QUrl, char> s_javascript_block_popup_exceptions;
100 static QMap<QString, QVariant> s_getenv;
101 static QMap<QString, QVariant> s_settings;
102 static QMultiMap<QUrl, QPair<int, bool> > s_site_features_permissions;
103 static QReadWriteLock s_getenv_mutex;
104 static QReadWriteLock s_settings_mutex;
105 static QString s_http_user_agent;
106 static void create_tables(QSqlDatabase &db);
107 void new_javascript_block_popup_exception(
const QUrl &url);
108 void prepare_application_fonts(
void);
109 void prepare_fonts(
void);
110 void prepare_icons(
void);
111 void prepare_proxy(
bool save);
112 void prepare_table_statistics(
void);
113 void prepare_web_engine_settings(
void);
114 void purge_database_data(
void);
115 void purge_features_permissions(
void);
116 void purge_javascript_block_popup_exceptions(
void);
117 void save_fonts(
void);
118 void save_javascript_block_popup_exception(
const QUrl &url,
bool state);
119 void save_settings(
void);
121 void showEvent(QShowEvent *event)
123 dooble_main_window::showEvent(event);
125 if(!m_timer.isActive())
129 void show_qtwebengine_dictionaries_warning_label(
void);
132 void slot_apply(
void);
133 void slot_clear_cache(
void);
134 void slot_features_permissions_item_changed(QTableWidgetItem *item);
135 void slot_general_timer_timeout(
void);
136 void slot_javascript_block_popups_exceptions_item_changed
137 (QTableWidgetItem *item);
138 void slot_new_javascript_block_popup_exception(
const QUrl &url);
139 void slot_new_javascript_block_popup_exception(
void);
140 void slot_page_button_clicked(
void);
141 void slot_password_changed(
void);
142 void slot_pbkdf2_future_finished(
void);
143 void slot_populate(
void);
144 void slot_proxy_type_changed(
int index);
145 void slot_remove_all_features_permissions(
void);
146 void slot_remove_all_javascript_block_popup_exceptions(
void);
147 void slot_remove_selected_features_permissions(
void);
148 void slot_remove_selected_javascript_block_popup_exceptions(
void);
149 void slot_reset(
void);
150 void slot_reset_credentials(
void);
151 void slot_reset_user_agent(
void);
152 void slot_save_credentials(
void);
153 void slot_select_application_font(
void);
154 void slot_web_engine_settings_item_changed(QTableWidgetItem *item);
158 void dooble_credentials_authenticated(
bool state);
159 void dooble_credentials_created(
void);
160 void populated(
void);
Definition: dooble_main_window.h:35
Definition: dooble_settings.h:45