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

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

wip

File size: 1.8 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 __CONVERTER_P_HH__
22#define __CONVERTER_P_HH__
23
24#include "converter.hh"
25#include "websettings.hh"
26#include <QFile>
27#include <QWebSettings>
28
29#include "dllbegin.inc"
30
31namespace wkhtmltopdf {
32
33class DLL_LOCAL ConverterPrivate: public QObject {
34        Q_OBJECT
35public:
36        void copyFile(QFile & src, QFile & dst);
37
38        QList<QString> phaseDescriptions;
39        int currentPhase;
40
41        QString progressString;
42protected:
43        bool error;
44        virtual void clearResources() = 0;
45        virtual Converter & outer() = 0;
46        int errorCode;
47
48        bool convertionDone;
49
50        void updateWebSettings(QWebSettings * ws, const settings::Web & s) const;
51public slots:
52        void fail();
53        void loadProgress(int progress);
54
55        virtual void beginConvert() = 0;
56        void cancel();
57        bool convert();
58        void forwardError(QString error);
59        void forwardWarning(QString warning);
60private:
61  friend class Converter;
62};
63
64}
65#include "dllend.inc"
66#endif //__CONVERTER_P_HH__
Note: See TracBrowser for help on using the repository browser.