ctkSimplePythonManager.cpp 1.6 KB

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