summaryrefslogtreecommitdiff
path: root/src/adblock
diff options
context:
space:
mode:
Diffstat (limited to 'src/adblock')
-rw-r--r--src/adblock/CMakeLists.txt18
-rw-r--r--src/adblock/kcmwebkitadblock.cpp67
-rw-r--r--src/adblock/kcmwebkitadblock.h52
-rw-r--r--src/adblock/webkitAdblock.desktop14
-rw-r--r--src/adblock/webkitadblock.ui102
5 files changed, 253 insertions, 0 deletions
diff --git a/src/adblock/CMakeLists.txt b/src/adblock/CMakeLists.txt
new file mode 100644
index 00000000..8777bc50
--- /dev/null
+++ b/src/adblock/CMakeLists.txt
@@ -0,0 +1,18 @@
+
+ADD_DEFINITIONS ( ${KDE4_DEFINITIONS} )
+
+SET(kcm_webkitadblock_SRCS
+ kcmwebkitadblock.cpp
+)
+
+kde4_add_ui_files(kcm_webkitadblock_SRCS
+ webkitadblock.ui
+)
+
+kde4_add_plugin(kcm_webkitadblock ${kcm_webkitadblock_SRCS})
+
+target_link_libraries(kcm_webkitadblock ${KDE4_KDEUI_LIBS} )
+
+install(TARGETS kcm_webkitadblock DESTINATION ${PLUGIN_INSTALL_DIR} )
+
+install( FILES webkitAdblock.desktop DESTINATION ${SERVICES_INSTALL_DIR} )
diff --git a/src/adblock/kcmwebkitadblock.cpp b/src/adblock/kcmwebkitadblock.cpp
new file mode 100644
index 00000000..28487b74
--- /dev/null
+++ b/src/adblock/kcmwebkitadblock.cpp
@@ -0,0 +1,67 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2009 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 "kcmwebkitadblock.h"
+#include "kcmwebkitadblock.moc"
+
+// KDE Includes
+#include <KDE/KPluginFactory>
+#include <KDE/KPluginLoader>
+
+
+K_PLUGIN_FACTORY(RekonqPluginFactory,
+ registerPlugin<KCMWebkitAdblock>("webkitAdblock");
+ )
+
+K_EXPORT_PLUGIN(RekonqPluginFactory("kcmrekonqfactory"))
+
+
+KCMWebkitAdblock::KCMWebkitAdblock(QWidget *parent, const QVariantList &args)
+ : KCModule(KGlobal::mainComponent(), parent, args)
+{
+ setupUi(this);
+}
+
+
+KCMWebkitAdblock::~KCMWebkitAdblock()
+{
+}
+
+
+void KCMWebkitAdblock::defaults()
+{
+}
+
+
+void KCMWebkitAdblock::load()
+{
+}
+
+
+void KCMWebkitAdblock::save()
+{
+}
diff --git a/src/adblock/kcmwebkitadblock.h b/src/adblock/kcmwebkitadblock.h
new file mode 100644
index 00000000..01f0e653
--- /dev/null
+++ b/src/adblock/kcmwebkitadblock.h
@@ -0,0 +1,52 @@
+/* ============================================================
+*
+* This file is a part of the rekonq project
+*
+* Copyright (C) 2009 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 KCM_WEBKIT_ADBLOCK_H
+#define KCM_WEBKIT_ADBLOCK_H
+
+
+// UI Includes
+#include "ui_webkitadblock.h"
+
+// KDE Includes
+#include <kcmodule.h>
+
+
+class KCMWebkitAdblock : public KCModule, private Ui::WebkitAdblock
+{
+Q_OBJECT
+
+public:
+ KCMWebkitAdblock(QWidget *parent, const QVariantList &args);
+
+ ~KCMWebkitAdblock();
+
+ void defaults();
+ void load();
+ void save();
+};
+
+#endif
diff --git a/src/adblock/webkitAdblock.desktop b/src/adblock/webkitAdblock.desktop
new file mode 100644
index 00000000..22195b82
--- /dev/null
+++ b/src/adblock/webkitAdblock.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Type=Service
+X-KDE-ServiceTypes=KCModule
+
+Icon=preferences-web-browser-adblock
+Exec=kcmshell4 webkitAdblock
+
+X-KDE-Library=kcm_webkitadblock
+X-KDE-PluginKeyword=webkitAdblock
+X-KDE-ParentApp=kcontrol
+
+Name=Webkit AdBlock Settings
+
+Categories=Qt;KDE;X-KDE-settings-webbrowsing;
diff --git a/src/adblock/webkitadblock.ui b/src/adblock/webkitadblock.ui
new file mode 100644
index 00000000..8d7ac25f
--- /dev/null
+++ b/src/adblock/webkitadblock.ui
@@ -0,0 +1,102 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>WebkitAdblock</class>
+ <widget class="QWidget" name="WebkitAdblock">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>543</width>
+ <height>491</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string>Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QCheckBox" name="enableAdblock">
+ <property name="text">
+ <string>Enable adblock</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QGroupBox" name="groupBox">
+ <property name="title">
+ <string>adblock settings</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="KListWidget" name="klistWidget"/>
+ </item>
+ <item>
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>&lt;qt&gt;Filter expression (e.g. &lt;tt&gt;http://www.example.com/*&lt;/tt&gt;, &lt;a href=&quot;filterhelp&quot;&gt;more info&lt;/a&gt;):</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="KListWidgetSearchLine" name="searchline"/>
+ </item>
+ <item>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QPushButton" name="addButton">
+ <property name="text">
+ <string>Add</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="removeButton">
+ <property name="text">
+ <string>Remove</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="searchButton">
+ <property name="text">
+ <string>Search</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="importButton">
+ <property name="text">
+ <string>Import</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <customwidgets>
+ <customwidget>
+ <class>KListWidget</class>
+ <extends>QListWidget</extends>
+ <header>klistwidget.h</header>
+ </customwidget>
+ <customwidget>
+ <class>KLineEdit</class>
+ <extends>QLineEdit</extends>
+ <header>klineedit.h</header>
+ </customwidget>
+ <customwidget>
+ <class>KListWidgetSearchLine</class>
+ <extends>KLineEdit</extends>
+ <header>klistwidgetsearchline.h</header>
+ </customwidget>
+ </customwidgets>
+ <resources/>
+ <connections/>
+</ui>