1/*
2 SPDX-FileCopyrightText: 2002 Dave Corrie <kde@davecorrie.com>
3 SPDX-FileCopyrightText: 2014 Daniel Vrátil <dvratil@redhat.com>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KTEXTTOHTML_P_H
9#define KTEXTTOHTML_P_H
10
11#include "kcoreaddons_export.h"
12
13class KTextToHTMLHelper
14{
15public:
16 KTextToHTMLHelper(const QString &plainText, int pos = 0, int maxUrlLen = 4096, int maxAddressLen = 255);
17
18 QString getEmailAddress();
19 QString getPhoneNumber();
20 bool atUrl() const;
21 bool isEmptyUrl(const QString &url) const;
22 QString getUrl(bool *badurl = nullptr);
23 QString highlightedText();
24
25 QString mText;
26 int mMaxUrlLen;
27 int mMaxAddressLen;
28 int mPos;
29};
30
31#endif
32

source code of kcoreaddons/src/lib/text/ktexttohtml_p.h