1 /***************************************************************************
2 * This file is part of KWorship. *
3 * Copyright 2008 James Hogan <james@albanarts.com> *
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. *
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. *
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_
24 * @file KwExportFilter.h
25 * @brief Export file filter.
26 * @author James Hogan <james@albanarts.com>
32 #include <QStringList>
39 /// Export file filter.
40 class KWMAIN_EXPORT KwExportFilter
: public virtual KwFilter
48 /// Abstract description of something that cannot be saved.
54 * Constructors + destructor
57 /// Default constructor.
61 virtual ~Limitation();
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.
80 * Constructors + destructor
83 /// Default constructor.
87 virtual ~Limitations();
95 /// List of limitations.
96 QList
<Limitation
*> m_limitations
;
100 * Constructors + destructor
103 /// Primary constructor.
107 virtual ~KwExportFilter();
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;
123 /// Get a list of export mime types.
124 QStringList
exportMimeTypes() const;
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;
139 /// List of export mime types.
140 QStringList m_exportMimeTypes
;
143 #endif // _KwExportFilter_h_