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

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

wip

File size: 2.0 KB
RevLine 
[51]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_HH__
22#define __CONVERTER_HH__
23
24#include <QObject>
25#include <wkhtmltox/loadsettings.hh>
26#include <wkhtmltox/dllbegin.inc>
27
28namespace wkhtmltopdf {
29
30class DLL_LOCAL ConverterPrivate;
31
32class DLL_PUBLIC Converter: public QObject {
33    Q_OBJECT
34public:
35        virtual ~Converter() {};
36
37    int currentPhase();
38        int phaseCount();
39    QString phaseDescription(int phase=-1);
40    QString progressString();
41    int httpErrorCode();
42signals:
43    void warning(const QString & message);
44    void error(const QString & message);
45    void phaseChanged();
46    void progressChanged(int progress);
47    void finished(bool ok);
48
49        void checkboxSvgChanged(const QString & path);
50        void checkboxCheckedSvgChanged(const QString & path);
51        void radiobuttonSvgChanged(const QString & path);
52        void radiobuttonCheckedSvgChanged(const QString & path);
53public slots:
54    void beginConvertion();
55        bool convert();
56        void cancel();
57protected:
58        void emitCheckboxSvgs(const settings::LoadPage & ls);
59        virtual ConverterPrivate & priv() = 0;
60        friend class ConverterPrivate;
61};
62
63}
64#include <wkhtmltox/dllend.inc>
65#endif //__CONVERTER_HH__
Note: See TracBrowser for help on using the repository browser.