Skip to content
This repository
branch: master
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 45 lines (32 sloc) 0.862 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
#ifndef __PLUGIN_INTERFACE_H__
#define __PLUGIN_INTERFACE_H__

#include <QObject>
#include <QStringList>

class ParserInterface : public QObject
{
Q_OBJECT

public:
virtual ~ParserInterface() { };

virtual void parse(const QString &localPath, const QString &filename) = 0;
};

class PluginInterface
{
public:
struct MenuItem {
QString label;
int key;
bool checked;
MenuItem(QString const& l = "", int k = 0, bool c = false): label(l), key(k), checked(c) {}
};
struct MenuGroup {
QString label;
QList<MenuItem> items;
};

virtual ~PluginInterface() {};

virtual QStringList mimeTypes() = 0;

virtual QStringList fileExtensions() { return QStringList(); };

virtual QWidget *reader(QWidget *parent = 0) = 0;

virtual ParserInterface *parser() = 0;
};

Q_DECLARE_INTERFACE(PluginInterface, "com.shortcovers.nickel.PluginInterface")

#endif
Something went wrong with that request. Please try again.