Slicer  4.8
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
qSlicerSubjectHierarchyModuleWidgetsPythonQtDecorators.h
Go to the documentation of this file.
1 /*=auto=========================================================================
2 
3  Portions (c) Copyright 2005 Brigham and Women's Hospital (BWH)
4  All Rights Reserved.
5 
6  See COPYRIGHT.txt
7  or http://www.slicer.org/copyright/copyright.txt for details.
8 
9  Program: 3D Slicer
10 
11 =========================================================================auto=*/
12 
13 #ifndef __qSlicerSubjectHierarchyModuleWidgetsPythonQtDecorators_h
14 #define __qSlicerSubjectHierarchyModuleWidgetsPythonQtDecorators_h
15 
16 // PythonQt includes
17 #include <PythonQt.h>
18 
19 // SlicerQt includes
21 
22 #include "qSlicerSubjectHierarchyModuleWidgetsExport.h"
23 
24 // NOTE:
25 //
26 // For decorators it is assumed that the methods will never be called
27 // with the self argument as NULL. The self argument is the first argument
28 // for non-static methods.
29 //
30 
32 {
33  Q_OBJECT
34 public:
35 
37  {
38  //PythonQt::self()->registerClass(&qSlicerSubjectHierarchyPluginHandler::staticMetaObject);
39  // Note: Use registerCPPClassForPythonQt to register pure Cpp classes
40  }
41 
42 public slots:
43 
44  //----------------------------------------------------------------------------
45  // qSlicerSubjectHierarchyPluginHandler
46 
47  //----------------------------------------------------------------------------
48  // static methods
49 
50  //----------------------------------------------------------------------------
52  {
54  }
55 
56  //----------------------------------------------------------------------------
57  // instance methods
58 
59  //----------------------------------------------------------------------------
61  PythonQtPassOwnershipToCPP<qSlicerSubjectHierarchyAbstractPlugin*> plugin)
62  {
63  return handler->registerPlugin(plugin);
64  }
65 };
66 
67 //-----------------------------------------------------------------------------
69 {
70  PythonQt::self()->addDecorators(new qSlicerSubjectHierarchyModuleWidgetsPythonQtDecorators);
71 }
72 
73 #endif
bool registerPlugin(qSlicerSubjectHierarchyPluginHandler *handler, PythonQtPassOwnershipToCPP< qSlicerSubjectHierarchyAbstractPlugin *> plugin)
Q_INVOKABLE bool registerPlugin(qSlicerSubjectHierarchyAbstractPlugin *plugin)
static Q_INVOKABLE qSlicerSubjectHierarchyPluginHandler * instance()
Singleton class managing Subject Hierarchy plugins.