10#ifndef KATE_PRINT_PAINTER_H
11#define KATE_PRINT_PAINTER_H
44 PrintPainter(KTextEditor::DocumentPrivate *doc, KTextEditor::ViewPrivate *view);
47 PrintPainter(
const PrintPainter &) =
delete;
48 PrintPainter &operator=(
const PrintPainter &) =
delete;
50 void paint(QPrinter *printer)
const;
53 void setColorScheme(
const QString &scheme);
55 void setPrintGuide(
const bool on)
59 void setPrintLineNumbers(
const bool on)
61 m_printLineNumbers = on;
63 void setDontPrintFoldedCode(
bool p)
65 m_dontPrintFoldedCode = p;
67 void setUseHeader(
const bool on)
71 void setUseFooter(
const bool on)
75 void setUseBackground(
const bool on)
79 void setUseBox(
const bool on);
80 void setBoxMargin(
const int margin)
84 void setBoxWidth(
const int width);
85 void setBoxColor(
const QColor &color);
86 void setHeadersFont(
const QFont &font)
90 void setTextFont(
const QFont &font);
92 void setHeaderBackground(
const QColor &color);
93 void setHeaderForeground(
const QColor &color);
94 void setUseHeaderBackground(
const bool on)
96 m_useHeaderBackground = on;
99 void setFooterBackground(
const QColor &color);
100 void setFooterForeground(
const QColor &color);
101 void setUseFooterBackground(
const bool on)
103 m_useFooterBackground = on;
106 void setHeaderFormat(
const QStringList &list)
108 m_headerFormat =
list;
110 void setFooterFormat(
const QStringList &list)
112 m_footerFormat =
list;
116 void paintLineNumber(QPainter &painter,
const uint number,
const PageLayout &pl)
const;
117 void paintLine(QPainter &painter,
const uint line, uint &y, uint &remainder,
const PageLayout &pl)
const;
118 void paintNewPage(QPainter &painter,
const uint currentPage, uint &y,
const PageLayout &pl)
const;
120 void paintBackground(QPainter &painter,
const uint y,
const PageLayout &pl)
const;
121 void paintBox(QPainter &painter, uint &y,
const PageLayout &pl)
const;
122 void paintGuide(QPainter &painter, uint &y,
const PageLayout &pl)
const;
124 void paintHeader(QPainter &painter,
const uint currentPage, uint &y,
const PageLayout &pl)
const;
125 void paintFooter(QPainter &painter,
const uint currentPage,
const PageLayout &pl)
const;
126 void configure(
const QPrinter *printer, PageLayout &layout)
const;
131 const KTextEditor::ViewPrivate *
const m_view;
132 const KTextEditor::DocumentPrivate *
const m_doc;
135 bool m_printLineNumbers;
136 bool m_dontPrintFoldedCode;
139 bool m_useBackground;
141 bool m_useHeaderBackground;
142 bool m_useFooterBackground;
148 QColor m_headerBackground;
149 QColor m_headerForeground;
150 QColor m_footerBackground;
151 QColor m_footerForeground;
155 QStringList m_headerFormat;
156 QStringList m_footerFormat;
159 KateRenderer *m_renderer;
162 uint m_lineNumberWidth;
Backend of KTextEditor::Document related public KTextEditor interfaces.
An object representing a section of text, from one Cursor to another.
Handles all of the work of rendering the text (used for the views and printing)
Class representing the folding information for a TextBuffer.
KIOCORE_EXPORT QStringList list(const QString &fileClass)
The KTextEditor namespace contains all the public API that is required to use the KTextEditor compone...