messageviewer
mailwebview_webkit.cpp
Go to the documentation of this file.
50 const QUrl url = element.webFrame()->baseUrl().resolved(element.attribute(QLatin1String("href")));
65 if (element.hasAttribute(QLatin1String("width")) && element.attribute(QLatin1String("width")).toInt() < 1) {
70 if (element.hasAttribute(QLatin1String("height")) && element.attribute(QLatin1String("height")).toInt() < 1) {
75 if (element.styleProperty(QLatin1String("visibility"),QWebElement::ComputedStyle).compare(QLatin1String("hidden"), Qt::CaseInsensitive) == 0) {
80 if (element.styleProperty(QLatin1String("display"),QWebElement::ComputedStyle).compare(QLatin1String("none"), Qt::CaseInsensitive) == 0) {
90 QWebElement element = (frame ? frame->findFirstElement(QLatin1String(":focus")) : QWebElement());
108 static void handleDuplicateLinkElements(const QWebElement& element, QHash<QString, QChar>* dupLinkList, QChar* accessKey)
158 emit popupMenu( hit.linkUrl(), ((hit.pixmap().isNull()) ? QUrl() : hit.imageUrl()), mapToGlobal( contextMenuEvent->pos() ) );
205 "var span = document.createElement( 'SPAN' ); span.appendChild( window.getSelection().getRangeAt(0).cloneContents() );
246 QMouseEvent event(QEvent::MouseButtonPress, QPoint( 10, 10 ), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier );
248 QMouseEvent event2(QEvent::MouseButtonRelease, QPoint( 10, 10 ), Qt::LeftButton, Qt::LeftButton, Qt::NoModifier );
272 return has_parent_div_with_id( hit.enclosingBlockElement(), QLatin1String("attachmentInjectionPoint") );
354 bool MailWebView::replaceInnerHtml( const QString & id, const function<QString()> & delayedHtml )
429 } else if (e->key() == Qt::Key_Control && e->modifiers() == Qt::ControlModifier && !isEditableElement(page())) {
430 mAccessKeyActivated = PreActivated; // Only preactive here, it will be actually activated in key release.
439 if (GlobalSettings::self()->accessKeyEnabled() && mAccessKeyActivated == PreActivated && (e->modifiers() & Qt::ControlModifier)) {
QWebFrame * parentFrame() const
void expandedUrl(const KUrl &url)
Definition: scamcheckshorturl.cpp:54
static QWebPage::FindFlags convert_flags(MailWebView::FindFlags f)
Definition: mailwebview_webkit.cpp:378
void clear()
baseUrl
Definition: webpage.h:25
void setAttribute(const QString &name, const QString &value)
Qt::KeyboardModifiers modifiers() const
QSize size() const
Type type() const
void setPalette(const QPalette &)
iterator insert(const Key &key, const T &value)
QString selectedText() const
Definition: mailwebview_textbrowser.cpp:109
int & ry()
QString toUpper() const
bool end()
QWebElement documentElement() const
static bool has_parent_div_with_id(const QWebElement &start, const QString &id)
Definition: mailwebview_webkit.cpp:254
void setRenderHint(RenderHint hint, bool on)
typedef FindFlags
bool isEmpty() const
void setStyleProperty(const QString &name, const QString &value)
double relativePosition() const
Definition: mailwebview_textbrowser.cpp:122
QString styleProperty(const QString &name, StyleResolveStrategy strategy) const
QUrl imageUrl() const
QWebElement enclosingBlockElement() const
Definition: scamdetection.h:31
void setFrameStyle(int style)
QString tagName() const
bool isEmpty() const
static bool isHiddenElement(const QWebElement &element)
Definition: mailwebview_webkit.cpp:62
QString toString(QFlags< QUrl::FormattingOption > options) const
void scrollUp(int pixels)
Definition: mailwebview_textbrowser.cpp:80
void markAttachment(const QString &id, const QString &style)
Definition: mailwebview_textbrowser.cpp:181
QWebFrame * webFrame() const
int x() const
bool hasVerticalScrollBar() const
Definition: mailwebview_textbrowser.cpp:114
Qt::ScrollBarPolicy scrollBarPolicy(Qt::Orientation orientation) const
Definition: mailwebview_textbrowser.cpp:234
QWebHitTestResult hitTestContent(const QPoint &pos) const
width
void setBold(bool enable)
bool hasAttribute(const QString &name) const
void setHtml(const QString &html, const QUrl &baseUrl)
Definition: mailwebview_textbrowser.cpp:189
virtual bool event(QEvent *event)
Reimplemented to catch context menu events and emit popupMenu()
Definition: mailwebview_textbrowser.cpp:55
int count(const T &value) const
void append(const T &value)
static bool isShortUrl(const KUrl &url)
Definition: scamcheckshorturl.cpp:102
void fill(uint pixelValue)
void openBlockableItemsDialog()
Definition: mailwebview_webkit.cpp:637
void clearFindSelection()
Definition: mailwebview_textbrowser.cpp:299
void scanPage(QWebFrame *frame)
Definition: scamdetection.cpp:50
void scrollToAnchor(const QString &anchor)
Definition: mailwebview_textbrowser.cpp:168
virtual void wheelEvent(QWheelEvent *e)
Definition: mailwebview_textbrowser.cpp:314
bool removeAttachmentMarking(const QString &id)
Definition: mailwebview_textbrowser.cpp:173
void render(QPainter *painter)
int toInt(bool *ok, int base) const
bool isEmpty() const
void scrollToRelativePosition(double pos)
Definition: mailwebview_textbrowser.cpp:133
bool isEmpty() const
virtual void keyReleaseEvent(QKeyEvent *)
Reimplement for access key.
Definition: mailwebview_textbrowser.cpp:304
bool sendEvent(QObject *receiver, QEvent *event)
void setInnerXml(const QString &markup)
void move(int x, int y)
void clearSelection()
Definition: mailwebview_textbrowser.cpp:146
QPoint center() const
void deleteLater()
bool contains(const QPoint &point, bool proper) const
void setText(const QString &)
void hide()
QUrl linkUrl() const
bool isAShortUrl(const KUrl &url) const
Definition: mailwebview_textbrowser.cpp:332
static QString linkElementKey(const QWebElement &element)
Definition: mailwebview_webkit.cpp:47
bool isNull() const
Qt::KeyboardModifiers modifiers() const
bool isNull() const
void clear()
QString toLower() const
const T value(const Key &key) const
int key() const
QString attribute(const QString &name, const QString &defaultValue) const
void accept()
bool isNull() const
QWebElement findFirstElement(const QString &selectorQuery) const
font
void slotShowDetails()
Definition: mailwebview_textbrowser.cpp:323
bool contains(const T &value) const
QUrl linkOrImageUrlAt(const QPoint &global) const
Definition: mailwebview_textbrowser.cpp:208
QWebElement findFirst(const QString &selectorQuery) const
QString toPlainText() const
void setScrollBarPolicy(Qt::Orientation orientation, Qt::ScrollBarPolicy policy)
Definition: mailwebview_textbrowser.cpp:219
ScamCheckShortUrl * scamCheckShortUrl() const
Definition: scamdetection.cpp:45
T takeFirst()
QChar toUpper() const
void injectAttachments(const boost::function< QString()> &delayedHtml)
Definition: mailwebview_textbrowser.cpp:161
QPalette palette()
int count() const
const QChar at(int position) const
void removeAttribute(const QString &name)
QPixmap pixmap() const
QVariant evaluateJavaScript(const QString &scriptSource)
bool isScrolledToBottom() const
Definition: mailwebview_textbrowser.cpp:85
void popupMenu(const QUrl &url, const QUrl &imageUrl, const QPoint &point)
Emitted when the user right-clicks somewhere.
void scrollPageDown(int percent)
Definition: mailwebview_textbrowser.cpp:91
QPoint topLeft() const
void setX(int x)
bool toBool() const
void setElementByIdVisible(const QString &id, bool visible)
Definition: mailwebview_textbrowser.cpp:261
void setAllowExternalContent(bool allow)
Definition: mailwebview_textbrowser.cpp:201
bool replaceInnerHtml(const QString &id, const boost::function< QString()> &delayedHtml)
Definition: mailwebview_textbrowser.cpp:248
scrollPosition
bool contains(const Key &key) const
void setAutoFillBackground(bool enabled)
void show()
static void handleDuplicateLinkElements(const QWebElement &element, QHash< QString, QChar > *dupLinkList, QChar *accessKey)
Definition: mailwebview_webkit.cpp:108
QWebFrame * currentFrame() const
iterator insertMulti(const Key &key, const T &value)
int compare(const QString &other) const
QWebElement parent() const
void scrollPageUp(int percent)
Definition: mailwebview_textbrowser.cpp:104
contentsSize
bool removeOne(const T &value)
void saveMainFrameScreenshotInFile(const QString &filename)
Definition: mailwebview_webkit.cpp:622
QRect geometry() const
void expandUrl(const KUrl &url)
Definition: mailwebview_textbrowser.cpp:327
bool isAttachmentInjectionPoint(const QPoint &globalPos) const
Definition: mailwebview_textbrowser.cpp:153
QString htmlSource() const
Definition: mailwebview_textbrowser.cpp:196
virtual void keyPressEvent(QKeyEvent *)
Definition: mailwebview_textbrowser.cpp:309
bool findText(const QString &test, FindFlags flags)
Definition: mailwebview_textbrowser.cpp:294
void scrollDown(int pixels)
Definition: mailwebview_textbrowser.cpp:74
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
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.