add prototype wrapping of the qt sequence browser
[mussa.git] / py / qt.cpp
1 #include <boost/python.hpp>
2 #include <boost/utility.hpp>
3
4 namespace py = boost::python;
5
6
7 #include "QtGui/QWidget"
8 #include "QtGui/QApplication"
9
10
11 static char *cstub[] = {  "stub"  };
12 char **stub = cstub;
13 int one = 1;
14
15 struct QApplicationStub : public QApplication {
16   QApplicationStub() : QApplication(one, (char **)stub) {
17   }
18 };
19
20 void export_qt()
21 {
22
23   py::class_<QWidget, boost::noncopyable>("QWidget", py::init<QWidget *, Qt::WindowFlags>())
24   ;
25
26   py::class_<QApplicationStub, boost::noncopyable>(
27       "QApplication", 
28       py::init<>()
29       )
30     .def("execloop", &QApplication::exec)
31     .staticmethod("execloop")
32   ;
33 }