source: wkhtmltox/trunk/fuentes/include/wkhtmltox/converter.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// Copyright 2010 wkhtmltopdf authors
2//
3// This file is part of wkhtmltopdf.
4//
5// wkhtmltopdf is free software: you can redistribute it and/or modify
6// it under the terms of the GNU Lesser General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// wkhtmltopdf 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 Lesser General Public License
16// along with wkhtmltopdf.  If not, see <http://www.gnu.org/licenses/>.
17
18#ifndef __CONVERTER_HH__
19#define __CONVERTER_HH__
20
21#include <QObject>
22#include <wkhtmltox/loadsettings.hh>
23#include <wkhtmltox/dllbegin.inc>
24
25namespace wkhtmltopdf {
26
27class DLL_LOCAL ConverterPrivate;
28
29class DLL_PUBLIC Converter: public QObject {
30    Q_OBJECT
31public:
32        virtual ~Converter() {};
33
34    int currentPhase();
35        int phaseCount();
36    QString phaseDescription(int phase=-1);
37    QString progressString();
38    int httpErrorCode();
39signals:
40    void warning(const QString & message);
41    void error(const QString & message);
42    void phaseChanged();
43    void progressChanged(int progress);
44    void finished(bool ok);
45
46        void checkboxSvgChanged(const QString & path);
47        void checkboxCheckedSvgChanged(const QString & path);
48        void radiobuttonSvgChanged(const QString & path);
49        void radiobuttonCheckedSvgChanged(const QString & path);
50public slots:
51    void beginConvertion();
52        bool convert();
53        void cancel();
54protected:
55        void emitCheckboxSvgs(const settings::LoadPage & ls);
56        virtual ConverterPrivate & priv() = 0;
57        friend class ConverterPrivate;
58};
59
60}
61#include <wkhtmltox/dllend.inc>
62#endif //__CONVERTER_HH__
Note: See TracBrowser for help on using the repository browser.