QCAD
Open Source 2D CAD
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
RFileImporterRegistry.h
Go to the documentation of this file.
1 
20 #ifndef RFILEIMPORTERREGISTRY_H
21 #define RFILEIMPORTERREGISTRY_H
22 
23 #include "core_global.h"
24 
25 #include <QString>
26 #include <QList>
27 #include <QMetaType>
28 #include <QStringList>
29 
30 class RDocument;
31 class RFileImporter;
33 class RMessageHandler;
34 class RProgressHandler;
35 
46 public:
47  static void registerFileImporter(RFileImporterFactory* factory);
48  static void unregisterFileImporter(RFileImporterFactory* factory);
49 
50  static RFileImporter* getFileImporter(
51  const QString& fileName,
52  const QString& nameFilter,
53  RDocument& document,
54  RMessageHandler* messageHandler = NULL,
55  RProgressHandler* progressHandler = NULL
56  );
57 
58  static QStringList getFilterStrings();
59 
60  static bool hasFileImporter(const QString& fileName, const QString& nameFilter);
61 
65  static QStringList getFilterExtensions();
66 
70  static QStringList getFilterExtensionPatterns();
71 
72 private:
73  static QList<RFileImporterFactory*> factories;
74 };
75 
77 
78 #endif