MyBooks
exportinterface.h
Go to the documentation of this file.
1 /***************************************************************************
2  * This file is part of the CuteReport project *
3  * Copyright (C) 2012-2017 by Alexander Mikhalov *
4  * alexander.mikhalov@gmail.com *
5  * *
6  ** GNU General Public License Usage **
7  * *
8  * This library is free software: you can redistribute it and/or modify *
9  * it under the terms of the GNU 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  * You should have received a copy of the GNU General Public License *
13  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
14  * *
15  ** GNU Lesser General Public License **
16  * *
17  * This library is free software: you can redistribute it and/or modify *
18  * it under the terms of the GNU Lesser General Public License as *
19  * published by the Free Software Foundation, either version 3 of the *
20  * License, or (at your option) any later version. *
21  * You should have received a copy of the GNU Lesser General Public *
22  * License along with this library. *
23  * If not, see <http://www.gnu.org/licenses/>. *
24  * *
25  * This library is distributed in the hope that it will be useful, *
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
28  * GNU General Public License for more details. *
29  ****************************************************************************/
30 #ifndef EXPORTNTERFACE_H
31 #define EXPORTNTERFACE_H
32 
33 #include "reportplugininterface.h"
34 #include "reportinterface.h"
35 #include "cutereport_globals.h"
36 
37 #include <QtGui>
38 #include <QWidget>
39 
40 namespace CuteReport {
41 
42 class ExportHelperInterface;
43 
45 {
46  Q_OBJECT
48 
49 public:
50  explicit ExportInterface(QObject *parent = 0);
51  virtual ~ExportInterface();
52 
53  virtual QString format() const = 0;
54  virtual QIcon icon() const = 0;
55 
56  virtual ExportInterface * clone() const = 0;
57  virtual ExportInterface * createInstance( QObject * parent = 0) const = 0;
58  virtual ExportHelperInterface * helper() = 0;
59 
60  virtual bool process(CuteReport::ReportInterface * report, const QString & outputUrl) = 0;
61  virtual bool processWithDialog(CuteReport::ReportInterface * report, const QString & outputUrl = QString()) = 0;
62 
63  virtual QString lastError() = 0;
64 
65 protected:
66  ExportInterface(const ExportInterface & dd, QObject * parent);
67 
68 signals:
69 
70 };
71 
72 
73 class ExportHelperInterface: public QWidget
74 {
75  Q_OBJECT
76 public:
78 };
79 
80 
81 }
82 
83 Q_DECLARE_INTERFACE(CuteReport::ExportInterface, "CuteReport.ExportInterface/1.0")
84 Q_DECLARE_INTERFACE(CuteReport::ExportHelperInterface, "CuteReport.ExportHelperInterface/1.0")
85 
86 #endif // EXPORTNTERFACE_H
Definition: abstractpainterdelegate.h:42
TODO v2: rename to ReportObject.
Definition: reportinterface.h:71
Definition: reportplugininterface.h:53
#define CUTEREPORT_EXPORTS
Definition: cutereport_globals.h:47
Definition: exportinterface.h:44
Definition: exportinterface.h:73
ExportHelperInterface(ExportInterface *)
Definition: exportinterface.h:77