1/* poppler-qt.h: qt interface to poppler
2 * Copyright (C) 2005, Brad Hards <bradh@frogmouth.net>
3 * Copyright (C) 2006-2008, Albert Astals Cid <aacid@kde.org>
4 * Copyright (C) 2008, Pino Toscano <pino@kde.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
19 */
20
21#include "poppler-qt6.h"
22#include "poppler-private.h"
23
24namespace Poppler {
25
26TextBox::TextBox(const QString &text, const QRectF &bBox)
27{
28 m_data = new TextBoxData();
29 m_data->text = text;
30 m_data->bBox = bBox;
31}
32
33TextBox::~TextBox()
34{
35 delete m_data;
36}
37
38QString TextBox::text() const
39{
40 return m_data->text;
41}
42
43QRectF TextBox::boundingBox() const
44{
45 return m_data->bBox;
46}
47
48TextBox *TextBox::nextWord() const
49{
50 return m_data->nextWord;
51}
52
53QRectF TextBox::charBoundingBox(int i) const
54{
55 return m_data->charBBoxes.value(i);
56}
57
58bool TextBox::hasSpaceAfter() const
59{
60 return m_data->hasSpaceAfter;
61}
62
63}
64

source code of poppler/qt6/src/poppler-textbox.cc