Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 45 lines (32 sloc) 0.862 kb
1ed6e63 George Talusan PluginInterface.h
gtalusan authored
1 #ifndef __PLUGIN_INTERFACE_H__
2 #define __PLUGIN_INTERFACE_H__
3
4 #include <QObject>
2247b93 George Talusan something helpful?
gtalusan authored
5 #include <QStringList>
1ed6e63 George Talusan PluginInterface.h
gtalusan authored
6
7 class ParserInterface : public QObject
8 {
9 Q_OBJECT
10
11 public:
12 virtual ~ParserInterface() { };
13
14 virtual void parse(const QString &localPath, const QString &filename) = 0;
15 };
16
17 class PluginInterface
18 {
19 public:
20 struct MenuItem {
21 QString label;
22 int key;
23 bool checked;
24 MenuItem(QString const& l = "", int k = 0, bool c = false): label(l), key(k), checked(c) {}
25 };
26 struct MenuGroup {
27 QString label;
28 QList<MenuItem> items;
29 };
30
31 virtual ~PluginInterface() {};
32
33 virtual QStringList mimeTypes() = 0;
2247b93 George Talusan something helpful?
gtalusan authored
34
35 virtual QStringList fileExtensions() { return QStringList(); };
1ed6e63 George Talusan PluginInterface.h
gtalusan authored
36
37 virtual QWidget *reader(QWidget *parent = 0) = 0;
38
39 virtual ParserInterface *parser() = 0;
40 };
41
42 Q_DECLARE_INTERFACE(PluginInterface, "com.shortcovers.nickel.PluginInterface")
43
44 #endif
Something went wrong with that request. Please try again.