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-qt5.h"
22 #include "poppler-private.h"
23
24 namespace Poppler {
25
TextBox(const QString & text,const QRectF & bBox)26 TextBox::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
~TextBox()33 TextBox::~TextBox()
34 {
35 delete m_data;
36 }
37
text() const38 QString TextBox::text() const
39 {
40 return m_data->text;
41 }
42
boundingBox() const43 QRectF TextBox::boundingBox() const
44 {
45 return m_data->bBox;
46 }
47
nextWord() const48 TextBox *TextBox::nextWord() const
49 {
50 return m_data->nextWord;
51 }
52
charBoundingBox(int i) const53 QRectF TextBox::charBoundingBox(int i) const
54 {
55 return m_data->charBBoxes.value(i);
56 }
57
hasSpaceAfter() const58 bool TextBox::hasSpaceAfter() const
59 {
60 return m_data->hasSpaceAfter;
61 }
62
63 }
64