KPimTextEdit
markupdirector.cpp
43QTextFrame::iterator MarkupDirector::processBlockContents(QTextFrame::iterator frameIt, const QTextBlock &block)
112QTextBlock::iterator MarkupDirector::processFragment(QTextBlock::iterator it, const QTextFragment &fragment, QTextDocument const *doc)
266QTextFrame::iterator MarkupDirector::processBlock(QTextFrame::iterator it, const QTextBlock &block)
376QPair<QTextFrame::iterator, QTextBlock> MarkupDirector::processList(QTextFrame::iterator it, const QTextBlock &_block, QTextList *list)
407void MarkupDirector::processCustomFragment(const QTextFragment &fragment, const QTextDocument *doc)
413QTextFrame::iterator MarkupDirector::processObject(QTextFrame::iterator it, const QTextBlock &block, QTextObject *object)
425QPair<QTextFrame::iterator, QTextBlock> MarkupDirector::skipBlockGroup(QTextFrame::iterator it, const QTextBlock &_block, QTextBlockGroup *blockGroup)
468QPair<QTextFrame::iterator, QTextBlock> MarkupDirector::processBlockGroup(const QTextFrame::iterator &it, const QTextBlock &block, QTextBlockGroup *blockGroup)
482QTextBlock::iterator MarkupDirector::processCharTextObject(QTextBlock::iterator it, const QTextFragment &fragment, QTextObject *textObject)
495QTextBlock::iterator MarkupDirector::processImage(QTextBlock::iterator it, const QTextImageFormat &imageFormat, const QTextDocument *doc)
547 // Clear background otherwise if we select 2 lines with same color it will not applied. bug #442416
619 fragmentFormat.fontFamilies().toStringList().isEmpty() ? QString() : fragmentFormat.fontFamilies().toStringList().constFirst();
704 if (!fontStrikeout && (d->m_openElements.contains(StrikeOut) || d->m_elementsToOpen.contains(StrikeOut))) {
708 if (!fontUnderline && (d->m_openElements.contains(Underline) || d->m_elementsToOpen.contains(Underline))
717 if (fontWeight != QFont::Bold && (d->m_openElements.contains(Strong) || d->m_elementsToOpen.contains(Strong))) {
721 if ((d->m_openElements.contains(SpanFontPointSize) || d->m_elementsToOpen.contains(SpanFontPointSize)) && (d->m_openFontPointSize != fontPointSize)) {
725 if ((d->m_openElements.contains(SpanFontFamily) || d->m_elementsToOpen.contains(SpanFontFamily)) && (d->m_openFontFamily != fontFamily)) {
730 || (d->m_elementsToOpen.contains(SpanBackground) && (d->m_backgroundToOpen != fontBackground))) {
735 || (d->m_elementsToOpen.contains(SpanForeground) && (d->m_foregroundToOpen != fontForeground))) {
744 if (!subscript && (d->m_openElements.contains(SubScript) || d->m_elementsToOpen.contains(SubScript))) {
748 if (!superscript && (d->m_openElements.contains(SuperScript) || d->m_elementsToOpen.contains(SuperScript))) {
788 if (!anchorHref.isEmpty() && !(d->m_openElements.contains(Anchor)) && (d->m_openAnchorHref != anchorHref)) {
804 if (fontBackground != Qt::NoBrush && !(d->m_openElements.contains(SpanBackground)) && (fontBackground != d->m_openBackground)) {
809 if (!fontFamily.isEmpty() && !(d->m_openElements.contains(SpanFontFamily)) && (fontFamily != d->m_openFontFamily)) {
815 && !(d->m_openElements.contains(SpanFontPointSize)) && (fontPointSize != d->m_openFontPointSize)) {
848QList<int> MarkupDirector::sortOpeningOrder(QSet<int> openingOrder, QTextBlock::iterator it) const
Interface for creating marked-up text output.
Definition abstractmarkupbuilder.h:37
virtual void beginFontPointSize(int size)=0
Begin a new font point size element in the markup.
virtual void beginSubscript()=0
Begin a subscript element.
virtual void beginList(QTextListFormat::Style style)=0
Begin a new list element in the markup.
virtual void endTableHeaderCell()=0
End a table header cell.
virtual void endParagraph()=0
Close the paragraph in the markup.
virtual void endSuperscript()=0
End superscript element.
virtual void beginEmph()=0
Begin an emphasised element in the markup.
virtual void endForeground()=0
Close the decorarated foreground element in the markup.
virtual void beginUnderline()=0
Begin an underlined element in the markup.
virtual void beginSuperscript()=0
Begin a superscript element.
virtual void beginBackground(const QBrush &brush)=0
Begin a decorarated background element in the markup (A text background color) using brush.
virtual void beginStrikeout()=0
Begin a struck out element in the markup.
virtual void beginTableCell(const QString &width, int colSpan, int rowSpan)=0
Begin a new table cell.
virtual void beginParagraph(Qt::Alignment a=Qt::AlignLeft, qreal top=0.0, qreal bottom=0.0, qreal left=0.0, qreal right=0.0, bool leftToRightText=false)=0
Begin a new paragraph in the markup.
virtual void endStrong()=0
Close the bold element in the markup.
virtual void appendLiteralText(const QString &text)=0
Append the plain text text to the markup.
virtual void endBackground()=0
Close the decorarated background element in the markup.
virtual void insertHorizontalRule(int width=-1)=0
Insert a horizontal rule into the markup.
virtual void endFontFamily()=0
End font family element.
virtual void beginTable(qreal cellpadding, qreal cellspacing, const QString &width)=0
Begin a table element.
virtual void endSubscript()=0
End subscript element.
virtual void beginStrong()=0
Begin a bold element in the markup.
virtual void beginForeground(const QBrush &brush)=0
Begin a decorarated foreground element in the markup (A text color) using brush.
virtual void insertImage(const QString &url, qreal width, qreal height)=0
Insert a new image element into the markup.
virtual void endFontPointSize()=0
End font point size element.
virtual void endEmph()=0
Close the emphasised element in the markup.
virtual void beginHeader(int level)=0
Begin a level level header.
virtual void beginFontFamily(const QString &family)=0
Begin a new font family element in the markup.
virtual void beginTableHeaderCell(const QString &width, int colSpan, int rowSpan)=0
Begin a new table header cell.
virtual void endStrikeout()=0
Close the struck out element in the markup.
virtual void beginAnchor(const QString &href={}, const QString &name={})=0
Begin a url anchor element in the markup.
virtual void beginTableRow()=0
Begin a new table row.
virtual void addNewline()=0
Add a newline to the markup.
virtual void endUnderline()=0
Close the underlined element in the markup.
virtual void beginListItem()=0
Begin a new list item in the markup.
Instructs a builder object to create markup output.
Definition markupdirector.h:76
virtual QTextFrame::iterator processBlock(QTextFrame::iterator it, const QTextBlock &block)
Directs the builder to create output for the single block.
Definition markupdirector.cpp:266
virtual void processTableCell(const QTextTableCell &tableCell, QTextTable *table)
Directs the builder to create output for the contents of the single tableCell.
Definition markupdirector.cpp:370
virtual QSet< int > getElementsToClose(const QTextBlock::iterator &it) const
Returns the tags that should be closed at the position of it.
Definition markupdirector.cpp:668
KPIMTextEdit::AbstractMarkupBuilder *const m_builder
The builder this MarkupDirector is operating on.
Definition markupdirector.h:259
virtual QTextBlock::iterator processCharTextObject(QTextBlock::iterator it, const QTextFragment &fragment, QTextObject *textObject)
Directs the builder to create output for the contents of the single textObject.
Definition markupdirector.cpp:482
virtual QTextFrame::iterator processTable(QTextFrame::iterator it, QTextTable *table)
Directs the builder to create output for the contents of the single table.
Definition markupdirector.cpp:284
MarkupDirector(KPIMTextEdit::AbstractMarkupBuilder *builder)
Constructor.
Definition markupdirector.cpp:30
virtual void processCustomFragment(const QTextFragment &fragment, QTextDocument const *doc)
Hook for instructing the builder to create output for the fragemnt with a custom type.
Definition markupdirector.cpp:407
virtual void processOpeningElements(const QTextBlock::iterator &it)
Directs the builder to open the appropriate tags at the position of it.
Definition markupdirector.cpp:587
virtual void processDocument(QTextDocument *doc)
Constructs the output by directing the builder to create the markup.
Definition markupdirector.cpp:477
virtual QPair< QTextFrame::iterator, QTextBlock > processBlockGroup(const QTextFrame::iterator &it, const QTextBlock &block, QTextBlockGroup *textBlockGroup)
Directs the builder to create output for the single textBlockGroup.
Definition markupdirector.cpp:468
virtual QTextFrame::iterator processFrame(QTextFrame::iterator it, QTextFrame *frame)
Directs the builder to create output for the single frame.
Definition markupdirector.cpp:255
void processDocumentContents(QTextFrame::iterator begin, const QTextFrame::iterator &end)
Processes the document between begin and end.
Definition markupdirector.cpp:236
virtual QPair< QTextFrame::iterator, QTextBlock > processList(QTextFrame::iterator it, const QTextBlock &block, QTextList *textList)
Directs the builder to create output for the single textList.
Definition markupdirector.cpp:376
QList< int > sortOpeningOrder(QSet< int > openingTags, QTextBlock::iterator it) const
Returns a list of tags contained in openingTags sorted so they can be opened in order and will be clo...
Definition markupdirector.cpp:848
virtual QList< int > getElementsToOpen(const QTextBlock::iterator &it)
Returns the tags that should be opened at the position of it.
Definition markupdirector.cpp:754
virtual QTextBlock::iterator processImage(QTextBlock::iterator it, const QTextImageFormat &imageFormat, QTextDocument const *doc)
Directs the builder to create output for the image represented by the imageFormat.
Definition markupdirector.cpp:495
QPair< QTextFrame::iterator, QTextBlock > skipBlockGroup(QTextFrame::iterator it, const QTextBlock &_block, QTextBlockGroup *blockGroup)
Iterates the iterator it to the first block after blockGroup.
Definition markupdirector.cpp:425
virtual QTextFrame::iterator processObject(QTextFrame::iterator it, const QTextBlock &block, QTextObject *textObject)
Directs the builder to create output for the single textObject.
Definition markupdirector.cpp:413
virtual QTextFrame::iterator processBlockContents(QTextFrame::iterator it, const QTextBlock &block)
Directs the builder to create output for the contents of the single block.
Definition markupdirector.cpp:43
virtual QTextBlock::iterator processFragment(QTextBlock::iterator it, const QTextFragment &fragment, QTextDocument const *doc)
Directs the builder to create output for the contents of the single fragment.
Definition markupdirector.cpp:112
virtual void processClosingElements(const QTextBlock::iterator &it)
Directs the builder to close the appropriate tags at the position of it.
Definition markupdirector.cpp:506
Q_SCRIPTABLE Q_NOREPLY void start()
Separator_Line
LineSeparator
Category category(char32_t ucs4)
Bold
void append(QList< T > &&value)
iterator begin()
const T & constFirst() const const
bool contains(const AT &value) const const
iterator end()
bool isEmpty() const const
void prepend(parameter_type value)
iterator insert(const T &value)
bool isEmpty() const const
bool remove(const T &value)
QString arg(Args &&... args) const const
const QChar at(qsizetype position) const const
void clear()
bool isEmpty() const const
QStringList split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
NoBrush
RightToLeft
iterator begin() const const
QTextBlockFormat blockFormat() const const
const QTextDocument * document() const const
bool isValid() const const
Qt::LayoutDirection textDirection() const const
QTextList * textList() const const
Qt::Alignment alignment() const const
AlignSuperScript
QTextObject * objectForFormat(const QTextFormat &f) const const
QTextFrame * rootFrame() const const
UserObject
BlockTrailingHorizontalRulerWidth
QTextCharFormat charFormat() const const
QString text() const const
iterator begin() const const
iterator end() const const
qreal height() const const
QString name() const const
qreal width() const const
PercentageLength
QTextDocument * document() const const
QTextTableCell cellAt(const QTextCursor &cursor) const const
int columns() const const
QTextTableFormat format() const const
int rows() const const
QTextFrame::iterator begin() const const
int columnSpan() const const
QTextFrame::iterator end() const const
QList< QTextLength > columnWidthConstraints() const const
Q_D(Todo)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.