• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepim API Reference
  • KDE Home
  • Contact Us
 

messageviewer

  • sources
  • kde-4.14
  • kdepim
  • messageviewer
  • adblock
adblockelementhiding.h
Go to the documentation of this file.
1 /* ============================================================
2 *
3 * This file is a part of the rekonq project
4 * Copyright (c) 2013-2015 Montel Laurent <montel@kde.org>
5 * based on code from rekonq
6 * Copyright (C) 2013 by Paul Rohrbach <p.b.r at gmx dot net>
7 *
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of
12 * the License or (at your option) version 3 or any later version
13 * accepted by the membership of KDE e.V. (or its successor approved
14 * by the membership of KDE e.V.), which shall act as a proxy
15 * defined in Section 14 of version 3 of the license.
16 *
17 * This program is distributed in the hope that it will be useful,
18 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 * GNU General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program. If not, see <http://www.gnu.org/licenses/>.
24 *
25 * ============================================================ */
26 
27 #ifndef ADBLOCKELEMENTHIDING_H
28 #define ADBLOCKELEMENTHIDING_H
29 
30 #include <QStringList>
31 #include <QMultiHash>
32 #include <QWebElement>
33 
34 namespace MessageViewer {
35 class AdBlockElementHiding
36 {
37 public:
38  AdBlockElementHiding();
39 
40  bool addRule(const QString &rule);
41  void apply(QWebElement &document, const QString &domain) const;
42 
43  void clear();
44 
45 private:
46  void applyStringRule(QWebElement &document, const QString &rule) const;
47  QStringList generateSubdomainList(const QString &domain) const;
48 
49  QStringList m_GenericRules;
50  QMultiHash<QString, QString> m_DomainSpecificRules;
51  QMultiHash<QString, QString> m_DomainSpecificRulesWhitelist;
52 };
53 }
54 
55 #endif // ADBLOCKELEMENTHIDING_H
MessageViewer::AdBlockElementHiding::AdBlockElementHiding
AdBlockElementHiding()
Definition: adblockelementhiding.cpp:33
QWebElement
QString
QStringList
MessageViewer::AdBlockElementHiding
Definition: adblockelementhiding.h:35
MessageViewer::AdBlockElementHiding::apply
void apply(QWebElement &document, const QString &domain) const
Definition: adblockelementhiding.cpp:66
MessageViewer::AdBlockElementHiding::clear
void clear()
Definition: adblockelementhiding.cpp:92
QMultiHash< QString, QString >
MessageViewer::AdBlockElementHiding::addRule
bool addRule(const QString &rule)
Definition: adblockelementhiding.cpp:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:32:45 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

messageviewer

Skip menu "messageviewer"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer
  • pimprint

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal