• 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
adblockblockableitemswidget.h
Go to the documentation of this file.
1 /*
2  Copyright (c) 2013-2015 Montel Laurent <montel@kde.org>
3 
4  This program is free software; you can redistribute it and/or modify it
5  under the terms of the GNU General Public License, version 2, as
6  published by the Free Software Foundation.
7 
8  This program is distributed in the hope that it will be useful, but
9  WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  General Public License for more details.
12 
13  You should have received a copy of the GNU General Public License along
14  with this program; if not, write to the Free Software Foundation, Inc.,
15  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16 */
17 
18 #ifndef ADBLOCKBLOCKABLEITEMSWIDGET_H
19 #define ADBLOCKBLOCKABLEITEMSWIDGET_H
20 
21 #include <QWidget>
22 #include "messageviewer_export.h"
23 class QWebFrame;
24 namespace PimCommon {
25 class CustomTreeView;
26 }
27 namespace MessageViewer {
28 
29 class MESSAGEVIEWER_EXPORT AdBlockBlockableItemsWidget : public QWidget
30 {
31  Q_OBJECT
32 public:
33  enum TypeElement {
34  None = 0,
35  Image,
36  Script,
37  StyleSheet,
38  Font,
39  Frame,
40  XmlRequest,
41  Object,
42  Media,
43  Popup,
44 
45  MaxTypeElement
46  };
47  explicit AdBlockBlockableItemsWidget(QWidget *parent=0);
48  ~AdBlockBlockableItemsWidget();
49 
50  static QString elementTypeToI18n(AdBlockBlockableItemsWidget::TypeElement type);
51  static QString elementType(AdBlockBlockableItemsWidget::TypeElement type);
52 
53  void setWebFrame(QWebFrame *frame);
54  void saveFilters();
55 
56 private Q_SLOTS:
57  void slotCopyItem();
58  void slotBlockItem();
59  void slotOpenItem();
60  void slotCopyFilterItem();
61  void customContextMenuRequested(const QPoint &);
62  void slotRemoveFilter();
63 
64 private:
65  enum BlockType {
66  FilterValue = 0,
67  Url,
68  Type
69  };
70 
71 
72  enum TypeItem {
73  Element = Qt::UserRole + 1
74  };
75 
76  void searchBlockableElement(QWebFrame *frame);
77  void adaptSrc(QString &src,const QString &hostName);
78 
79 private:
80  PimCommon::CustomTreeView *mListItems;
81 };
82 }
83 
84 #endif // ADBLOCKBLOCKABLEITEMSWIDGET_H
QWidget
QWebFrame
MessageViewer::AdBlockBlockableItemsWidget::Media
Definition: adblockblockableitemswidget.h:42
MessageViewer::AdBlockBlockableItemsWidget::TypeElement
TypeElement
Definition: adblockblockableitemswidget.h:33
QPoint
MessageViewer::AdBlockBlockableItemsWidget::StyleSheet
Definition: adblockblockableitemswidget.h:37
MessageViewer::AdBlockBlockableItemsWidget::Script
Definition: adblockblockableitemswidget.h:36
MessageViewer::AdBlockBlockableItemsWidget
Definition: adblockblockableitemswidget.h:29
MessageViewer::AdBlockBlockableItemsWidget::Object
Definition: adblockblockableitemswidget.h:41
MessageViewer::AdBlockBlockableItemsWidget::Frame
Definition: adblockblockableitemswidget.h:39
QString
MessageViewer::AdBlockBlockableItemsWidget::XmlRequest
Definition: adblockblockableitemswidget.h:40
MESSAGEVIEWER_EXPORT
#define MESSAGEVIEWER_EXPORT
Definition: messageviewer_export.h:37
type
const char * type
Definition: bodypartformatter.cpp:192
MessageViewer::AdBlockBlockableItemsWidget::Font
Definition: adblockblockableitemswidget.h:38
MessageViewer::AdBlockBlockableItemsWidget::Popup
Definition: adblockblockableitemswidget.h:43
MessageViewer::AdBlockBlockableItemsWidget::Image
Definition: adblockblockableitemswidget.h:35
messageviewer_export.h
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