Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
container_qpainter.cpp File Reference

(479c1e5baac753a71e3edb9929654b7e5705cb09)

#include "container_qpainter.h"
#include "container_qpainter_p.h"
#include <QCursor>
#include <QDebug>
#include <QDir>
#include <QFont>
#include <QFontDatabase>
#include <QFontMetrics>
#include <QGuiApplication>
#include <QLoggingCategory>
#include <QPainter>
#include <QPalette>
#include <QRegularExpression>
#include <QScreen>
#include <QTextLayout>
#include <QUrl>
#include <algorithm>
Include dependency graph for container_qpainter.cpp:

Go to the source code of this file.

Typedefs

using Font = QFont
using Context = QPainter

Functions

static Q_LOGGING_CATEGORY (log, "qlitehtml", QtCriticalMsg) static QFont toQFont(litehtml
static QPaintertoQPainter (litehtml::uint_ptr hdc)
static QRect toQRect (litehtml::position position)
static bool isVisible (const litehtml::element::ptr &element)
static litehtml::elements_list path (const litehtml::element::ptr &element)
static std::tuple< litehtml::element::ptr, litehtml::element::ptr, litehtml::element::ptrgetCommonParent (const litehtml::elements_list &a, const litehtml::elements_list &b)
static std::pair< Selection::Element, Selection::ElementgetStartAndEnd (const Selection::Element &a, const Selection::Element &b)
static litehtml::element::ptr firstLeaf (const litehtml::element::ptr &element, const litehtml::element::ptr &stop)
static litehtml::element::ptr nextLeaf (const litehtml::element::ptr &element, const litehtml::element::ptr &stop)
static Selection::Element selectionDetails (const litehtml::element::ptr &element, const QString &text, const QPoint &pos)
static bool deepest_child_at_point (const litehtml::element::ptr &element, const QPoint &pos, const QPoint &viewportPos, const std::function< bool(const litehtml::element::ptr &)> &action, int level=0)
static Selection::Element selection_element_at_point (const litehtml::element::ptr &element, const QPoint &pos, const QPoint &viewportPos, Selection::Mode mode)
static QFont::Weight cssWeightToQtWeight (int cssWeight)
static QFont::Style toQFontStyle (litehtml::font_style style)
static QColor toQColor (const litehtml::web_color &color)
static Qt::PenStyle borderPenStyle (litehtml::border_style style)
static QPen borderPen (const litehtml::border &border)
static QCursor toQCursor (const QString &c)
static QString tagName (const litehtml::element::ptr &e)
static litehtml::element::ptr elementForY (int y, const litehtml::element::ptr &element)
static litehtml::element::ptr elementForY (int y, const litehtml::document::ptr &document)

Variables

const int kDragDistance = 5

Typedef Documentation

◆ Context

using Context = QPainter

Definition at line 30 of file container_qpainter.cpp.

◆ Font

using Font = QFont

Definition at line 29 of file container_qpainter.cpp.

Function Documentation

◆ borderPen()

QPen borderPen ( const litehtml::border & border)
static

Definition at line 294 of file container_qpainter.cpp.

◆ borderPenStyle()

Qt::PenStyle borderPenStyle ( litehtml::border_style style)
static

Definition at line 279 of file container_qpainter.cpp.

◆ cssWeightToQtWeight()

QFont::Weight cssWeightToQtWeight ( int cssWeight)
static

Definition at line 248 of file container_qpainter.cpp.

◆ deepest_child_at_point()

bool deepest_child_at_point ( const litehtml::element::ptr & element,
const QPoint & pos,
const QPoint & viewportPos,
const std::function< bool(const litehtml::element::ptr &)> & action,
int level = 0 )
static

Definition at line 189 of file container_qpainter.cpp.

◆ elementForY() [1/2]

litehtml::element::ptr elementForY ( int y,
const litehtml::document::ptr & document )
static

Definition at line 1330 of file container_qpainter.cpp.

◆ elementForY() [2/2]

litehtml::element::ptr elementForY ( int y,
const litehtml::element::ptr & element )
static

Definition at line 1316 of file container_qpainter.cpp.

◆ firstLeaf()

litehtml::element::ptr firstLeaf ( const litehtml::element::ptr & element,
const litehtml::element::ptr & stop )
static

Definition at line 126 of file container_qpainter.cpp.

◆ getCommonParent()

std::tuple< litehtml::element::ptr, litehtml::element::ptr, litehtml::element::ptr > getCommonParent ( const litehtml::elements_list & a,
const litehtml::elements_list & b )
static

Definition at line 74 of file container_qpainter.cpp.

◆ getStartAndEnd()

std::pair< Selection::Element, Selection::Element > getStartAndEnd ( const Selection::Element & a,
const Selection::Element & b )
static

Definition at line 91 of file container_qpainter.cpp.

References Selection::Element::index.

◆ isVisible()

bool isVisible ( const litehtml::element::ptr & element)
static

Definition at line 53 of file container_qpainter.cpp.

◆ nextLeaf()

litehtml::element::ptr nextLeaf ( const litehtml::element::ptr & element,
const litehtml::element::ptr & stop )
static

Definition at line 140 of file container_qpainter.cpp.

◆ path()

litehtml::elements_list path ( const litehtml::element::ptr & element)
static

Definition at line 60 of file container_qpainter.cpp.

◆ Q_LOGGING_CATEGORY()

Q_LOGGING_CATEGORY ( log ,
"qlitehtml" ,
QtCriticalMsg  )
static

Definition at line 35 of file container_qpainter.cpp.

◆ selection_element_at_point()

Selection::Element selection_element_at_point ( const litehtml::element::ptr & element,
const QPoint & pos,
const QPoint & viewportPos,
Selection::Mode mode )
static

Definition at line 219 of file container_qpainter.cpp.

◆ selectionDetails()

Selection::Element selectionDetails ( const litehtml::element::ptr & element,
const QString & text,
const QPoint & pos )
static

Definition at line 167 of file container_qpainter.cpp.

◆ tagName()

QString tagName ( const litehtml::element::ptr & e)
static

Definition at line 624 of file container_qpainter.cpp.

◆ toQColor()

QColor toQColor ( const litehtml::web_color & color)
static

Definition at line 274 of file container_qpainter.cpp.

◆ toQCursor()

QCursor toQCursor ( const QString & c)
static

Definition at line 299 of file container_qpainter.cpp.

◆ toQFontStyle()

QFont::Style toQFontStyle ( litehtml::font_style style)
static

Definition at line 261 of file container_qpainter.cpp.

◆ toQPainter()

QPainter * toQPainter ( litehtml::uint_ptr hdc)
static

Definition at line 43 of file container_qpainter.cpp.

◆ toQRect()

QRect toQRect ( litehtml::position position)
static

Definition at line 48 of file container_qpainter.cpp.

Variable Documentation

◆ kDragDistance

const int kDragDistance = 5

Definition at line 27 of file container_qpainter.cpp.