ctkSimplePythonQtDecorators.h 1015 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #ifndef __ctkSimplePythonQtDecorators_h
  2. #define __ctkSimplePythonQtDecorators_h
  3. // CTK includes
  4. #include "ctkSimplePythonShellConfigure.h" // For CTK_WRAP_PYTHONQT_LIGHT
  5. #include <ctkAbstractPythonManager.h>
  6. #ifdef CTK_WRAP_PYTHONQT_LIGHT
  7. # include <ctkCorePythonQtDecorators.h>
  8. # include <ctkWidgetsPythonQtDecorators.h>
  9. #endif
  10. // PythonQt includes
  11. #include <PythonQt.h>
  12. // NOTE:
  13. //
  14. // For decorators it is assumed that the methods will never be called
  15. // with the self argument as NULL. The self argument is the first argument
  16. // for non-static methods.
  17. //
  18. class ctkSimplePythonQtDecorators : public QObject
  19. {
  20. Q_OBJECT
  21. public:
  22. ctkSimplePythonQtDecorators(ctkAbstractPythonManager* pythonManager)
  23. {
  24. Q_ASSERT(pythonManager);
  25. #ifdef CTK_WRAP_PYTHONQT_LIGHT
  26. pythonManager->registerPythonQtDecorator(new ctkCorePythonQtDecorators);
  27. pythonManager->registerPythonQtDecorator(new ctkWidgetsPythonQtDecorators);
  28. #else
  29. Q_UNUSED(pythonManager);
  30. #endif
  31. }
  32. public slots:
  33. };
  34. #endif