This file is indexed.

/usr/include/KF5/KDEWebKit/kgraphicswebview.h is in libkf5webkit-dev 5.44.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
/*
 * This file is part of the KDE project.
 *
 * Copyright (C) 2007 Trolltech ASA
 * Copyright (C) 2008 Urs Wolfer <uwolfer @ kde.org>
 * Copyright (C) 2008 Laurent Montel <montel@kde.org>
 * Copyright (C) 2008 Michael Howell <mhowell123@gmail.com>
 * Copyright (C) 2009 Dawit Alemayehu <adawit @ kde.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library 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
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 */
#ifndef KGRAPHICSWEBVIEW_H
#define KGRAPHICSWEBVIEW_H

#include <kdewebkit_export.h>

#include <QGraphicsWebView>

class QUrl;
template<class T> class KWebViewPrivate;

/**
 * @short A re-implementation of QGraphicsWebView that provides KDE Frameworks
 * integration.
 *
 * This is a drop-in replacement for QGraphicsWebView that provides full KDE
 * frameworks integration through the use of @ref KWebPage. It also provides
 * signals that capture middle, shift and ctrl mouse clicks on links and URL
 * pasting from the selection clipboard.
 *
 * The specific functionality provided by this class (over and above what
 * would be acheived by using KWebPage with a QGraphicsWebView) is that
 * scrolling * with the mouse wheel while holding down CTRL zooms the page (see
 * QGraphicsWebView::setZoomFactor) and several useful signals are emitted when
 * the user performs certain actions.
 *
 * @author Urs Wolfer <uwolfer @ kde.org>
 * @author Dawit Alemayehu <adawit @ kde.org>
 *
 * @since 4.4
 */
class KDEWEBKIT_EXPORT KGraphicsWebView : public QGraphicsWebView
{
    Q_OBJECT

public:
    /**
     * Constructs a KGraphicsWebView object with parent @p parent.
     *
     * Set @p createCustomPage to false to prevent the creation of a
     * @ref KWebPage object for KDE frameworks integration. Doing so allows you
     * to avoid unnecessary object creation and deletion if you are going to use
     * a subclass of KWebPage.
     *
     * @param parent            the parent object
     * @param createCustomPage  if @c true, the view's page is set to an
     *                          instance of KWebPage
     */
    explicit KGraphicsWebView(QGraphicsItem *parent = nullptr, bool createCustomPage = true);

    /**
     * Destroys the KGraphicsWebView.
     */
    ~KGraphicsWebView();

    /**
     * Returns true if access to remote content is allowed.
     *
     * By default access to remote content is allowed.
     *
     * @see setAllowExternalContent()
     * @see KWebPage::isExternalContentAllowed()
     */
    bool isExternalContentAllowed() const;

    /**
     * Set @p allow to false if you want to prevent access to remote content.
     *
     * If this function is set to false only resources on the local system
     * can be accessed through this class. By default fetching external content
     * is allowed.
     *
     * @see isExternalContentAllowed()
     * @see KWebPage::setAllowExternalContent(bool)
     */
    void setAllowExternalContent(bool allow);

Q_SIGNALS:
    /**
     * Emitted when a URL from the selection clipboard is pasted on this view.
     *
     * This is triggered when the user clicks on the page with the middle
     * mouse button when there is something in the global mouse selection
     * clipboard. This is typically only possible on X11.
     *
     * Uri filters are applied to the selection clipboard to generate @p url.
     *
     * If the content in the selection clipboard is not a valid url and a
     * default search engine is configured, @p url will be set to a query
     * to the default search engine.
     *
     * @param url   url generated from the selection clipboard content
     *
     * @deprecated  use selectionClipboardUrlPasted(QUrl, bool) instead
     * @see QClipboard
     */
#ifndef KDEWEBKIT_NO_DEPRECATED
    KDEWEBKIT_DEPRECATED void selectionClipboardUrlPasted(const QUrl &url);
#endif

    /**
     * Emitted when a URL from the selection clipboard is pasted on this view.
     *
     * This is triggered when the user clicks on the page with the middle
     * mouse button when there is something in the global mouse selection
     * clipboard. This is typically only possible on X11.
     *
     * Uri filters are applied to the selection clipboard to generate @p url.
     *
     * If the content in the selection clipboard is not a valid URL and a
     * default search engine is configured, @p searchText will be set to the
     * content of the clipboard (250 characters maximum) and @p url will be
     * set to a query to the default search engine.
     *
     * @param url         the URL generated from the selection clipboard content
     * @param searchText  content of the selection clipboard if it is not a
     *                    valid URL
     *
     * @see KUriFilter
     * @see QClipboard
     * @since 4.6
     */
    void selectionClipboardUrlPasted(const QUrl &url, const QString &searchText);

    /**
     * Emitted when a link is clicked with the left mouse button while SHIFT is
     * held down.
     *
     * A user of Plasma Desktop would typically expect this to result in the
     * triggering of a "save link as" action.
     *
     * @param url  the URL of the clicked link
     */
    void linkShiftClicked(const QUrl &url);

    /**
     * Emitted when a link is clicked with the middle mouse button or clicked
     * with the left mouse button while CTRL is held down.
     *
     * Typically, the user would expect this to result in the URL being opened
     * in a new tab or window.
     *
     * @param url  the URL of the clicked link
     */
    void linkMiddleOrCtrlClicked(const QUrl &url);

protected:
    /**
     * @reimp
     *
     * Reimplemented for internal reasons, the API is not affected.
     *
     * @see QWidget::wheelEvent
     * @internal
     */
    void wheelEvent(QGraphicsSceneWheelEvent *event) Q_DECL_OVERRIDE;

    /**
     * @reimp
     *
     * Reimplemented for internal reasons, the API is not affected.
     *
     * @see QWidget::mousePressEvent
     * @internal
     */
    void mousePressEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;

    /**
     * @reimp
     *
     * Reimplemented for internal reasons, the API is not affected.
     *
     * @see QWidget::mouseReleaseEvent
     * @internal
     */
    void mouseReleaseEvent(QGraphicsSceneMouseEvent *event) Q_DECL_OVERRIDE;

private:
    friend class KWebViewPrivate<KGraphicsWebView>;
    KWebViewPrivate<KGraphicsWebView> *const d;
};

#endif // KWEBVIEW_H