#ifndef QGPYTHONSANDBOX_H
#define QGPYTHONSANDBOX_H

#include <QObject>

class QgPythonInterface;
class QgPythonWidgets;

class QWidget;
class QDialog;

class QgPythonSandbox : public QObject
{
    Q_OBJECT


public:
    explicit QgPythonSandbox(QObject *parent = 0);

    static void setPythonVersion(const QString&);

    static void setPythonDll(const QString& name);

    static void setPythonHome(const QString& home, bool precedence=true);
    static void setPythonLib(const QString& home, bool precedence=true);
    static void addPythonPath(const QString& path);

    static void loadSettings(const QString& file=QString());

    static void enable(bool ena);
    static bool isEnabled();

    static bool initialize();

    QgPythonInterface* pythonInterface();
    QgPythonWidgets* pyhtonStdWidgets();

    //Some useful shortcut to Python interface and widgets
    QWidget* createConsoleWidget(QWidget* parent=0);
    QDialog* createEditDialog(QWidget* parent=0);

    bool createModule(const QString& module_name, const QString& file=QString());
    bool createAppModule(const QString& module_name, const QString& file=QString());

    void addObject(const QString& name, QObject* obj); //Add to AppModule
    void addAppObject(const QString& name, QObject* obj); //Add to AppModule

    void evalScript(const QString& script);
    void evalFile(const QString& file);

signals:

public slots:
};

#endif // QGPYTHONSANDBOX_H
