1 /* poppler-page.cc: qt interface to poppler
2  * Copyright (C) 2005, Net Integration Technologies, Inc.
3  * Copyright (C) 2007, 2012, Albert Astals Cid <aacid@kde.org>
4  * Copyright (C) 2008, Pino Toscano <pino@kde.org>
5  * Copyright (C) 2015 Adam Reichold <adamreichold@myopera.com>
6  * Copyright (C) 2018, 2021 Nelson Benítez León <nbenitezl@gmail.com>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2, or (at your option)
11  * any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef _POPPLER_PAGE_PRIVATE_H_
24 #define _POPPLER_PAGE_PRIVATE_H_
25 
26 #include "CharTypes.h"
27 
28 class QRectF;
29 
30 class LinkAction;
31 class Page;
32 class TextPage;
33 
34 namespace Poppler {
35 
36 class DocumentData;
37 class PageTransition;
38 
39 class PageData
40 {
41 public:
42     Link *convertLinkActionToLink(::LinkAction *a, const QRectF &linkArea);
43 
44     DocumentData *parentDoc;
45     ::Page *page;
46     int index;
47     PageTransition *transition;
48 
49     static Link *convertLinkActionToLink(::LinkAction *a, DocumentData *parentDoc, const QRectF &linkArea);
50 
51     TextPage *prepareTextSearch(const QString &text, Page::Rotation rotate, QVector<Unicode> *u);
52     bool performSingleTextSearch(TextPage *textPage, QVector<Unicode> &u, double &sLeft, double &sTop, double &sRight, double &sBottom, Page::SearchDirection direction, bool sCase, bool sWords, bool sDiacritics, bool sAcrossLines);
53     QList<QRectF> performMultipleTextSearch(TextPage *textPage, QVector<Unicode> &u, bool sCase, bool sWords, bool sDiacritics, bool sAcrossLines);
54 };
55 
56 }
57 
58 #endif
59