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 _KwFilterManager_h_
21 #define _KwFilterManager_h_
24 * @file KwFilterManager.h
25 * @brief Manages file filters.
26 * @author James Hogan <james@albanarts.com>
29 #include <kdemacros.h>
32 #include <QStringList>
36 class KwLoadSaveFilter
;
38 /// Manages file filter.
39 class KDE_EXPORT KwFilterManager
44 * Constructors + destructor
47 /// Primary constructor.
51 virtual ~KwFilterManager();
57 /// Add a load save filter.
58 void addLoadSaveFilter(KwLoadSaveFilter
* loadSaveFilter
, bool makeDefault
= false);
60 /// Add an import filter.
61 void addImportFilter(KwImportFilter
* importFilter
);
63 /// Add an export filter.
64 void addExportFilter(KwExportFilter
* exportFilter
);
66 /// Get load mime types.
67 QStringList
loadMimeTypes() const;
69 /// Get save mime types.
70 QStringList
saveMimeTypes() const;
72 /// Get import mime types.
73 QStringList
importMimeTypes() const;
75 /// Get export mime types.
76 QStringList
exportMimeTypes() const;
84 /// Default load save filter.
85 KwLoadSaveFilter
* m_defaultLoadSaveFilter
;
87 /// List of load save filters.
88 QList
<KwLoadSaveFilter
*> m_loadSaveFilters
;
90 /// List of import filters.
91 QList
<KwImportFilter
*> m_importFilters
;
93 /// List of export filters.
94 QList
<KwExportFilter
*> m_exportFilters
;
97 #endif // _KwFilterManager_h_