File: PythonPlugin.h

package info (click to toggle)
juffed 0.10-89-g3690b60-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,160 kB
  • sloc: cpp: 21,060; ansic: 446; xml: 329; sh: 68; makefile: 16
file content (45 lines) | stat: -rw-r--r-- 930 bytes parent folder | download | duplicates (5)
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
45
#ifndef __JUFFED_PYTHON_PLUGIN_H__
#define __JUFFED_PYTHON_PLUGIN_H__

#include <Python.h>

#include <QObject>

#include "JuffPlugin.h"

class PythonPlugin : public QObject, public JuffPlugin {
Q_OBJECT
Q_INTERFACES(JuffPlugin)

public:
	PythonPlugin();
	virtual ~PythonPlugin();
	void init();

	QString name() const;
	QString title() const;
	QString description() const;
	QString targetEngine() const;

	Juff::ActionList mainMenuActions(Juff::MenuID) const;

public slots:
	void onDocOpened(Juff::Document* doc, Juff::PanelIndex);
	void onDocActivated(Juff::Document*);
	void onDocClosed(Juff::Document* doc);
	void onDocRenamed(Juff::Document* doc, const QString& oldName);
	void onDocModified(Juff::Document* doc);

//	void shoot();
	void onAction();
//	void sortDocument();
//	void openSettings();

private:
	PyObject* getFunction(const char*) const;
	Juff::ActionList getActions() const;
	
	PyObject* globalDict_;
};

#endif