add prototype wrapping of the qt sequence browser
[mussa.git] / py / qt.cpp
diff --git a/py/qt.cpp b/py/qt.cpp
new file mode 100644 (file)
index 0000000..d7faaac
--- /dev/null
+++ b/py/qt.cpp
@@ -0,0 +1,33 @@
+#include <boost/python.hpp>
+#include <boost/utility.hpp>
+
+namespace py = boost::python;
+
+
+#include "QtGui/QWidget"
+#include "QtGui/QApplication"
+
+
+static char *cstub[] = {  "stub"  };
+char **stub = cstub;
+int one = 1;
+
+struct QApplicationStub : public QApplication {
+  QApplicationStub() : QApplication(one, (char **)stub) {
+  }
+};
+
+void export_qt()
+{
+
+  py::class_<QWidget, boost::noncopyable>("QWidget", py::init<QWidget *, Qt::WindowFlags>())
+  ;
+
+  py::class_<QApplicationStub, boost::noncopyable>(
+      "QApplication", 
+      py::init<>()
+      )
+    .def("execloop", &QApplication::exec)
+    .staticmethod("execloop")
+  ;
+}