Basic openoffice.org control, and listening for new presentation documents, still...
[kworship.git] / kworship / KwExportFilter.h
blobb745a2fa046e7ef88682ac818e3fc3971921e0b1
1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
4 * *
5 * KWorship is free software: you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation, either version 2 of the License, or *
8 * (at your option) any later version. *
9 * *
10 * KWorship 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 General Public License *
16 * along with KWorship. If not, write to the Free Software Foundation, *
17 * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
18 ***************************************************************************/
20 #ifndef _KwExportFilter_h_
21 #define _KwExportFilter_h_
23 /**
24 * @file KwExportFilter.h
25 * @brief Export file filter.
26 * @author James Hogan <james@albanarts.com>
29 #include "KwFilter.h"
30 #include "KwExport.h"
32 #include <QStringList>
33 #include <QString>
34 #include <QList>
36 class KwDocument;
37 class KUrl;
39 /// Export file filter.
40 class KWMAIN_EXPORT KwExportFilter : public virtual KwFilter
42 public:
45 * Types
48 /// Abstract description of something that cannot be saved.
49 class Limitation
51 public:
54 * Constructors + destructor
57 /// Default constructor.
58 Limitation();
60 /// Destructor.
61 virtual ~Limitation();
64 * Main interface
67 /// Get a short description of what won't be saved
68 virtual QString briefDescription() = 0;
70 /// Get a detailed description of what won't be saved
71 virtual QString detailedDescription() = 0;
74 /// Container class of limitations.
75 class Limitations
77 public:
80 * Constructors + destructor
83 /// Default constructor.
84 Limitations();
86 /// Destructor.
87 virtual ~Limitations();
89 private:
92 * Variables
95 /// List of limitations.
96 QList<Limitation*> m_limitations;
100 * Constructors + destructor
103 /// Primary constructor.
104 KwExportFilter();
106 /// Destructor.
107 virtual ~KwExportFilter();
110 * Main interface
113 /// Obtain information about any data that can not be saved.
114 void saveLimitations(KwDocument* doc, const QString& mimeType, Limitations* o_limitations);
116 /// Save the document to file.
117 virtual bool save(KwDocument* doc, const KUrl& url, const QString& mimeType) = 0;
120 * Accessors
123 /// Get a list of export mime types.
124 QStringList exportMimeTypes() const;
126 protected:
129 * Virtual interface
132 /// Obtain information about any data that can not be saved.
133 virtual void v_saveLimitations(KwDocument* doc, const QString& mimeType, Limitations* o_limitations) = 0;
136 * Variables
139 /// List of export mime types.
140 QStringList m_exportMimeTypes;
143 #endif // _KwExportFilter_h_