aboutsummaryrefslogtreecommitdiff
path: root/src/renderers/renderhelpers.hpp
blob: 570d04734122e5c420804a552c47d9d565eb7fdc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef RENDERHELPERS_HPP
#define RENDERHELPERS_HPP

#include <QByteArray>
#include <QTextCursor>
#include <QTextDocument>

namespace renderhelpers
{
    void renderEscapeCodes(const QByteArray &input, QTextCharFormat& format, const QTextCharFormat& defaultFormat, QTextCursor& cursor);

    /**
     * Replaces single and double quotes (', ") with one of the four
     * typographer's quotes, a.k.a curly quotes, e.g: ‘this’ and “this”
     */
    QByteArray replace_quotes(QByteArray &line);

    void setPageMargins(QTextDocument *doc, int mh, int mv);
}

#endif