| 1 |
/* poppler-link-extractor_p.h: qt interface to poppler |
| 2 |
* Copyright (C) 2007, 2008, 2011, Pino Toscano <[email protected]> |
| 3 |
* Copyright (C) 2021, Albert Astals Cid <[email protected]> |
| 4 |
* |
| 5 |
* This program is free software; you can redistribute it and/or modify |
| 6 |
* it under the terms of the GNU General Public License as published by |
| 7 |
* the Free Software Foundation; either version 2, or (at your option) |
| 8 |
* any later version. |
| 9 |
* |
| 10 |
* This program is distributed in the hope that it will be useful, |
| 11 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 |
* GNU General Public License for more details. |
| 14 |
* |
| 15 |
* You should have received a copy of the GNU General Public License |
| 16 |
* along with this program; if not, write to the Free Software |
| 17 |
* Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. |
| 18 |
*/ |
| 19 |
|
| 20 |
#ifndef _POPPLER_LINK_EXTRACTOR_H_ |
| 21 |
#define _POPPLER_LINK_EXTRACTOR_H_ |
| 22 |
|
| 23 |
#include <Object.h> |
| 24 |
#include <OutputDev.h> |
| 25 |
|
| 26 |
#include <QtCore/QList> |
| 27 |
|
| 28 |
namespace Poppler { |
| 29 |
|
| 30 |
class Link; |
| 31 |
class PageData; |
| 32 |
|
| 33 |
class LinkExtractorOutputDev : public OutputDev |
| 34 |
{ |
| 35 |
public: |
| 36 |
explicit LinkExtractorOutputDev(PageData *data); |
| 37 |
~LinkExtractorOutputDev() override; |
| 38 |
|
| 39 |
// inherited from OutputDev |
| 40 |
bool upsideDown() override { return false; } |
| 41 |
bool useDrawChar() override { return false; } |
| 42 |
bool interpretType3Chars() override { return false; } |
| 43 |
void processLink(::AnnotLink *link) override; |
| 44 |
|
| 45 |
// our stuff |
| 46 |
QList<Link *> links(); |
| 47 |
|
| 48 |
private: |
| 49 |
PageData *m_data; |
| 50 |
double m_pageCropWidth; |
| 51 |
double m_pageCropHeight; |
| 52 |
QList<Link *> m_links; |
| 53 |
}; |
| 54 |
|
| 55 |
} |
| 56 |
|
| 57 |
#endif |