ctkSimplePythonManager.cpp 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // CTK includes
  2. #include "ctkSimplePythonManager.h"
  3. #include "ctkSimplePythonQtDecorators.h"
  4. // PythonQT includes
  5. #include <PythonQt.h>
  6. // PythonQt wrapper initialization methods
  7. void PythonQt_init_org_commontk_CTKCore(PyObject*);
  8. void PythonQt_init_org_commontk_CTKWidgets(PyObject*);
  9. //-----------------------------------------------------------------------------
  10. ctkSimplePythonManager::ctkSimplePythonManager(QObject* _parent) : Superclass(_parent)
  11. {
  12. }
  13. //-----------------------------------------------------------------------------
  14. ctkSimplePythonManager::~ctkSimplePythonManager()
  15. {
  16. }
  17. //-----------------------------------------------------------------------------
  18. QStringList ctkSimplePythonManager::pythonPaths()
  19. {
  20. QStringList paths;
  21. return paths;
  22. }
  23. //-----------------------------------------------------------------------------
  24. void ctkSimplePythonManager::preInitialization()
  25. {
  26. Superclass::preInitialization();
  27. // Initialize wrappers
  28. PythonQt_init_org_commontk_CTKCore(0);
  29. PythonQt_init_org_commontk_CTKWidgets(0);
  30. // Register decorators
  31. this->registerPythonQtDecorator(new ctkSimplePythonQtDecorators(this));
  32. // Add object to python interpreter context
  33. //this->addObjectToPythonMain("_qSlicerCoreApplicationInstance", app);
  34. // Evaluate application script
  35. //this->executeFile(app->slicerHome() + "/bin/Python/slicer/slicerqt.py");
  36. }