summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bitbucket-pipelines.yml1
-rwxr-xr-xscripts/rekonf.py118
-rw-r--r--src/CMakeLists.txt1
-rw-r--r--src/rekonq.kcfg305
-rw-r--r--src/rekonq.kcfgc5
-rw-r--r--src/settings/CMakeLists.txt32
-rw-r--r--src/settings/advancedwidget.cpp70
-rw-r--r--src/settings/advancedwidget.h62
-rw-r--r--src/settings/appearancewidget.cpp155
-rw-r--r--src/settings/appearancewidget.h66
-rw-r--r--src/settings/generalwidget.cpp121
-rw-r--r--src/settings/generalwidget.h61
-rw-r--r--src/settings/helpers.hpp60
-rw-r--r--src/settings/networkwidget.cpp100
-rw-r--r--src/settings/networkwidget.h63
-rw-r--r--src/settings/passexceptionswidget.cpp73
-rw-r--r--src/settings/passexceptionswidget.h53
-rw-r--r--src/settings/password_exceptions.ui55
-rw-r--r--src/settings/privacywidget.cpp135
-rw-r--r--src/settings/privacywidget.h67
-rw-r--r--src/settings/settings_advanced.ui245
-rw-r--r--src/settings/settings_appearance.ui455
-rw-r--r--src/settings/settings_general.ui274
-rw-r--r--src/settings/settings_privacy.ui284
-rw-r--r--src/settings/settings_tabs.ui297
-rw-r--r--src/settings/settings_webkit.ui254
-rw-r--r--src/settings/settingsdialog.cpp226
-rw-r--r--src/settings/settingsdialog.h80
-rw-r--r--src/settings/settingsdialog.ui122
-rw-r--r--src/settings/settingswidgets.hpp65
-rw-r--r--src/settings/tabswidget.cpp52
-rw-r--r--src/settings/tabswidget.h58
-rw-r--r--src/settings/test/dialog.cpp12
-rw-r--r--src/settings/test/fonts.cpp31
-rw-r--r--src/settings/webkitwidget.cpp71
-rw-r--r--src/settings/webkitwidget.h60
36 files changed, 554 insertions, 3635 deletions
diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml
index 61beefd2..539eee04 100644
--- a/bitbucket-pipelines.yml
+++ b/bitbucket-pipelines.yml
@@ -9,6 +9,7 @@ pipelines:
script:
- python --version
- pylint scripts/check_license.py
+ - pylint scripts/rekonf.py
- step:
name: license headers check
runs-on:
diff --git a/scripts/rekonf.py b/scripts/rekonf.py
new file mode 100755
index 00000000..56ded374
--- /dev/null
+++ b/scripts/rekonf.py
@@ -0,0 +1,118 @@
+#!/usr/bin/env python3
+# ============================================================
+# The rekonq project
+# ============================================================
+# SPDX-License-Identifier: GPL-3.0-only
+# Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
+# ============================================================
+""" Generate SettingsWidgets from KDE kcfg files """
+
+
+import argparse
+import sys
+from xml.etree import ElementTree
+
+
+def write_int_entry(entry):
+ '''Add a QSpinBox connected to an Int entry'''
+ print(f' // { entry.attrib["name"] }')
+ print(f' auto* { entry.attrib["key"] } = new QSpinBox(this);')
+ print(f' { entry.attrib["key"] }->setValue({ entry.find("{*}default").text });')
+ print(f' formLayout->addRow(tr("{ entry.attrib["name"] }"), { entry.attrib["key"] });')
+
+
+def write_bool_entry(entry):
+ '''Add a QCheckBox connected to a Bool entry'''
+ print(f' // { entry.attrib["name"] }')
+ print(f' auto* { entry.attrib["key"] } = new QCheckBox(tr("{ entry.attrib["name"] }"), this);')
+ print(f' { entry.attrib["key"] }->setChecked({ entry.find("{*}default").text });')
+ print(f' formLayout->addRow(QString(), { entry.attrib["key"] });')
+
+
+def write_string_entry(entry):
+ '''Add a QLineEdit connected to a String entry'''
+ print(f' // { entry.attrib["name"] }')
+ print(f' auto* { entry.attrib["key"] } = new QLineEdit(this);')
+ print(f' { entry.attrib["key"] }->setText("{ entry.find("{*}default").text }");')
+ print(f' formLayout->addRow(tr("{ entry.attrib["name"] }"), { entry.attrib["key"] });')
+
+
+def write_font_entry(entry):
+ '''Add a QFontComboBox connected to a Font entry'''
+ print(f' // { entry.attrib["name"] }')
+ print(f' auto* { entry.attrib["key"] } = new QFontComboBox(this);')
+ print(f' { entry.attrib["key"] }->setCurrentFont({ entry.find("{*}default").text });')
+ print(f' formLayout->addRow(tr("{ entry.attrib["name"] }"), { entry.attrib["key"] });')
+
+
+def write_shortcut_entry(entry):
+ '''Add a QKeySequenceEdit connected to a Shortcut entry'''
+ print(f' // { entry.attrib["name"] }')
+ print(f' auto* { entry.attrib["key"] } = new QKeySequenceEdit({{ "{entry.find("{*}default").text}" }}, this);')
+ print(f' formLayout->addRow(tr("{ entry.attrib["name"] }"), { entry.attrib["key"] });')
+
+
+def generate_group_widget(root, group):
+ '''Generate a class based on the group name'''
+ class_name = group.attrib["name"].replace(' ', '') + 'SettingsWidget'
+
+ # includes
+ print('// Includes')
+ print('#include "settingswidgets.hpp"')
+ print('#include "helpers.hpp"')
+ print('#include <QFormLayout>')
+ print('#include <QLineEdit>')
+ print('#include <QSpinBox>')
+ print('#include <QFontComboBox>')
+ print('#include <QKeySequenceEdit>')
+ print('#include <QCheckBox>')
+ print('// kcfg Includes')
+ for include in root.findall('{http://www.kde.org/standards/kcfg/1.0}include'):
+ print(f'#include <{ include.text }>')
+ print('')
+
+ print(f'{ class_name }::{ class_name }(QWidget *parent) : SettingsWidget(parent) {{')
+ print(' auto *formLayout = new QFormLayout;')
+ print(' setLayout(formLayout);')
+ print('')
+
+ print(' // Entries')
+ for entry in group.findall('{http://www.kde.org/standards/kcfg/1.0}entry'):
+ if entry.attrib.get("hidden") == "true":
+ print(f' // hidden entry { entry.attrib.get("name") }')
+ elif entry.attrib['type'] == 'Int':
+ write_int_entry(entry)
+ elif entry.attrib['type'] == 'Bool':
+ write_bool_entry(entry)
+ elif entry.attrib['type'] == 'String':
+ write_string_entry(entry)
+ elif entry.attrib['type'] == 'Font':
+ write_font_entry(entry)
+ elif entry.attrib['type'] == 'Shortcut':
+ write_shortcut_entry(entry)
+ else:
+ print(f'#error entry with unknown type { entry.attrib["type"] }')
+ print('')
+
+ print('}\n')
+
+ print(f'void { class_name }::save() {{ }}')
+ print(f'void { class_name }::reset() {{ }}')
+
+
+if __name__ == '__main__':
+ parser = argparse.ArgumentParser(description='Generate SettingsWidgets')
+ parser.add_argument('file', type=str, help='kcfg file')
+ parser.add_argument('--group', type=str, required=True, help='Group')
+ parser.add_argument('--output', type=str, default=None, help='Redirect output to file')
+ args = parser.parse_args()
+
+ with open(args.output, 'w', encoding="utf-8") if args.output else sys.stdout as sys.stdout:
+ tree = ElementTree.parse(args.file)
+ root = tree.getroot()
+
+ # groups
+ for group in root.findall('{http://www.kde.org/standards/kcfg/1.0}group'):
+ if group.attrib["name"] == args.group:
+ print('// This is an automatically generated file')
+ generate_group_widget(root, group)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 1877a108..9413217c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,6 +1,7 @@
### ------- sub dirs -------
ADD_SUBDIRECTORY( data )
+add_subdirectory(settings)
add_subdirectory(plugins)
### ------- sources --------
diff --git a/src/rekonq.kcfg b/src/rekonq.kcfg
index 8bd8b2ad..b51f0526 100644
--- a/src/rekonq.kcfg
+++ b/src/rekonq.kcfg
@@ -6,294 +6,127 @@
http://www.kde.org/standards/kcfg/1.0/kcfg.xsd" >
<!-- Includes -->
-<include>QtWebKit</include>
-<include>QDateTime</include>
-<include>KUrl</include>
-<include>KGlobalSettings</include>
<kcfgfile name="rekonqrc" />
-<!-- Miscellaneuos (not config UI) settings -->
-<group name="misc">
- <entry name="FirstExecution" type="Bool">
- <default>true</default>
- </entry>
- <entry name="showBookmarksToolbar" type="Bool">
- <default>false</default>
- </entry>
- <entry name="walletBlackList" type="StringList">
- <default></default>
- </entry>
- <entry name="recoverOnCrash" type="Int">
- <default>0</default>
- </entry>
- <entry name="createDesktopAppShortcut" type="Bool">
- <default>true</default>
- </entry>
- <entry name="createMenuAppShortcut" type="Bool">
- <default>false</default>
- </entry>
- <entry name="checkDefaultSearchEngine" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearHistory" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearDownloads" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearCookies" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearCachedPages" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearWebIcons" type="Bool">
- <default>true</default>
- </entry>
- <entry name="clearHomePageThumbs" type="Bool">
- <default>true</default>
- </entry>
- <entry name="whiteReferer" type="StringList">
- <default></default>
- </entry>
- <entry name="showHistoryPanel" type="Bool">
- <default>false</default>
- </entry>
- <entry name="showBookmarksPanel" type="Bool">
- <default>false</default>
- </entry>
- <entry name="savedSessions" type="StringList">
- <default></default>
- </entry>
-</group>
-
-
-<!-- New Tab Page Settings -->
-<group name="NewTabPage">
- <entry name="previewNames" type="StringList">
- <default>KDE Homepage,rekonq site</default>
- </entry>
- <entry name="previewUrls" type="StringList">
- <default>http://www.kde.org/,http://rekonq.kde.org/</default>
- </entry>
-</group>
-
-
<!-- General Settings -->
<group name="General">
- <entry name="startupBehaviour" type="Int">
- <default>1</default>
+ <entry key="FirstRun" type="Bool" hidden="true">
+ <default>true</default>
+ </entry>
+ <entry name="Language" key="lang" type="String">
+ <default>TODO: change type to StringList</default>
</entry>
- <entry name="homePage" type="String">
+ <entry name="Home page URL" key="homepage" type="String">
<default>http://www.kde.org/</default>
</entry>
- <entry name="downloadPath" type="Url">
- <default code="true">KUrl(KGlobalSettings::downloadPath())</default>
+ <entry name="New tab URL" key="newtab" type="String">
+ <default>http://www.kde.org/</default>
</entry>
- <entry name="askDownloadPath" type="Bool">
- <default>false</default>
+ <entry name="Default Search Engine" key="searchUrl" type="String">
+ <default>https://duckduckgo.com/?q=%1</default>
</entry>
- <entry name="kgetDownload" type="Bool">
- <default>false</default>
+ <entry name="Configuration Path" key="configPath" type="String">
+ <default>TODO: change type to Path</default>
</entry>
- <entry name="kgetList" type="Bool">
- <default>false</default>
+ <entry name="Load plugins from" key="pluginPath" type="String">
+ <default>TODO: change type to Path</default>
</entry>
</group>
-
-<!-- Tabs Settings -->
-<group name="Tabs">
- <!-- xxx -->
- <entry name="newTabsBehaviour" type="Int">
- <default>0</default>
- </entry>
- <entry name="newTabStartPage" type="Int">
- <default>0</default>
- </entry>
- <!-- xxx -->
- <entry name="hoveringTabOption" type="Int">
- <default>0</default>
- </entry>
- <entry name="openExternalLinksInNewWindow" type="Bool">
- <default>false</default>
- </entry>
- <entry name="lastTabClosesWindow" type="Bool">
- <default>false</default>
- </entry>
- <entry name="closeTabSelectPrevious" type="Bool">
- <default>false</default>
+<!-- Network -->
+<group name="Network">
+ <entry name="Save files to" key="downloadPath" type="String">
+ <default>TODO: change type to Path</default>
</entry>
- <entry name="openNewTabsNextToCurrent" type="Bool">
+ <entry name="Always ask me where to save files" key="downloadPathAsk" type="Bool">
<default>true</default>
</entry>
- <entry name="openNewTabsInForeground" type="Bool">
- <default>false</default>
+ <entry name="User Agent" key="userAgent" type="String">
+ <default>TODO</default>
</entry>
</group>
-
<!-- Fonts Settings -->
<group name="Appearance">
- <entry name="standardFontFamily" type="String">
- <default code="true">KGlobalSettings::generalFont().family()</default>
+ <entry name="Standard Font Family" key="standardFontFamily" type="Font">
+ <default code="true">getFont(QFont::AnyStyle)</default>
</entry>
- <entry name="fixedFontFamily" type="String">
- <default code="true">KGlobalSettings::fixedFont().family()</default>
+ <entry name="Fixed Font Family" key="fixedFontFamily" type="Font">
+ <default code="true">getFont(QFont::Monospace)</default>
</entry>
- <entry name="serifFontFamily" type="String">
- <default code="true">QWebSettings::globalSettings()->fontFamily(QWebSettings::SerifFont)</default>
+ <entry name="Serif Font Family" key="serifFontFamily" type="Font">
+ <default code="true">getFont(QFont::Serif)</default>
</entry>
- <entry name="sansSerifFontFamily" type="String">
- <default code="true">QWebSettings::globalSettings()->fontFamily(QWebSettings::SansSerifFont)</default>
+ <entry name="Sans Serif Font Family" key="sansSerifFontFamily" type="Font">
+ <default code="true">getFont(QFont::SansSerif)</default>
</entry>
- <entry name="cursiveFontFamily" type="String">
- <default code="true">QWebSettings::globalSettings()->fontFamily(QWebSettings::CursiveFont)</default>
+ <entry name="Cursive Font Family" key="cursiveFontFamily" type="Font">
+ <default code="true">getFont(QFont::Cursive)</default>
</entry>
- <entry name="fantasyFontFamily" type="String">
- <default code="true">QWebSettings::globalSettings()->fontFamily(QWebSettings::FantasyFont)</default>
+ <entry name="Fantasy Font Family" key="fantasyFontFamily" type="Font">
+ <default code="true">getFont(QFont::Fantasy)</default>
</entry>
- <entry name="defaultFontSize" type="Int">
+ <entry name="Default Font Size" key="defaultFontSize" type="Int">
<default>16</default>
</entry>
- <entry name="minFontSize" type="Int">
+ <entry name="Minimal Font Size" key="minFontSize" type="Int">
<default>7</default>
</entry>
- <entry name="defaultEncoding" type="String">
+ <entry name="Default encoding" key="defaultEncoding" type="String">
<default>ISO 8859-1</default>
</entry>
- <entry name="userCSS" type="Url">
- <default></default>
- </entry>
- <entry name="defaultZoom" type="Int">
+ <entry name="Default zoom" key="defaultZoom" type="Int">
<default>10</default>
</entry>
</group>
-
-<!-- Privacy Settings -->
-<group name="Privacy">
- <entry name="javascriptCanOpenWindows" type="Bool">
- <default>false</default>
- </entry>
- <entry name="javascriptCanAccessClipboard" type="Bool">
- <default>false</default>
- </entry>
- <entry name="expireHistory" type="Int">
- <default>0</default>
- </entry>
- <entry name="passwordSavingEnabled" type="Bool">
- <default>true</default>
- </entry>
-</group>
-
-
-<!-- WebKit Settings -->
-<group name="Webkit">
- <!-- xxx -->
- <entry name="javascriptEnabled" type="Bool">
- <default>true</default>
- </entry>
- <!-- xxx -->
- <entry name="pluginsEnabled" type="Int">
- <default>0</default>
- </entry>
- <!-- xxx -->
- <entry name="offlineStorageDatabaseEnabled" type="Bool">
- <default>true</default>
- </entry>
- <entry name="offlineWebApplicationCacheEnabled" type="Bool">
- <default>true</default>
- </entry>
- <entry name="localStorageEnabled" type="Bool">
- <default>true</default>
- </entry>
- <entry name="offlineWebApplicationCacheQuota" type="Int">
- <default>50</default>
- </entry>
- <!-- xxx -->
- <entry name="javaEnabled" type="Bool">
- <default>true</default>
- </entry>
- <entry name="webGL" type="Bool">
- <default>true</default>
- </entry>
- <entry name="spatialNavigation" type="Bool">
- <default>false</default>
- </entry>
- <entry name="frameFlattening" type="Bool">
- <default>false</default>
- </entry>
- <entry name="dnsPrefetch" type="Bool">
- <default>true</default>
- </entry>
- <entry name="printElementBackgrounds" type="Bool">
- <default>true</default>
- </entry>
- <entry name="zoomTextOnly" type="Bool">
- <default>false</default>
- </entry>
-</group>
-
-
-<!-- Advanced Settings -->
-<group name="Advanced">
- <entry name="hScrollWheelHistory" type="Bool">
- <default>false</default>
- </entry>
- <entry name="enableViShortcuts" type="Bool">
- <default>false</default>
- </entry>
- <entry name="accessKeysEnabled" type="Bool">
- <default>false</default>
+<!-- Shortcuts -->
+<group name="Shortcuts">
+ <entry name="Show sidebar" key="actionShowSidebar" type="Shortcut">
+ <default>Ctrl+B</default>
</entry>
- <entry name="smoothScrolling" type="Bool">
- <default>true</default>
+ <entry name="Show search bar" key="actionShowSearchBar" type="Shortcut">
+ <default>Ctrl+F</default>
</entry>
- <entry name="useFavicon" type="Bool">
- <default>false</default>
+ <entry name="Settings Dialog" key="actionSettings" type="Shortcut">
+ <default>Ctrl+S</default>
</entry>
- <entry name="middleClickAction" type="Int">
- <default>2</default>
+ <entry name="Quit" key="actionQuit" type="Shortcut">
+ <default>Ctrl+Q</default>
</entry>
- <entry name="automaticSpellChecking" type="Bool">
- <default>true</default>
+ <entry name="New Tab" key="actionNewTab" type="Shortcut">
+ <default>Ctrl+T</default>
</entry>
-</group>
-
-
-<!-- Sync Settings -->
-<group name="Sync">
- <entry name="syncEnabled" type="Bool">
- <default>false</default>
+ <entry name="Close Tab" key="actionCloseTab" type="Shortcut">
+ <default>Ctrl+W</default>
</entry>
- <entry name="syncBookmarks" type="Bool">
- <default>false</default>
+ <entry name="Switch tab left" key="actionSwitchTabLeft" type="Shortcut">
+ <default>Ctrl+Left</default>
</entry>
- <entry name="syncHistory" type="Bool">
- <default>false</default>
+ <entry name="Switch tab right" key="actionSwitchTabRight" type="Shortcut">
+ <default>Ctrl+Right</default>
</entry>
- <entry name="syncPasswords" type="Bool">
- <default>false</default>
+ <entry name="Focus address bar" key="actionFocusAddressBar" type="Shortcut">
+ <default>F6</default>
</entry>
- <entry name="syncType" type="Int">
- <default>0</default>
+ <entry name="Back" key="actionBack" type="Shortcut">
+ <default>Alt+Left</default>
</entry>
- <entry name="syncHost" type="String">
- <default></default>
+ <entry name="Forward" key="actionForward" type="Shortcut">
+ <default>Alt+Right</default>
</entry>
- <entry name="syncUser" type="String">
- <default></default>
+ <entry name="Refresh" key="actionRefresh" type="Shortcut">
+ <default>F5</default>
</entry>
- <entry name="syncPass" type="String">
- <default></default>
+ <entry name="Reload" key="actionReload" type="Shortcut">
+ <default>Ctrl+F5</default>
</entry>
- <entry name="syncPath" type="String">
- <default></default>
+ <entry name="Open" key="actionOpen" type="Shortcut">
+ <default>Ctrl+O</default>
</entry>
- <entry name="syncPort" type="Int">
- <default>-1</default>
+ <entry name="Create Bookmark" key="actionBookmark" type="Shortcut">
+ <default>Ctrl+D</default>
</entry>
</group>
diff --git a/src/rekonq.kcfgc b/src/rekonq.kcfgc
deleted file mode 100644
index 50a9817d..00000000
--- a/src/rekonq.kcfgc
+++ /dev/null
@@ -1,5 +0,0 @@
-File=rekonq.kcfg
-ClassName=ReKonfig
-Singleton=true
-Mutators=true
-UseEnumTypes=true
diff --git a/src/settings/CMakeLists.txt b/src/settings/CMakeLists.txt
new file mode 100644
index 00000000..91d8e5d6
--- /dev/null
+++ b/src/settings/CMakeLists.txt
@@ -0,0 +1,32 @@
+add_custom_command(OUTPUT generalsettingswidget.cpp DEPENDS ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg
+ COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/rekonf.py
+ --group=General --output=generalsettingswidget.cpp
+ ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg)
+add_custom_command(OUTPUT appearancesettingswidget.cpp DEPENDS ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg
+ COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/rekonf.py
+ --group=Appearance --output=appearancesettingswidget.cpp
+ ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg)
+add_custom_command(OUTPUT networksettingswidget.cpp DEPENDS ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg
+ COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/rekonf.py
+ --group=Network --output=networksettingswidget.cpp
+ ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg)
+add_custom_command(OUTPUT shortcutssettingswidget.cpp DEPENDS ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg
+ COMMAND python3 ${PROJECT_SOURCE_DIR}/scripts/rekonf.py
+ --group=Shortcuts --output=shortcutssettingswidget.cpp
+ ${PROJECT_SOURCE_DIR}/src/rekonq.kcfg)
+
+add_library(settings STATIC
+ settingsdialog.cpp settingsdialog.h settingsdialog.ui
+ settingswidgets.hpp helpers.hpp
+ generalsettingswidget.cpp appearancesettingswidget.cpp networksettingswidget.cpp shortcutssettingswidget.cpp
+)
+target_link_libraries(settings PUBLIC Qt6::Widgets)
+
+IF(TESTING)
+ add_executable(test_settingsdialog test/dialog.cpp)
+ target_link_libraries(test_settingsdialog settings)
+
+ add_executable(test_fonts test/fonts.cpp)
+ target_link_libraries(test_fonts GTest::gtest Qt6::Gui)
+ gtest_discover_tests(test_fonts)
+endif()
diff --git a/src/settings/advancedwidget.cpp b/src/settings/advancedwidget.cpp
deleted file mode 100644
index 73c889dc..00000000
--- a/src/settings/advancedwidget.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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/>.
-*
-* ============================================================ */
-
-
-// Local Includes
-#include "advancedwidget.h"
-#include "advancedwidget.moc"
-
-// Qt Includes
-#include <QProcess>
-
-
-AdvancedWidget::AdvancedWidget(QWidget *parent)
- : QWidget(parent)
- , _changed(false)
-{
- setupUi(this);
-
- connect(proxyButton, SIGNAL(clicked()), this, SLOT(launchProxySettings()));
-}
-
-
-void AdvancedWidget::save()
-{
-}
-
-
-bool AdvancedWidget::changed()
-{
- return _changed;
-}
-
-
-void AdvancedWidget::hasChanged()
-{
- _changed = true;
- emit changed(true);
-}
-
-
-void AdvancedWidget::launchProxySettings()
-{
- QString program = QL1S("kcmshell4");
- QStringList arguments;
- arguments << QL1S("proxy");
- QProcess *proc = new QProcess(this);
- proc->start(program, arguments);
-}
diff --git a/src/settings/advancedwidget.h b/src/settings/advancedwidget.h
deleted file mode 100644
index e7f5793d..00000000
--- a/src/settings/advancedwidget.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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 ADVANCED_WIDGET_H
-#define ADVANCED_WIDGET_H
-
-
-// Rekonq Includes
-#include "rekonq_defines.h"
-
-// Ui Includes
-#include "ui_settings_advanced.h"
-
-// Qt Includes
-#include <QWidget>
-
-
-class AdvancedWidget : public QWidget, private Ui::advanced
-{
- Q_OBJECT
-
-public:
- explicit AdvancedWidget(QWidget *parent = 0);
-
- void save();
- bool changed();
-
-Q_SIGNALS:
- void changed(bool);
-
-private Q_SLOTS:
- void hasChanged();
- void launchProxySettings();
-
-private:
- bool _changed;
-};
-
-#endif // ADVANCED_WIDGET_H
diff --git a/src/settings/appearancewidget.cpp b/src/settings/appearancewidget.cpp
deleted file mode 100644
index 89918ac7..00000000
--- a/src/settings/appearancewidget.cpp
+++ /dev/null
@@ -1,155 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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/>.
-*
-* ============================================================ */
-
-
-// Self Includes
-#include "appearancewidget.h"
-#include "appearancewidget.moc"
-
-// Auto Includes
-#include "rekonq.h"
-
-// KDE Includes
-#include <KGlobal>
-#include <KCharsets>
-
-
-int zoomFactorList[13] = {5, 6, 7, 8, 9, 10, 11, 13, 15, 20, 25, 30};
-
-
-
-AppearanceWidget::AppearanceWidget(QWidget *parent)
- : QWidget(parent)
- , _changed(false)
-{
- setupUi(this);
-
- fixedFontChooser->setOnlyFixed(true);
-
- standardFontChooser->setCurrentFont(QFont(ReKonfig::standardFontFamily()));
- fixedFontChooser->setCurrentFont(QFont(ReKonfig::fixedFontFamily()));
- serifFontChooser->setCurrentFont(QFont(ReKonfig::serifFontFamily()));
- sansSerifFontChooser->setCurrentFont(QFont(ReKonfig::sansSerifFontFamily()));
- cursiveFontChooser->setCurrentFont(QFont(ReKonfig::cursiveFontFamily()));
- fantasyFontChooser->setCurrentFont(QFont(ReKonfig::fantasyFontFamily()));
-
- connect(standardFontChooser, SIGNAL(currentFontChanged(QFont)), this, SLOT(hasChanged()));
- connect(fixedFontChooser, SIGNAL(currentFontChanged(QFont)), this, SLOT(hasChanged()));
- connect(serifFontChooser, SIGNAL(currentFontChanged(QFont)), this, SLOT(hasChanged()));
- connect(sansSerifFontChooser, SIGNAL(currentFontChanged(QFont)), this, SLOT(hasChanged()));
- connect(cursiveFontChooser, SIGNAL(currentFontChanged(QFont)), this, SLOT(hasChanged()));
- connect(fantasyFontChooser, SIGNAL(currentFontChanged(QFont)), this, SLOT(hasChanged()));
-
- populateEncodingMenu();
- populateZoomMenu();
-}
-
-
-void AppearanceWidget::save()
-{
- ReKonfig::setStandardFontFamily(standardFontChooser->currentFont().family());
- ReKonfig::setFixedFontFamily(fixedFontChooser->currentFont().family());
- ReKonfig::setSerifFontFamily(serifFontChooser->currentFont().family());
- ReKonfig::setSansSerifFontFamily(sansSerifFontChooser->currentFont().family());
- ReKonfig::setCursiveFontFamily(cursiveFontChooser->currentFont().family());
- ReKonfig::setFantasyFontFamily(fantasyFontChooser->currentFont().family());
-
- // zoom
- int index = zoomCombo->currentIndex();
- int zoomFactor = zoomFactorList[index];
- ReKonfig::setDefaultZoom(zoomFactor);
-}
-
-
-bool AppearanceWidget::changed()
-{
- return _changed;
-}
-
-
-void AppearanceWidget::hasChanged()
-{
- _changed = true;
- emit changed(true);
-}
-
-
-bool AppearanceWidget::isDefault()
-{
- // TODO: implement me!!
-
- return !_changed;
-}
-
-
-void AppearanceWidget::populateEncodingMenu()
-{
- encodingCombo->setEditable(false);
- QStringList encodings = KGlobal::charsets()->availableEncodingNames();
- encodingCombo->addItems(encodings);
-
- encodingCombo->setWhatsThis(i18n("Select the default encoding to be used; normally, you will be fine with 'Use language encoding' "
- "and should not have to change this."));
-
- QString enc = ReKonfig::defaultEncoding();
- int indexOfEnc = encodings.indexOf(enc);
- encodingCombo->setCurrentIndex(indexOfEnc);
-
- connect(encodingCombo, SIGNAL(activated(QString)), this, SLOT(setEncoding(QString)));
- connect(encodingCombo, SIGNAL(activated(QString)), this, SLOT(hasChanged()));
-}
-
-
-void AppearanceWidget::populateZoomMenu()
-{
- zoomCombo->setEditable(false);
- QStringList availableZooms;
-
- int actualZoom = 0;
- int defZoom = ReKonfig::defaultZoom();
-
- for (int i = 0; i < 13; i++)
- {
- int zoomFactor = zoomFactorList[i];
- QString zoomString = QString::number(zoomFactor*10) + QL1S("%");
- availableZooms << zoomString;
-
- if (zoomFactor == defZoom)
- {
- actualZoom = i;
- }
- }
-
- zoomCombo->addItems(availableZooms);
- zoomCombo->setCurrentIndex(actualZoom);
-
- connect(zoomCombo, SIGNAL(activated(QString)), this, SLOT(hasChanged()));
-}
-
-
-void AppearanceWidget::setEncoding(const QString &enc)
-{
- ReKonfig::setDefaultEncoding(enc);
-}
diff --git a/src/settings/appearancewidget.h b/src/settings/appearancewidget.h
deleted file mode 100644
index 39dafbaf..00000000
--- a/src/settings/appearancewidget.h
+++ /dev/null
@@ -1,66 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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 APPEARANCE_WIDGET_H
-#define APPEARANCE_WIDGET_H
-
-
-// Rekonq Includes
-#include "rekonq_defines.h"
-
-// Ui Includes
-#include "ui_settings_appearance.h"
-
-// Qt Includes
-#include <QtGui/QWidget>
-
-
-class AppearanceWidget : public QWidget, private Ui::appearance
-{
- Q_OBJECT
-
-public:
- explicit AppearanceWidget(QWidget *parent = 0);
-
- void save();
- bool changed();
- bool isDefault();
-
-Q_SIGNALS:
- void changed(bool);
-
-private Q_SLOTS:
- void hasChanged();
- void setEncoding(const QString &);
-
-private:
- void populateEncodingMenu();
- void populateZoomMenu();
-
- bool _changed;
-};
-
-#endif // APPEARANCE_WIDGET_H
diff --git a/src/settings/generalwidget.cpp b/src/settings/generalwidget.cpp
deleted file mode 100644
index ed38f35b..00000000
--- a/src/settings/generalwidget.cpp
+++ /dev/null
@@ -1,121 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2012 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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/>.
-*
-* ============================================================ */
-
-
-// Self Includes
-#include "generalwidget.h"
-#include "generalwidget.moc"
-
-// Auto Includes
-#include "rekonq.h"
-
-// Local Includes
-#include "application.h"
-#include "rekonqwindow.h"
-#include "webwindow.h"
-
-//KDE Includes
-#include <kstandarddirs.h>
-#include <KUrlRequester>
-
-
-GeneralWidget::GeneralWidget(QWidget *parent)
- : QWidget(parent)
- , _changed(false)
-{
- setupUi(this);
-
- connect(setHomeToCurrentPageButton, SIGNAL(clicked()), this, SLOT(setHomeToCurrentPage()));
-
- checkKGetPresence();
-
- connect(kcfg_homePage, SIGNAL(editingFinished()), this, SLOT(fixHomePageURL()));
-
- kcfg_downloadPath->setMode(KFile::Directory);
-
- askDownloadYes->setChecked(ReKonfig::askDownloadPath());
- askDownloadNo->setChecked(!ReKonfig::askDownloadPath());
-
- kcfg_downloadPath->setEnabled(!ReKonfig::askDownloadPath());
- connect(askDownloadNo, SIGNAL(toggled(bool)), kcfg_downloadPath, SLOT(setEnabled(bool)));
- connect(askDownloadNo, SIGNAL(toggled(bool)), this, SLOT(hasChanged()));
-}
-
-
-void GeneralWidget::save()
-{
- ReKonfig::setAskDownloadPath(askDownloadYes->isChecked());
-
- _changed = false;
-}
-
-
-bool GeneralWidget::changed()
-{
- return _changed;
-}
-
-
-void GeneralWidget::hasChanged()
-{
- _changed = true;
- emit changed(true);
-}
-
-
-void GeneralWidget::setHomeToCurrentPage()
-{
- if (!rApp->rekonqWindow())
- return;
-
- WebWindow *tab = rApp->rekonqWindow()->currentWebWindow();
- if (!tab)
- return;
-
- kcfg_homePage->setText(tab->url().url());
-}
-
-
-void GeneralWidget::checkKGetPresence()
-{
- if (KStandardDirs::findExe("kget").isNull())
- {
- kcfg_kgetDownload->setDisabled(true);
- kcfg_kgetList->setDisabled(true);
- kcfg_kgetDownload->setToolTip(i18n("Install KGet to enable rekonq to use it as download manager"));
- }
- else
- {
- kcfg_kgetDownload->setDisabled(false);
- kcfg_kgetList->setDisabled(false);
- }
-}
-
-
-void GeneralWidget::fixHomePageURL()
-{
- QString fixedURL = QUrl::fromUserInput(kcfg_homePage->text()).toString();
- kcfg_homePage->setText(fixedURL);
-}
diff --git a/src/settings/generalwidget.h b/src/settings/generalwidget.h
deleted file mode 100644
index b0caa46c..00000000
--- a/src/settings/generalwidget.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2012 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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 GENERAL_WIDGET_H
-#define GENERAL_WIDGET_H
-
-
-// Ui Includes
-#include "ui_settings_general.h"
-
-// Qt Includes
-#include <QWidget>
-
-
-class GeneralWidget : public QWidget, private Ui::general
-{
- Q_OBJECT
-
-public:
- explicit GeneralWidget(QWidget *parent = 0);
-
- void save();
- bool changed();
- void checkKGetPresence();
-
-Q_SIGNALS:
- void changed(bool);
-
-private Q_SLOTS:
- void hasChanged();
- void setHomeToCurrentPage();
- void fixHomePageURL();
-
-private:
- bool _changed;
-};
-
-#endif // GENERAL_WIDGET_H
diff --git a/src/settings/helpers.hpp b/src/settings/helpers.hpp
new file mode 100644
index 00000000..d7fcda4f
--- /dev/null
+++ b/src/settings/helpers.hpp
@@ -0,0 +1,60 @@
+/* ============================================================
+ * The rekonq project
+ * ============================================================
+ * SPDX-License-Identifier: GPL-3.0-only
+ * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
+ * ============================================================
+ * Description: Settings helpers
+ * ============================================================ */
+
+#pragma once
+
+#include <QFont>
+#include <QFontDatabase>
+
+[[nodiscard]] static QFont getFont(QFont::StyleHint hint)
+{
+ switch (hint) {
+ case QFont::Helvetica: { // sans serif
+ QFont font("sans serif");
+ font.setStyleHint(hint);
+ return font;
+ }
+ case QFont::Times: { // serif
+ QFont font("serif");
+ font.setStyleHint(hint);
+ return font;
+ }
+
+ case QFont::Monospace:
+ case QFont::Courier: { // typewriter
+ auto font = QFontDatabase::systemFont(QFontDatabase::FixedFont);
+ font.setStyleHint(hint);
+ return font;
+ }
+
+ case QFont::OldEnglish: { // decorative
+ auto font = QFont("decorative");
+ font.setStyleHint(hint);
+ return font;
+ }
+
+ case QFont::System:
+ case QFont::AnyStyle:
+ return QFontDatabase::systemFont(QFontDatabase::GeneralFont);
+
+ case QFont::Cursive: {
+ QFont font("cursive");
+ font.setStyleHint(hint);
+ return font;
+ }
+
+ case QFont::Fantasy: {
+ QFont font("fantasy");
+ font.setStyleHint(hint);
+ return font;
+ }
+ }
+
+ __builtin_unreachable();
+}
diff --git a/src/settings/networkwidget.cpp b/src/settings/networkwidget.cpp
deleted file mode 100644
index c2988eb1..00000000
--- a/src/settings/networkwidget.cpp
+++ /dev/null
@@ -1,100 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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/>.
-*
-* ============================================================ */
-
-
-// Self Includes
-#include "networkwidget.h"
-#include "networkwidget.moc"
-
-// KDE Includes
-#include <KTabWidget>
-#include <KCModuleInfo>
-
-// Qt Includes
-#include <QVBoxLayout>
-
-
-NetworkWidget::NetworkWidget(QWidget *parent)
- : QWidget(parent)
- , _cacheModule(0)
- , _cookiesModule(0)
- , _proxyModule(0)
- , _changed(false)
-{
- QVBoxLayout *l = new QVBoxLayout(this);
- l->setMargin(0);
- l->setSpacing(0);
-
- KTabWidget *tabWidget = new KTabWidget(this);
- l->addWidget(tabWidget);
-
- KCModuleInfo cacheInfo("cache.desktop");
- _cacheModule = new KCModuleProxy(cacheInfo, parent);
- tabWidget->addTab(_cacheModule, i18n(cacheInfo.moduleName().toUtf8()));
-
- KCModuleInfo cookiesInfo("cookies.desktop");
- _cookiesModule = new KCModuleProxy(cookiesInfo, parent);
- tabWidget->addTab(_cookiesModule, i18n(cookiesInfo.moduleName().toUtf8()));
-
- KCModuleInfo proxyInfo("proxy.desktop");
- _proxyModule = new KCModuleProxy(proxyInfo, parent);
- tabWidget->addTab(_proxyModule, i18n(proxyInfo.moduleName().toUtf8()));
-
- connect(_cacheModule, SIGNAL(changed(bool)), this, SLOT(hasChanged()));
- connect(_cookiesModule, SIGNAL(changed(bool)), this, SLOT(hasChanged()));
- connect(_proxyModule, SIGNAL(changed(bool)), this, SLOT(hasChanged()));
-}
-
-
-NetworkWidget::~NetworkWidget()
-{
- delete _cacheModule;
- delete _cookiesModule;
- delete _proxyModule;
-}
-
-
-void NetworkWidget::save()
-{
- _cookiesModule->save();
- _proxyModule->save();
- _cacheModule->save();
-
- _changed = false;
- emit changed(false);
-}
-
-
-void NetworkWidget::hasChanged()
-{
- _changed = true;
- emit changed(true);
-}
-
-
-bool NetworkWidget::changed()
-{
- return _changed;
-}
diff --git a/src/settings/networkwidget.h b/src/settings/networkwidget.h
deleted file mode 100644
index f0cf28f1..00000000
--- a/src/settings/networkwidget.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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 NETWORK_WIDGET_H
-#define NETWORK_WIDGET_H
-
-
-// KDE Includes
-#include <KCModuleProxy>
-
-// Qt Includes
-#include <QWidget>
-
-
-class NetworkWidget : public QWidget
-{
- Q_OBJECT
-
-public:
- explicit NetworkWidget(QWidget *parent = 0);
- ~NetworkWidget();
-
- void save();
- bool changed();
-
-Q_SIGNALS:
- void changed(bool);
-
-private Q_SLOTS:
- void hasChanged();
-
-private:
- KCModuleProxy *_cacheModule;
- KCModuleProxy *_cookiesModule;
- KCModuleProxy *_proxyModule;
-
- bool _changed;
-};
-
-#endif // NETWORK_WIDGET_H
diff --git a/src/settings/passexceptionswidget.cpp b/src/settings/passexceptionswidget.cpp
deleted file mode 100644
index fe20e711..00000000
--- a/src/settings/passexceptionswidget.cpp
+++ /dev/null
@@ -1,73 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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/>.
-*
-* ============================================================ */
-
-
-// Self Includes
-#include "passexceptionswidget.h"
-#include "passexceptionswidget.moc"
-
-// Auto Includes
-#include "rekonq.h"
-
-
-PassExWidget::PassExWidget(QWidget *parent)
- : QWidget(parent)
-{
- setupUi(this);
-
- setAttribute(Qt::WA_DeleteOnClose, true);
-
- connect(removeOneButton, SIGNAL(clicked()), this, SLOT(removeOne()));
- connect(removeAllButton, SIGNAL(clicked()), this, SLOT(removeAll()));
-
- QStringList exList = ReKonfig::walletBlackList();
- Q_FOREACH(const QString & str, exList)
- {
- QListWidgetItem *item = new QListWidgetItem(str, listWidget);
- listWidget->addItem(item);
- }
-}
-
-
-void PassExWidget::removeOne()
-{
- const int currentRow(listWidget->currentRow());
- if (currentRow == -1)
- return;
- QString item = listWidget->takeItem(currentRow)->text();
-
- QStringList exList = ReKonfig::walletBlackList();
- exList.removeOne(item);
- ReKonfig::setWalletBlackList(exList);
-}
-
-
-void PassExWidget::removeAll()
-{
- listWidget->clear();
-
- QStringList clearList;
- ReKonfig::setWalletBlackList(clearList);
-}
diff --git a/src/settings/passexceptionswidget.h b/src/settings/passexceptionswidget.h
deleted file mode 100644
index 2a538fcc..00000000
--- a/src/settings/passexceptionswidget.h
+++ /dev/null
@@ -1,53 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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 PASS_EX_WIDGET_H
-#define PASS_EX_WIDGET_H
-
-
-// Rekonq Includes
-#include "rekonq_defines.h"
-
-// Ui Includes
-#include "ui_password_exceptions.h"
-
-// Qt Includes
-#include <QWidget>
-
-
-class PassExWidget : public QWidget, private Ui::PassExceptions
-{
- Q_OBJECT
-
-public:
- explicit PassExWidget(QWidget *parent = 0);
-
-private Q_SLOTS:
- void removeOne();
- void removeAll();
-};
-
-#endif // PASS_EX_WIDGET_H
diff --git a/src/settings/password_exceptions.ui b/src/settings/password_exceptions.ui
deleted file mode 100644
index 97cf621b..00000000
--- a/src/settings/password_exceptions.ui
+++ /dev/null
@@ -1,55 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>PassExceptions</class>
- <widget class="QWidget" name="PassExceptions">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>400</width>
- <height>300</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Password Exceptions</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QListWidget" name="listWidget"/>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="removeOneButton">
- <property name="text">
- <string>Remove one</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="removeAllButton">
- <property name="text">
- <string>Remove all</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/settings/privacywidget.cpp b/src/settings/privacywidget.cpp
deleted file mode 100644
index f1523ee9..00000000
--- a/src/settings/privacywidget.cpp
+++ /dev/null
@@ -1,135 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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/>.
-*
-* ============================================================ */
-
-
-// Self Includes
-#include "privacywidget.h"
-#include "privacywidget.moc"
-
-// Local Includes
-#include "passexceptionswidget.h"
-
-// Auto Includes
-#include "rekonq.h"
-
-// KDE Includes
-#include <KDialog>
-#include <KPushButton>
-
-// Qt Includes
-#include <QProcess>
-
-
-PrivacyWidget::PrivacyWidget(QWidget *parent)
- : QWidget(parent)
- , _changed(false)
-{
- setupUi(this);
-
- reload();
-
- // DO NOT TRACK
- KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
- doNotTrackCheckBox->setChecked(cg.readEntry("DoNotTrack", false));
- connect(doNotTrackCheckBox, SIGNAL(clicked()), this, SLOT(hasChanged()));
-
- // CACHE & COOKIES
- connect(cacheButton, SIGNAL(clicked()), this, SLOT(launchCacheSettings()));
- connect(cookiesButton, SIGNAL(clicked()), this, SLOT(launchCookieSettings()));
-
- // PASSWORDS
- connect(managePassExceptionsButton, SIGNAL(clicked()), this, SLOT(showPassExceptions()));
-}
-
-
-void PrivacyWidget::save()
-{
- KConfigGroup cg = KConfigGroup(KSharedConfig::openConfig("kioslaverc", KConfig::NoGlobals), QString());
- cg.writeEntry("DoNotTrack", doNotTrackCheckBox->isChecked());
- cg.sync();
-
- reload();
-}
-
-
-void PrivacyWidget::reload()
-{
- bool b = ReKonfig::javascriptEnabled();
-
- kcfg_javascriptCanAccessClipboard->setEnabled(b);
- kcfg_javascriptCanOpenWindows->setEnabled(b);
-
- if (b)
- {
- kcfg_javascriptCanOpenWindows->setToolTip(i18n("If enabled, JavaScript programs are allowed to open new windows."));
- kcfg_javascriptCanAccessClipboard->setToolTip(i18n("If enabled, JavaScript programs are allowed to read from and to write to the clipboard."));
- }
- else
- {
- QString str = i18n("Javascript is not enabled, cannot change these settings");
- kcfg_javascriptCanOpenWindows->setToolTip(str);
- kcfg_javascriptCanAccessClipboard->setToolTip(str);
- }
-}
-
-
-bool PrivacyWidget::changed()
-{
- return _changed;
-}
-
-
-void PrivacyWidget::hasChanged()
-{
- _changed = true;
- emit changed(true);
-}
-
-
-void PrivacyWidget::launchCacheSettings()
-{
- QString program = QL1S("kcmshell4");
- QStringList arguments;
- arguments << QL1S("cache");
- QProcess *proc = new QProcess(this);
- proc->start(program, arguments);
-}
-
-
-void PrivacyWidget::launchCookieSettings()
-{
- QString program = QL1S("kcmshell4");
- QStringList arguments;
- arguments << QL1S("cookies");
- QProcess *proc = new QProcess(this);
- proc->start(program, arguments);
-}
-
-
-void PrivacyWidget::showPassExceptions()
-{
- PassExWidget *widg = new PassExWidget;
- widg->show();
-}
diff --git a/src/settings/privacywidget.h b/src/settings/privacywidget.h
deleted file mode 100644
index 7bbf70b8..00000000
--- a/src/settings/privacywidget.h
+++ /dev/null
@@ -1,67 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2012 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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 PRIVACY_WIDGET_H
-#define PRIVACY_WIDGET_H
-
-
-// Rekonq Includes
-#include "rekonq_defines.h"
-
-// Ui Includes
-#include "ui_settings_privacy.h"
-
-// Qt Includes
-#include <QWidget>
-
-
-class PrivacyWidget : public QWidget, private Ui::privacy
-{
- Q_OBJECT
-
-public:
- explicit PrivacyWidget(QWidget *parent = 0);
-
- void save();
- void reload();
-
- bool changed();
-
-Q_SIGNALS:
- void changed(bool);
-
-private Q_SLOTS:
- void hasChanged();
-
- void launchCacheSettings();
- void launchCookieSettings();
- void showPassExceptions();
-
-private:
- bool _changed;
-};
-
-#endif // PRIVACY_WIDGET_H
diff --git a/src/settings/settings_advanced.ui b/src/settings/settings_advanced.ui
deleted file mode 100644
index c34d24d6..00000000
--- a/src/settings/settings_advanced.ui
+++ /dev/null
@@ -1,245 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>advanced</class>
- <widget class="QWidget" name="advanced">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>570</width>
- <height>473</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>Proxy</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Rekonq is using system proxy settings</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="proxyButton">
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Change proxy settings</string>
- </property>
- <property name="icon">
- <iconset theme="preferences-system-network">
- <normaloff/>
- </iconset>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>Custom Style Sheet</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label_5">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Path to custom CSS file:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KUrlRequester" name="kcfg_userCSS">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <property name="filter">
- <string>*.css</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Misc</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QCheckBox" name="kcfg_hScrollWheelHistory">
- <property name="text">
- <string>Use horizontal scroll wheel to go through web history</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_useFavicon">
- <property name="text">
- <string>Use favicon of the current website as window icon</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_smoothScrolling">
- <property name="toolTip">
- <string>Scroll pages with an eye candy effect</string>
- </property>
- <property name="text">
- <string>Enable smooth scrolling</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_enableViShortcuts">
- <property name="text">
- <string>Enable Vi-like navigation shortcuts</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_accessKeysEnabled">
- <property name="text">
- <string>Enable keyboard navigation using the Ctrl key</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_automaticSpellChecking">
- <property name="text">
- <string>Enable automatic spell checking</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QLabel" name="label_11">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Middle click should:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="kcfg_middleClickAction">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <item>
- <property name="text">
- <string>Auto-scroll</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Load Clipboard URL</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Do Nothing</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>189</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KUrlRequester</class>
- <extends>QFrame</extends>
- <header>kurlrequester.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/settings/settings_appearance.ui b/src/settings/settings_appearance.ui
deleted file mode 100644
index 0854d799..00000000
--- a/src/settings/settings_appearance.ui
+++ /dev/null
@@ -1,455 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>appearance</class>
- <widget class="QWidget" name="appearance">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>502</width>
- <height>558</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Appearance</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Fonts</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Standard font:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="KFontComboBox" name="standardFontChooser">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Fixed font:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="KFontComboBox" name="fixedFontChooser">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_3">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Serif font:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="KFontComboBox" name="serifFontChooser">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_6">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Sans Serif font:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="KFontComboBox" name="sansSerifFontChooser">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_7">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Cursive font:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="KFontComboBox" name="cursiveFontChooser">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_8">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Fantasy font:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="KFontComboBox" name="fantasyFontChooser">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>Font size</string>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="0" column="0">
- <widget class="QLabel" name="label_9">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Default font size:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Minimal font size:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="KIntNumInput" name="kcfg_minFontSize">
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="KIntNumInput" name="kcfg_defaultFontSize">
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_5">
- <property name="title">
- <string>Zoom</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QLabel" name="label_11">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Default page zoom:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KComboBox" name="zoomCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_4">
- <property name="title">
- <string>Character Encoding</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label_10">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Default character encoding:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KComboBox" name="encodingCombo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_3">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>149</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KFontComboBox</class>
- <extends>KComboBox</extends>
- <header>kfontcombobox.h</header>
- </customwidget>
- <customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header>kcombobox.h</header>
- </customwidget>
- <customwidget>
- <class>KIntNumInput</class>
- <extends>QWidget</extends>
- <header>knuminput.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/settings/settings_general.ui b/src/settings/settings_general.ui
deleted file mode 100644
index e0aea007..00000000
--- a/src/settings/settings_general.ui
+++ /dev/null
@@ -1,274 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>general</class>
- <widget class="QWidget" name="general">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>573</width>
- <height>410</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>General</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>First settings</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="1" column="0">
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="layoutDirection">
- <enum>Qt::LeftToRight</enum>
- </property>
- <property name="text">
- <string>When starting rekonq:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_2">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Home page URL:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="KLineEdit" name="kcfg_homePage">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QPushButton" name="setHomeToCurrentPageButton">
- <property name="text">
- <string>Set to Current Page</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- <item row="1" column="1">
- <widget class="KComboBox" name="kcfg_startupBehaviour">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <item>
- <property name="text">
- <string>Open the Home Page</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Open the New Tab Page</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Restore the Last Opened Tabs</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Show session dialog</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_4">
- <property name="title">
- <string>Downloads Management</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QRadioButton" name="askDownloadNo">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Save files to:</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KUrlRequester" name="kcfg_downloadPath">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <widget class="QRadioButton" name="askDownloadYes">
- <property name="text">
- <string>Always ask me where to save files</string>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_3">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeType">
- <enum>QSizePolicy::Fixed</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>10</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_kgetDownload">
- <property name="text">
- <string>Use KGet for downloading files</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_kgetList">
- <property name="whatsThis">
- <string>If enabled, rekonq will display an additional context menu entry, which, when selected, lists all available links of the current website in KGet.</string>
- </property>
- <property name="text">
- <string>List links with KGet</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>179</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header>kcombobox.h</header>
- </customwidget>
- <customwidget>
- <class>KLineEdit</class>
- <extends>QLineEdit</extends>
- <header>klineedit.h</header>
- </customwidget>
- <customwidget>
- <class>KUrlRequester</class>
- <extends>QFrame</extends>
- <header>kurlrequester.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/settings/settings_privacy.ui b/src/settings/settings_privacy.ui
deleted file mode 100644
index fd0e60ba..00000000
--- a/src/settings/settings_privacy.ui
+++ /dev/null
@@ -1,284 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>privacy</class>
- <widget class="QWidget" name="privacy">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>535</width>
- <height>520</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_7">
- <item>
- <widget class="QGroupBox" name="groupBox_4">
- <property name="title">
- <string>JavaScript</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <item>
- <widget class="QCheckBox" name="kcfg_javascriptCanOpenWindows">
- <property name="text">
- <string>Let JavaScript open new windows</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_javascriptCanAccessClipboard">
- <property name="text">
- <string>Let JavaScript access clipboard</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>Tracking</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_3">
- <item>
- <widget class="QCheckBox" name="doNotTrackCheckBox">
- <property name="text">
- <string>Tell websites you do not want to be tracked</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_5">
- <property name="title">
- <string>Passwords</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QCheckBox" name="kcfg_passwordSavingEnabled">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Remember passwords for sites</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="managePassExceptionsButton">
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Manage Exceptions</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>Cookies</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>Rekonq is sharing cookies settings with all other KDE applications</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_3">
- <item>
- <widget class="QPushButton" name="cookiesButton">
- <property name="minimumSize">
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Manage Cookies</string>
- </property>
- <property name="icon">
- <iconset theme="preferences-web-browser-cookies">
- <normaloff/>
- </iconset>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_6">
- <property name="title">
- <string>Cache</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_6">
- <item>
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>Rekonq is sharing cache settings with all other KDE applications</string>
- </property>
- <property name="wordWrap">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <widget class="QPushButton" name="cacheButton">
- <property name="minimumSize">
- <size>
- <width>150</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>Manage Cache</string>
- </property>
- <property name="icon">
- <iconset theme="preferences-web-browser-cache">
- <normaloff/>
- </iconset>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_4">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_2">
- <property name="title">
- <string>History</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Remove history items:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QComboBox" name="kcfg_expireHistory">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <item>
- <property name="text">
- <string>Never</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Every 3 months</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Every month</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Every day</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>At application exit</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Do not even store them</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>135</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/settings/settings_tabs.ui b/src/settings/settings_tabs.ui
deleted file mode 100644
index 6acc06d8..00000000
--- a/src/settings/settings_tabs.ui
+++ /dev/null
@@ -1,297 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>tabs</class>
- <widget class="QWidget" name="tabs">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>483</width>
- <height>427</height>
- </rect>
- </property>
- <property name="windowTitle">
- <string>Tabs</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="title">
- <string>New Tab Behavior</string>
- </property>
- <layout class="QGridLayout" name="gridLayout">
- <item row="0" column="0">
- <widget class="QLabel" name="label_4">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>New tab opens:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
- <widget class="KComboBox" name="kcfg_newTabsBehaviour">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <item>
- <property name="text">
- <string>New Tab Page</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Blank Page</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string comment="@item:inlistbox">Home Page</string>
- </property>
- </item>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QLabel" name="label_5">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>New Tab Page starts with:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="KComboBox" name="kcfg_newTabStartPage">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <item>
- <property name="text">
- <string>Favorites</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Bookmarks</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>History</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Downloads</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Closed Tabs</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_4">
- <property name="title">
- <string>Tabbed Browsing</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label_6">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>When hovering a tab show:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KComboBox" name="kcfg_hoveringTabOption">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <item>
- <property name="text">
- <string>Tab Preview</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Tab's Title in a Tooltip</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Tab's URL in a Tooltip</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string comment="@item:inlistbox">Nothing</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_openExternalLinksInNewWindow">
- <property name="text">
- <string>Open as new window when URL is called externally</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_lastTabClosesWindow">
- <property name="text">
- <string>Closing last tab closes window</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_closeTabSelectPrevious">
- <property name="text">
- <string>Activate previously used tab when closing the current one</string>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_openNewTabsNextToCurrent">
- <property name="text">
- <string>Open new tabs next to current tab</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_openNewTabsInForeground">
- <property name="text">
- <string>Open new tabs in the foreground</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>120</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header>kcombobox.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/settings/settings_webkit.ui b/src/settings/settings_webkit.ui
deleted file mode 100644
index 69cc0fdf..00000000
--- a/src/settings/settings_webkit.ui
+++ /dev/null
@@ -1,254 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<ui version="4.0">
- <class>webkit</class>
- <widget class="QWidget" name="webkit">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>503</width>
- <height>514</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
- <widget class="QGroupBox" name="groupBox">
- <property name="title">
- <string>General</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QCheckBox" name="kcfg_javascriptEnabled">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Enable JavaScript</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_javaEnabled">
- <property name="text">
- <string>Load Java applets</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_webGL">
- <property name="text">
- <string>WebGL</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_spatialNavigation">
- <property name="text">
- <string>Spatial Navigation</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_frameFlattening">
- <property name="text">
- <string>Frame Flattening</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_dnsPrefetch">
- <property name="text">
- <string>Prefetch DNS entries</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_printElementBackgrounds">
- <property name="text">
- <string>Print element backgrounds</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_zoomTextOnly">
- <property name="text">
- <string>Zoom Text only</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_3">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Preferred" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="title">
- <string>Plugins</string>
- </property>
- <layout class="QHBoxLayout" name="horizontalLayout_2">
- <item>
- <widget class="QLabel" name="label_2">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Minimum">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>0</width>
- <height>0</height>
- </size>
- </property>
- <property name="text">
- <string>When loading web pages:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KComboBox" name="kcfg_pluginsEnabled">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <item>
- <property name="text">
- <string>Autoload Plugins</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Manually Load Plugins</string>
- </property>
- </item>
- <item>
- <property name="text">
- <string>Never Load Plugins</string>
- </property>
- </item>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <widget class="QGroupBox" name="groupBox_4">
- <property name="title">
- <string>HTML 5</string>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QCheckBox" name="kcfg_offlineStorageDatabaseEnabled">
- <property name="text">
- <string>Offline storage database</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_offlineWebApplicationCacheEnabled">
- <property name="text">
- <string>Offline web application cache</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="kcfg_localStorageEnabled">
- <property name="text">
- <string>Local Storage</string>
- </property>
- </widget>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout">
- <item>
- <widget class="QLabel" name="label">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Preferred">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="text">
- <string>Offline web application quota:</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
- </property>
- </widget>
- </item>
- <item>
- <widget class="KIntNumInput" name="kcfg_offlineWebApplicationCacheQuota">
- <property name="minimumSize">
- <size>
- <width>300</width>
- <height>0</height>
- </size>
- </property>
- <property name="minimum">
- <number>0</number>
- </property>
- <property name="suffix">
- <string> Kb</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </item>
- <item>
- <spacer name="verticalSpacer_2">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>20</width>
- <height>40</height>
- </size>
- </property>
- </spacer>
- </item>
- </layout>
- </widget>
- <customwidgets>
- <customwidget>
- <class>KComboBox</class>
- <extends>QComboBox</extends>
- <header>kcombobox.h</header>
- </customwidget>
- <customwidget>
- <class>KIntNumInput</class>
- <extends>QWidget</extends>
- <header>knuminput.h</header>
- </customwidget>
- </customwidgets>
- <resources/>
- <connections/>
-</ui>
diff --git a/src/settings/settingsdialog.cpp b/src/settings/settingsdialog.cpp
index 11575f79..e869fe10 100644
--- a/src/settings/settingsdialog.cpp
+++ b/src/settings/settingsdialog.cpp
@@ -1,215 +1,29 @@
/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2008-2012 by Andrea Diamantini <adjam7 at gmail dot com>
-* Copyright (C) 2009-2011 by Lionel Chauvin <megabigbug@yahoo.fr>
-*
-*
-* 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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/>.
-*
-* ============================================================ */
+ * The rekonq project
+ * ============================================================
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright (C) 2008-2012 by Andrea Diamantini <adjam7 at gmail dot com>
+ * Copyright (C) 2009-2011 by Lionel Chauvin <megabigbug@yahoo.fr>
+ * SPDX-License-Identifier: GPL-3.0-only
+ * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
+ * ============================================================
+ * Description: Settings Dialog
+ * ============================================================ */
-
-// Self Includes
#include "settingsdialog.h"
-#include "settingsdialog.moc"
-
-// Auto Includes
-#include "rekonq.h"
-
-// Local Includes
-#include "searchengine.h"
-
-// Widget Includes
-#include "advancedwidget.h"
-#include "appearancewidget.h"
-#include "generalwidget.h"
-#include "privacywidget.h"
-#include "tabswidget.h"
-#include "webkitwidget.h"
-
-// KDE Includes
-#include <KConfig>
-#include <KStandardDirs>
-#include <KPageWidgetItem>
-#include <KCModuleInfo>
-#include <KCModuleProxy>
-
-// Qt Includes
-#include <QtGui/QWidget>
-
-
-class Private
-{
-private:
- Private(SettingsDialog *parent);
-
-private:
- GeneralWidget *generalWidg;
- TabsWidget *tabsWidg;
- AppearanceWidget *appearanceWidg;
- WebKitWidget *webkitWidg;
- PrivacyWidget *privacyWidg;
- AdvancedWidget *advancedWidg;
-
- KCModuleProxy *ebrowsingModule;
-
- friend class SettingsDialog;
-};
+#include "settingswidgets.hpp"
+#include "ui_settingsdialog.h"
-
-Private::Private(SettingsDialog *parent)
+SettingsDialog::SettingsDialog(QWidget *parent) : QDialog(parent), ui(new Ui::SettingsDialog)
{
- KPageWidgetItem *pageItem;
-
- // -- 1
- generalWidg = new GeneralWidget(parent);
- generalWidg->layout()->setMargin(0);
- pageItem = parent->addPage(generalWidg, i18n("General"));
- pageItem->setIcon(KIcon("rekonq"));
-
- // -- 2
- tabsWidg = new TabsWidget(parent);
- tabsWidg->layout()->setMargin(0);
- pageItem = parent->addPage(tabsWidg, i18n("Tabs"));
- pageItem->setIcon(KIcon("tab-duplicate"));
-
- // -- 3
- appearanceWidg = new AppearanceWidget(parent);
- appearanceWidg->layout()->setMargin(0);
- pageItem = parent->addPage(appearanceWidg, i18n("Appearance"));
- pageItem->setIcon(KIcon("preferences-desktop-font"));
-
- // -- 4
- webkitWidg = new WebKitWidget(parent);
- webkitWidg->layout()->setMargin(0);
- pageItem = parent->addPage(webkitWidg, i18n("WebKit"));
- QString webkitIconPath = KStandardDirs::locate("appdata", "pics/webkit-icon.png");
- KIcon webkitIcon = KIcon(QIcon(webkitIconPath));
- pageItem->setIcon(webkitIcon);
-
- // -- 5
- privacyWidg = new PrivacyWidget(parent);
- privacyWidg->layout()->setMargin(0);
- pageItem = parent->addPage(privacyWidg, i18n("Privacy"));
- pageItem->setIcon(KIcon("view-media-artist"));
+ ui->setupUi(this);
- // -- 6
- advancedWidg = new AdvancedWidget(parent);
- advancedWidg->layout()->setMargin(0);
- pageItem = parent->addPage(advancedWidg, i18n("Advanced"));
- pageItem->setIcon(KIcon("applications-system"));
+ ui->stackedWidget->addWidget(new GeneralSettingsWidget);
+ ui->stackedWidget->addWidget(new AppearanceSettingsWidget);
+ ui->stackedWidget->addWidget(new NetworkSettingsWidget);
+ ui->stackedWidget->addWidget(new ShortcutsSettingsWidget);
- // -- 7
- KCModuleInfo ebrowsingInfo("ebrowsing.desktop");
- ebrowsingModule = new KCModuleProxy(ebrowsingInfo, parent);
- pageItem = parent->addPage(ebrowsingModule, i18n("Search Engines"));
- KIcon wsIcon("edit-web-search");
- if (wsIcon.isNull())
- {
- wsIcon = KIcon("preferences-web-browser-shortcuts");
- }
- pageItem->setIcon(wsIcon);
-
- // WARNING
- // remember wheh changing here that the smallest netbooks
- // have a 1024x576 resolution. So DON'T bother that limits!!
- parent->setMinimumSize(700, 525);
+ connect(ui->listWidget, &QListWidget::currentRowChanged, ui->stackedWidget, &QStackedWidget::setCurrentIndex);
}
-
-// -----------------------------------------------------------------------------------------------------
-
-
-SettingsDialog::SettingsDialog(QWidget *parent)
- : KConfigDialog(parent, "rekonfig", ReKonfig::self())
- , d(new Private(this))
-{
- showButtonSeparator(false);
- setWindowTitle(i18nc("Window title of the settings dialog", "Configure – rekonq"));
-
- // update buttons
- connect(d->generalWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
- connect(d->tabsWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
- connect(d->appearanceWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
- connect(d->webkitWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
- connect(d->ebrowsingModule, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
- connect(d->advancedWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
- connect(d->privacyWidg, SIGNAL(changed(bool)), this, SLOT(updateButtons()));
-
- // save settings
- connect(this, SIGNAL(applyClicked()), this, SLOT(saveSettings()));
- connect(this, SIGNAL(okClicked()), this, SLOT(saveSettings()));
- setHelp("Config-rekonq", "rekonq");
-}
-
-
-SettingsDialog::~SettingsDialog()
-{
- kDebug() << "bye bye settings...";
- delete d;
-}
-
-
-// we need this function to SAVE settings in rc file..
-void SettingsDialog::saveSettings()
-{
- ReKonfig::self()->writeConfig();
-
- d->generalWidg->save();
- d->tabsWidg->save();
- d->appearanceWidg->save();
- d->webkitWidg->save();
- d->advancedWidg->save();
- d->privacyWidg->save();
- d->ebrowsingModule->save();
-
- d->privacyWidg->reload();
-
- SearchEngine::reload();
-
- updateButtons();
- emit settingsChanged("ReKonfig");
-}
-
-
-bool SettingsDialog::hasChanged()
-{
- return KConfigDialog::hasChanged()
- || d->generalWidg->changed()
- || d->tabsWidg->changed()
- || d->appearanceWidg->changed()
- || d->webkitWidg->changed()
- || d->advancedWidg->changed()
- || d->privacyWidg->changed()
- || d->ebrowsingModule->changed()
- ;
-}
-
-
-bool SettingsDialog::isDefault()
-{
- bool isDef = KConfigDialog::isDefault();
-
- if (isDef)
- {
- // check our private widget values
- isDef = d->appearanceWidg->isDefault();
- }
- return isDef;
-}
+SettingsDialog::~SettingsDialog() { delete ui; }
diff --git a/src/settings/settingsdialog.h b/src/settings/settingsdialog.h
index ed05cf27..3f191e1e 100644
--- a/src/settings/settingsdialog.h
+++ b/src/settings/settingsdialog.h
@@ -1,63 +1,29 @@
/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2008-2012 by Andrea Diamantini <adjam7 at gmail dot com>
-* Copyright (C) 2009-2011 by Lionel Chauvin <megabigbug@yahoo.fr>
-*
-*
-* 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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 SETTINGS_DIALOG_H
-#define SETTINGS_DIALOG_H
-
-
-// Rekonq Includes
-#include "rekonq_defines.h"
-
-// KDE Includes
-#include <KConfigDialog>
-
-// Forward Declarations
-class QWidget;
-class Private;
-
-
-class REKONQ_TESTS_EXPORT SettingsDialog : public KConfigDialog
-{
- Q_OBJECT
+ * The rekonq project
+ * ============================================================
+ * SPDX-License-Identifier: GPL-2.0-or-later
+ * Copyright (C) 2008-2012 by Andrea Diamantini <adjam7 at gmail dot com>
+ * Copyright (C) 2009-2011 by Lionel Chauvin <megabigbug@yahoo.fr>
+ * SPDX-License-Identifier: GPL-3.0-only
+ * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
+ * ============================================================
+ * Description: Settings Dialog
+ * ============================================================ */
+
+#pragma once
+
+#include <QDialog>
+
+namespace Ui {
+class SettingsDialog;
+}
+class SettingsDialog : public QDialog {
+ Q_OBJECT
public:
- explicit SettingsDialog(QWidget *parent = 0);
- ~SettingsDialog();
-
- virtual bool hasChanged();
-
-protected:
- virtual bool isDefault();
+ explicit SettingsDialog(QWidget *parent = nullptr);
+ ~SettingsDialog() override;
private:
- Private* const d;
-
-private Q_SLOTS:
- void saveSettings();
+ Ui::SettingsDialog *ui;
};
-
-#endif // SETTINGS_DIALOG_H
diff --git a/src/settings/settingsdialog.ui b/src/settings/settingsdialog.ui
new file mode 100644
index 00000000..1c19380d
--- /dev/null
+++ b/src/settings/settingsdialog.ui
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>SettingsDialog</class>
+ <widget class="QDialog" name="SettingsDialog">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>800</width>
+ <height>600</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Settings</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QListWidget" name="listWidget">
+ <property name="maximumSize">
+ <size>
+ <width>256</width>
+ <height>16777215</height>
+ </size>
+ </property>
+ <property name="editTriggers">
+ <set>QAbstractItemView::NoEditTriggers</set>
+ </property>
+ <property name="uniformItemSizes">
+ <bool>true</bool>
+ </property>
+ <property name="itemAlignment">
+ <set>Qt::AlignVCenter</set>
+ </property>
+ <item>
+ <property name="text">
+ <string>General</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignCenter</set>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Appearance</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignCenter</set>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Network</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignCenter</set>
+ </property>
+ </item>
+ <item>
+ <property name="text">
+ <string>Shortcuts</string>
+ </property>
+ <property name="textAlignment">
+ <set>AlignCenter</set>
+ </property>
+ </item>
+ </widget>
+ </item>
+ <item>
+ <widget class="QStackedWidget" name="stackedWidget"/>
+ </item>
+ </layout>
+ </item>
+ <item>
+ <widget class="QDialogButtonBox" name="buttonBox">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="standardButtons">
+ <set>QDialogButtonBox::Cancel|QDialogButtonBox::RestoreDefaults|QDialogButtonBox::Save</set>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>accepted()</signal>
+ <receiver>SettingsDialog</receiver>
+ <slot>accept()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>248</x>
+ <y>254</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>157</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ <connection>
+ <sender>buttonBox</sender>
+ <signal>rejected()</signal>
+ <receiver>SettingsDialog</receiver>
+ <slot>reject()</slot>
+ <hints>
+ <hint type="sourcelabel">
+ <x>316</x>
+ <y>260</y>
+ </hint>
+ <hint type="destinationlabel">
+ <x>286</x>
+ <y>274</y>
+ </hint>
+ </hints>
+ </connection>
+ </connections>
+</ui>
diff --git a/src/settings/settingswidgets.hpp b/src/settings/settingswidgets.hpp
new file mode 100644
index 00000000..31cd4580
--- /dev/null
+++ b/src/settings/settingswidgets.hpp
@@ -0,0 +1,65 @@
+/* ============================================================
+ * The rekonq project
+ * ============================================================
+ * SPDX-License-Identifier: GPL-3.0-only
+ * Copyright (C) 2022 aqua <aqua@iserlohn-fortress.net>
+ * ============================================================
+ * Description: Settings Widgets Definitions
+ * ============================================================ */
+
+#pragma once
+
+#include <QWidget>
+
+class SettingsWidget : public QWidget {
+ Q_OBJECT
+
+public:
+ explicit SettingsWidget(QWidget *parent = nullptr) : QWidget(parent) {}
+
+signals:
+ void changed();
+public slots:
+ virtual void save() = 0;
+ virtual void reset() = 0;
+};
+
+class GeneralSettingsWidget final : public SettingsWidget {
+ Q_OBJECT
+public:
+ explicit GeneralSettingsWidget(QWidget *parent = nullptr);
+
+public slots:
+ void save() override;
+ void reset() override;
+};
+
+class AppearanceSettingsWidget final : public SettingsWidget {
+ Q_OBJECT
+public:
+ explicit AppearanceSettingsWidget(QWidget *parent = nullptr);
+
+public slots:
+ void save() override;
+ void reset() override;
+};
+
+class NetworkSettingsWidget final : public SettingsWidget {
+ Q_OBJECT
+public:
+ explicit NetworkSettingsWidget(QWidget *parent = nullptr);
+
+public slots:
+ void save() override;
+ void reset() override;
+};
+
+class ShortcutsSettingsWidget final : public SettingsWidget {
+ Q_OBJECT
+public:
+ explicit ShortcutsSettingsWidget(QWidget *parent = nullptr);
+
+public slots:
+ void save() override;
+ void reset() override;
+};
diff --git a/src/settings/tabswidget.cpp b/src/settings/tabswidget.cpp
deleted file mode 100644
index 67829f82..00000000
--- a/src/settings/tabswidget.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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/>.
-*
-* ============================================================ */
-
-
-// Local Includes
-#include "tabswidget.h"
-#include "tabswidget.moc"
-
-
-TabsWidget::TabsWidget(QWidget *parent)
- : QWidget(parent)
- , _changed(false)
-{
- setupUi(this);
-}
-
-
-void TabsWidget::save()
-{
-}
-
-bool TabsWidget::changed()
-{
- return _changed;
-}
-
-
-void TabsWidget::hasChanged()
-{
-}
diff --git a/src/settings/tabswidget.h b/src/settings/tabswidget.h
deleted file mode 100644
index 786f95f9..00000000
--- a/src/settings/tabswidget.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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 TABS_WIDGET_H
-#define TABS_WIDGET_H
-
-
-// Ui Includes
-#include "ui_settings_tabs.h"
-
-// Qt Includes
-#include <QtGui/QWidget>
-
-
-class TabsWidget : public QWidget, private Ui::tabs
-{
- Q_OBJECT
-
-public:
- explicit TabsWidget(QWidget *parent = 0);
-
- void save();
- bool changed();
-
-Q_SIGNALS:
- void changed(bool);
-
-private Q_SLOTS:
- void hasChanged();
-
-private:
- bool _changed;
-};
-
-#endif // TABS_WIDGET_H
diff --git a/src/settings/test/dialog.cpp b/src/settings/test/dialog.cpp
new file mode 100644
index 00000000..2bc9ffe0
--- /dev/null
+++ b/src/settings/test/dialog.cpp
@@ -0,0 +1,12 @@
+#include "../settingsdialog.h"
+#include <QApplication>
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ SettingsDialog dlg;
+ dlg.show();
+
+ return QApplication::exec();
+} \ No newline at end of file
diff --git a/src/settings/test/fonts.cpp b/src/settings/test/fonts.cpp
new file mode 100644
index 00000000..65cc7229
--- /dev/null
+++ b/src/settings/test/fonts.cpp
@@ -0,0 +1,31 @@
+#include "../helpers.hpp"
+#include <QFontInfo>
+#include <QGuiApplication>
+#include <gtest/gtest.h>
+#include <vector>
+
+TEST(Settings, getFont)
+{
+ const auto serif = getFont(QFont::Serif);
+ EXPECT_EQ(serif.styleHint(), QFont::Serif) << qUtf8Printable(serif.toString());
+
+ const auto fixed = getFont(QFont::Monospace);
+ EXPECT_EQ(fixed.styleHint(), QFont::Monospace) << qUtf8Printable(fixed.toString());
+}
+
+int main(int argc, char **argv)
+{
+ ::testing::InitGoogleTest(&argc, argv);
+
+ // handling fonts requires a QGuiApplication
+ // The proper platform name needs to be added to the argument list before the QGuiApplication constructor is called
+ // This needs to be done here for gtest_discover_tests to work
+ QList<char *> args;
+ for (int i = 0; i < argc; ++i) args.append(argv[i]);
+ args.append({"-platform", "offscreen"});
+ int args_count = args.count();
+
+ QGuiApplication app(args_count, args.data());
+
+ return RUN_ALL_TESTS();
+}
diff --git a/src/settings/webkitwidget.cpp b/src/settings/webkitwidget.cpp
deleted file mode 100644
index 31224f05..00000000
--- a/src/settings/webkitwidget.cpp
+++ /dev/null
@@ -1,71 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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/>.
-*
-* ============================================================ */
-
-
-// Local Includes
-#include "webkitwidget.h"
-#include "webkitwidget.moc"
-
-
-WebKitWidget::WebKitWidget(QWidget *parent)
- : QWidget(parent)
- , _changed(false)
-{
- setupUi(this);
- setWebSettingsToolTips();
-}
-
-
-void WebKitWidget::save()
-{
-}
-
-
-bool WebKitWidget::changed()
-{
- return _changed;
-}
-
-
-void WebKitWidget::hasChanged()
-{
- _changed = true;
- emit changed(true);
-}
-
-
-void WebKitWidget::setWebSettingsToolTips()
-{
- kcfg_webGL->setToolTip(i18n("Enables WebGL technology"));
- kcfg_spatialNavigation->setToolTip(i18n("Lets you navigating between focusable elements using arrow keys."));
- kcfg_frameFlattening->setToolTip(i18n("Flatten all the frames to become one scrollable page."));
- kcfg_dnsPrefetch->setToolTip(i18n("Specifies whether WebKit will try to prefetch DNS entries to speed up browsing."));
- kcfg_printElementBackgrounds->setToolTip(i18n("If enabled, background colors and images are also drawn when the page is printed."));
- kcfg_javascriptEnabled->setToolTip(i18n("Enables the execution of JavaScript programs."));
- kcfg_javaEnabled->setToolTip(i18n("Enables support for Java applets."));
- kcfg_offlineStorageDatabaseEnabled->setToolTip(i18n("Enables support for the HTML 5 offline storage feature."));
- kcfg_offlineWebApplicationCacheEnabled->setToolTip(i18n("Enables support for the HTML 5 web application cache feature."));
- kcfg_localStorageEnabled->setToolTip(i18n("Enables support for the HTML 5 local storage feature."));
-}
diff --git a/src/settings/webkitwidget.h b/src/settings/webkitwidget.h
deleted file mode 100644
index 16653813..00000000
--- a/src/settings/webkitwidget.h
+++ /dev/null
@@ -1,60 +0,0 @@
-/* ============================================================
-*
-* This file is a part of the rekonq project
-*
-* Copyright (C) 2010-2011 by Andrea Diamantini <adjam7 at gmail dot 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 2 of
-* the License or (at your option) version 3 or any later version
-* accepted by the membership of KDE e.V. (or its successor approved
-* by the membership of KDE e.V.), which shall act as a proxy
-* defined in Section 14 of version 3 of the license.
-*
-* 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 WEBKIT_WIDGET_H
-#define WEBKIT_WIDGET_H
-
-
-// Ui Includes
-#include "ui_settings_webkit.h"
-
-// Qt Includes
-#include <QtGui/QWidget>
-
-
-class WebKitWidget : public QWidget, private Ui::webkit
-{
- Q_OBJECT
-
-public:
- explicit WebKitWidget(QWidget *parent = 0);
-
- void save();
- bool changed();
-
-Q_SIGNALS:
- void changed(bool);
-
-private Q_SLOTS:
- void hasChanged();
-
-private:
- void setWebSettingsToolTips();
-
- bool _changed;
-};
-
-#endif // WEBKIT_WIDGET_H