/usr/include/KF5/messageviewer/mailwebview.h is in libkf5messageviewer-dev 4:16.04.3-3~deb9u1.
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 | /* Copyright 2010 Thomas McGuire <mcguire@kde.org>
Copyright 2013-2016 Laurent Montel <monte@kde.org>
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 MESSAGEVIEWER_MAILWEBVIEW_H
#define MESSAGEVIEWER_MAILWEBVIEW_H
#include "messageviewer/messageviewersettings.h"
#include "messageviewer_export.h"
#include <KWebView>
#include <boost/function.hpp>
class KActionCollection;
namespace MessageViewer
{
class ScamDetection;
class WebViewAccessKey;
/// MailWebView extends KWebView so that it can emit the popupMenu() signal
class MESSAGEVIEWER_EXPORT MailWebView : public KWebView
{
Q_OBJECT
public:
explicit MailWebView(KActionCollection *actionCollection = Q_NULLPTR, QWidget *parent = Q_NULLPTR);
~MailWebView();
void scrollUp(int pixels);
void scrollDown(int pixels);
bool isScrolledToBottom() const;
bool hasVerticalScrollBar() const;
void scrollPageDown(int percent);
void scrollPageUp(int percent);
void scrollToAnchor(const QString &anchor);
bool isAttachmentInjectionPoint(const QPoint &globalPos) const;
void injectAttachments(const boost::function<QString()> &delayedHtml);
bool removeAttachmentMarking(const QString &id);
void markAttachment(const QString &id, const QString &style);
bool replaceInnerHtml(const QString &id, const boost::function<QString()> &delayedHtml);
void setElementByIdVisible(const QString &id, bool visible);
QString htmlSource() const;
void selectAll();
void clearSelection();
void scrollToRelativePosition(double pos);
double relativePosition() const;
QUrl linkOrImageUrlAt(const QPoint &global) const;
void scamCheck();
void saveMainFrameScreenshotInFile(const QString &filename);
void openBlockableItemsDialog();
public Q_SLOTS:
void slotShowDetails();
void slotZoomChanged(qreal zoom);
void slotZoomTextOnlyChanged(bool b);
Q_SIGNALS:
/// Emitted when the user right-clicks somewhere
/// @param url if an URL was under the cursor, this parameter contains it. Otherwise empty
/// @param point position where the click happened, in local coordinates
void popupMenu(const QUrl &url, const QUrl &imageUrl, const QPoint &point);
void linkHovered(const QString &link, const QString &title = QString(), const QString &textContent = QString());
void messageMayBeAScam();
protected:
/// Reimplemented to catch context menu events and emit popupMenu()
bool event(QEvent *event) Q_DECL_OVERRIDE;
/// Reimplement for access key
void keyReleaseEvent(QKeyEvent *) Q_DECL_OVERRIDE;
void keyPressEvent(QKeyEvent *) Q_DECL_OVERRIDE;
void wheelEvent(QWheelEvent *e) Q_DECL_OVERRIDE;
void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
private:
ScamDetection *mScamDetection;
KActionCollection *mActionCollection;
WebViewAccessKey *mWebViewAccessKey;
};
}
#endif /* MESSAGEVIEWER_MAILWEBVIEW_H */
|