source: wkhtmltox/trunk/fuentes/include/wkhtmltox/utilities.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 __UTILITIES_HH__
19#define __UTILITIES_HH__
20
21#include <QProxyStyle>
22#include <QFile>
23#include <QFileInfo>
24#include <QImageWriter>
25#include <QPainter>
26#include <QStyleOption>
27#include <QSvgRenderer>
28#include <QUrl>
29
30#include <wkhtmltox/dllbegin.inc>
31/**
32 * Custom simplistic style
33 */
34class DLL_PUBLIC MyLooksStyle: public QProxyStyle {
35        Q_OBJECT
36public:
37        typedef QProxyStyle parent_t;
38        MyLooksStyle();
39        void drawPrimitive( PrimitiveElement element, const QStyleOption * option, QPainter * painter, const QWidget * widget = 0 ) const;
40        bool weAreDrawingForms;
41
42        static QSvgRenderer * checkbox;
43        static QSvgRenderer * checkbox_checked;
44        static QSvgRenderer * radiobutton;
45        static QSvgRenderer * radiobutton_checked;
46public slots:
47        void producingForms(bool f);
48        void setCheckboxSvg(const QString & path);
49        void setCheckboxCheckedSvg(const QString & path);
50        void setRadioButtonSvg(const QString & path);
51        void setRadioButtonCheckedSvg(const QString & path);
52};
53
54DLL_PUBLIC int handleError(bool success, int errorCode);
55
56#include <wkhtmltox/dllend.inc>
57#endif //__UTILITIES_HH__
Note: See TracBrowser for help on using the repository browser.