Debian Codegraph @

src/qdjviewexporters.h

raw
1 //C- -*- C++ -*-
2 //C- -------------------------------------------------------------------
3 //C- DjView4
4 //C- Copyright (c) 2006- Leon Bottou
5 //C-
6 //C- This software is subject to, and may be distributed under, the
7 //C- GNU General Public License, either version 2 of the license,
8 //C- or (at your option) any later version. The license should have
9 //C- accompanied the software or you may obtain a copy of the license
10 //C- from the Free Software Foundation at http://www.fsf.org .
11 //C-
12 //C- This program is distributed in the hope that it will be useful,
13 //C- but WITHOUT ANY WARRANTY; without even the implied warranty of
14 //C- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 //C- GNU General Public License for more details.
16 //C- ------------------------------------------------------------------
17
18 #ifndef QDJVIEWEXPORTERS_H
19 #define QDJVIEWEXPORTERS_H
20
21 #if AUTOCONF
22 # include "config.h"
23 #endif
24
25 #include <QObject>
26 #include <QDialog>
27 #include <QList>
28 #include <QString>
29 #include <QStringList>
30 #include <QWidget>
31
32 class QPrinter;
33 class QPrintDialog;
34
35 #include <libdjvu/miniexp.h>
36 #include <libdjvu/ddjvuapi.h>
37
38 #include "qdjview.h"
39 #include "qdjviewdialogs.h"
40
41
42
43 // ----------- QDJVIEWEXPORTER
44
45
46
47 class QDjViewExporter : public QObject
48 {
49 Q_OBJECT
50 public:
51 virtual ~QDjViewExporter();
52 virtual bool exportOnePageOnly();
53 virtual void setFromTo(int fromPage, int toPage);
54 virtual void setErrorCaption(QString);
55 virtual void resetProperties();
56 virtual void loadProperties(QString group=QString());
57 virtual void saveProperties(QString group=QString());
58 virtual bool loadPrintSetup(QPrinter *printer, QPrintDialog *dialog);
59 virtual bool savePrintSetup(QPrinter *printer);
60 virtual int propertyPages();
61 virtual QWidget* propertyPage(int num);
62 virtual ddjvu_status_t status();
63 virtual QString name();
64 public slots:
65 virtual bool save(QString fileName) = 0;
66 virtual bool print(QPrinter *printer);
67 virtual void stop();
68 virtual void error(QString, QString, int);
69 signals:
70 void progress(int i);
71 protected:
72 friend class QDjViewExporterFactory;
73 QDjViewExporter(QDialog *parent, QDjView *djview, QString name);
74 QDialog *parent;
75 QDjView *djview;
76 QDjViewErrorDialog *errorDialog;
77 QString errorCaption;
78 QString exporterName;
79 int fromPage;
80 int toPage;
81 public:
82 static QDjViewExporter *create(QDialog*, QDjView*, QString name);
83 static QStringList names();
84 static QStringList info(QString name);
85 };
86
87
88 #endif
89
90 /* -------------------------------------------------------------
91 Local Variables:
92 c++-font-lock-extra-types: ( "\\sw+_t" "[A-Z]\\sw*[a-z]\\sw*" )
93 End:
94 ------------------------------------------------------------- */