ctkWidgetsPythonQtDecorators.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*=auto=========================================================================
  2. Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH)
  3. All Rights Reserved.
  4. See Doc/copyright/copyright.txt
  5. or http://www.slicer.org/copyright/copyright.txt for details.
  6. Program: 3D Slicer
  7. =========================================================================auto=*/
  8. #ifndef __ctkWidgetsPythonQtDecorators_h
  9. #define __ctkWidgetsPythonQtDecorators_h
  10. // Qt includes
  11. #include <QObject>
  12. // PythonQt includes
  13. #include <PythonQt.h>
  14. // CTK includes
  15. #include <ctkWorkflowWidgetStep.h>
  16. #include "ctkWidgetsExport.h"
  17. // NOTE:
  18. //
  19. // For decorators it is assumed that the methods will never be called
  20. // with the self argument as NULL. The self argument is the first argument
  21. // for non-static methods.
  22. //
  23. class CTK_WIDGETS_EXPORT ctkWidgetsPythonQtDecorators : public QObject
  24. {
  25. Q_OBJECT
  26. public:
  27. ctkWidgetsPythonQtDecorators()
  28. {
  29. PythonQt::self()->addParentClass("ctkWorkflowWidgetStep", "ctkWorkflowStep",
  30. PythonQtUpcastingOffset<ctkWorkflowWidgetStep,ctkWorkflowStep>());
  31. }
  32. public slots:
  33. bool hasCreateUserInterfaceCommand(ctkWorkflowWidgetStep* step)const
  34. {
  35. return step->hasCreateUserInterfaceCommand();
  36. }
  37. void setHasCreateUserInterfaceCommand(
  38. ctkWorkflowWidgetStep* step, bool newHasCreateUserInterfaceCommand)
  39. {
  40. step->setHasCreateUserInterfaceCommand(newHasCreateUserInterfaceCommand);
  41. }
  42. bool hasShowUserInterfaceCommand(ctkWorkflowWidgetStep* step)const
  43. {
  44. return step->hasShowUserInterfaceCommand();
  45. }
  46. void setHasShowUserInterfaceCommand(
  47. ctkWorkflowWidgetStep* step, bool newHasShowUserInterfaceCommand)
  48. {
  49. step->setHasShowUserInterfaceCommand(newHasShowUserInterfaceCommand);
  50. }
  51. };
  52. #endif