1 #ifndef __FILTERINTERFACE_H__
2 #define __FILTERINTERFACE_H__
8 * This is the interface that must be implemented for all
9 * format filter classes. The FileIO class
10 * uses the methods defined in here to interact with the format
13 * @author Andrew Mustun
22 virtual ~FilterInterface();
24 virtual bool canImport(RS2::FormatType t);
25 virtual bool canExport(RS2::FormatType t);
28 * The implementation of this method in a inherited format
29 * class should read a file from disk and put the entities
30 * into the current entity container.
32 virtual bool fileImport(Drawing & g, const QString & file, RS2::FormatType type) = 0;
35 * The implementation of this method in a inherited format
36 * class should write the entities in the current entity container
37 * to a file on the disk.
39 virtual bool fileExport(Drawing & g, const QString & file, RS2::FormatType type) = 0;
42 void addImportFormat(RS2::FormatType type);
43 void addExportFormat(RS2::FormatType type);
46 //! Pointer to the graphic we currently operate on.
49 //! Vector of file extensions this filter can import.
50 // Q3ValueList<RS2::FormatType> importFormats;
51 QList<RS2::FormatType> importFormats;
53 //! Vector of file extensions this filter can export.
54 // Q3ValueList<RS2::FormatType> exportFormats;
55 QList<RS2::FormatType> exportFormats;