1 // Copyright (C) 2003 Dominique Devriese <devriese@kde.org>
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License
5 // as published by the Free Software Foundation; either version 2
6 // of the License, or (at your option) any later version.
8 // This program is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 // GNU General Public License for more details.
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
18 #ifndef KIG_FILTERS_EXPORTER_H
19 #define KIG_FILTERS_EXPORTER_H
27 class KActionCollection
;
31 class KigExportManager
33 std::vector
<KigExporter
*> mexporters
;
37 static KigExportManager
* instance();
38 void addMenuAction( const KigPart
* doc
, KigWidget
* w
,
39 KActionCollection
* coll
);
45 virtual ~KigExporter();
48 * Returns a statement like i18n( "Export to image" )
50 virtual QString
exportToStatement() const = 0;
52 * Returns a string like i18n( "Image..." )
54 virtual QString
menuEntryName() const = 0;
56 * Returns a string with the name of the icon
58 virtual QString
menuIcon() const = 0;
61 * Do what you need to do. It's up to the individual exporters to
62 * ask the user for which file to export to etc., because they can
63 * do a much better job at that..
65 virtual void run( const KigPart
& doc
, KigWidget
& w
) = 0;
69 * This exporter takes care of the "Export to Image" stuff..
76 QString
exportToStatement() const;
77 QString
menuEntryName() const;
78 QString
menuIcon() const;
79 void run( const KigPart
& doc
, KigWidget
& w
);
83 * Guess what this one does ;)
84 * It exports to the XFig file format, as documented in the file
85 * FORMAT3.2 in the XFig source distribution.
92 QString
exportToStatement() const;
93 QString
menuEntryName() const;
94 QString
menuIcon() const;
95 void run( const KigPart
& doc
, KigWidget
& w
);