Back to index

scribus-ng  1.3.4.dfsg+svn20071115
scripter2_qtclass_qapplication.cpp
Go to the documentation of this file.
00001 /*
00002 For general Scribus (>=1.3.2) copyright and licensing information please refer
00003 to the COPYING file provided with the program. Following this notice may exist
00004 a copyright and/or license notice that predates the release of Scribus 1.3.2
00005 for which a new license (GPL+exception) is in place.
00006 */
00007 #include "cmdvar.h"
00008 
00009 #include <qapplication.h>
00010 
00011 //BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(QApplication_processEvents_overloads, QApplication::processEvents, 0, 1)
00012 
00013 void QApplication_processEvents(QApplication& app)
00014 {
00015        app.processEvents();
00016 }
00017 
00018 void QApplication_processEventsT(QApplication& app, int maxtime)
00019 {
00020        app.processEvents(maxtime);
00021 }
00022 
00023 void export_QApplication()
00024 {
00025        using namespace boost::python;
00026 
00027        class_<QApplication,boost::noncopyable>(
00028                      "QApplication",
00029                      "The base Qt application class",
00030                      no_init)
00031               //.def("exec", &QApplication::exec); // BAD PLAN to expose this
00032               //.def("processEvents", &QApplication::processEvents);
00033               .def("processEvents", &QApplication_processEvents)
00034               .def("processEventsT", &QApplication_processEventsT);
00035 
00036        scope().attr("qApp") = boost::ref(qApp);
00037 }