#ifndef QGPYTHONINTERFACE_H
#define QGPYTHONINTERFACE_H

class QString;
class QObject;
class QWidget;
class QDialog;

class PythonQtObjectPtr;

class QgPythonWidgets
{
public:
    virtual ~QgPythonWidgets() {}

    virtual QWidget* createConsole(QWidget* parent=0)=0;
    virtual QDialog* createEditDialog(QWidget* parent=0)=0;
};

class QgPythonInterface
{
public:
    virtual ~QgPythonInterface() {}

    virtual QgPythonWidgets* pythonWidgets()=0;

    virtual PythonQtObjectPtr* mainModule()=0;
    virtual PythonQtObjectPtr* createModule(const QString& module_name)=0;
    virtual PythonQtObjectPtr* createModuleFromScript(const QString& name, const QString& script)=0;
    virtual PythonQtObjectPtr* createModuleFromFile(const QString& name, const QString& file)=0;

    virtual bool addObject(const QString& name, QObject*, PythonQtObjectPtr* module)=0;

    virtual bool evalScript(const QString& script, PythonQtObjectPtr* module)=0;
    virtual bool evalFile(const QString& file, PythonQtObjectPtr* module)=0;

};

#define QGPYTHON_LIB_INITIALIZE_FUNCTION_ QgPythonLib_Initialize
#define QGPYTHON_LIB_INITIALIZE_FUNCTION_NAME "QgPythonLib_Initialize"

#define QGPYHON_LIB_INSTANCE_FUNCTION_ QgPythonLib_Instance

#define QGPYHON_LIB_INSTANCE_FUNCTION_NAME "QgPythonLib_Instance"

class QgPythonLibInitFlags
{
  enum
  {
      None=0
  };
};

typedef const char* (*QgPythonLib_Initialize_function_t)(unsigned int init_flags);

typedef QgPythonInterface*(*QgPythonLib_Instance_function_t)(void);

#endif // QGPYTHONINTERFACE_H
