source: wkhtmltox/trunk/fuentes/src/lib/outline.hh @ 51

Last change on this file since 51 was 51, checked in by mabarracus, 4 years ago

wip

File size: 2.1 KB
Line 
1// -*- mode: c++; tab-width: 4; indent-tabs-mode: t; eval: (progn (c-set-style "stroustrup") (c-set-offset 'innamespace 0)); -*-
2// vi:set ts=4 sts=4 sw=4 noet :
3//
4// Copyright 2010 wkhtmltopdf authors
5//
6// This file is part of wkhtmltopdf.
7//
8// wkhtmltopdf is free software: you can redistribute it and/or modify
9// it under the terms of the GNU Lesser General Public License as published by
10// the Free Software Foundation, either version 3 of the License, or
11// (at your option) any later version.
12//
13// wkhtmltopdf 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 Lesser General Public License
19// along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
20
21#ifndef __OUTLINE_HH__
22#define __OUTLINE_HH__
23
24#include "pdfsettings.hh"
25#include <QWebElement>
26#include <QWebFrame>
27
28#ifdef  __EXTENSIVE_WKHTMLTOPDF_QT_HACK__
29#include "dllbegin.inc"
30namespace wkhtmltopdf {
31
32class DLL_LOCAL OutlinePrivate;
33
34class DLL_LOCAL Outline {
35public:
36        Outline(const settings::PdfGlobal & settings);
37        ~Outline();
38        void addEmptyWebPage();
39        bool replaceWebPage(int d, const QString & name, QWebPrinter & wp, QWebFrame * f, const settings::PdfObject & ps, QVector<QPair<QWebElement, QString> > & local, QHash<QString, QWebElement> & anchors);
40        void addWebPage(const QString & name, QWebPrinter & wp, QWebFrame * frame, const settings::PdfObject & ps, QVector<QPair<QWebElement, QString> > & local, QHash<QString, QWebElement> & external);
41
42        void fillHeaderFooterParms(int page, QHash<QString, QString> & parms, const settings::PdfObject & ps);
43        void fillAnchors(int d, QHash<QString, QWebElement> & anchors);
44        int pageCount();
45        void printOutline(QPrinter * printer);
46
47        void dump(QTextStream & stream) const;
48private:
49        OutlinePrivate * d;
50        friend class TocPrinter;
51        friend class TocPrinterPrivate;
52};
53
54#include "dllend.inc"
55}
56#endif //__EXTENSIVE_WKHTMLTOPDF_QT_HACK__
57#endif //__OUTLINE_HH__
Note: See TracBrowser for help on using the repository browser.