Slicer  5.1
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 // Slicer includes
22 
23 #include "qSlicerSubjectHierarchyModuleWidgetsExport.h"
24 
25 class QAction;
26 
27 // NOTE:
28 //
29 // For decorators it is assumed that the methods will never be called
30 // with the self argument as nullptr. The self argument is the first argument
31 // for non-static methods.
32 //
33 
35 {
36  Q_OBJECT
37 public:
38 
40  {
41  //PythonQt::self()->registerClass(&qSlicerSubjectHierarchyPluginHandler::staticMetaObject);
42  // Note: Use registerCPPClassForPythonQt to register pure Cpp classes
43  }
44 
45 public slots:
46 
47  //----------------------------------------------------------------------------
48  // qSlicerSubjectHierarchyPluginHandler
49 
50  //----------------------------------------------------------------------------
51  // static methods
52 
53  //----------------------------------------------------------------------------
55  {
57  }
58 
59  void static_qSlicerSubjectHierarchyAbstractPlugin_setActionPosition(QAction* action, int section, int weight = 0, double weightAdjustment = 0.0)
60  {
61  qSlicerSubjectHierarchyAbstractPlugin::setActionPosition(action, section, weight, weightAdjustment);
62  }
63 
64  //----------------------------------------------------------------------------
65  // instance methods
66 
67  //----------------------------------------------------------------------------
69  PythonQtPassOwnershipToCPP<qSlicerSubjectHierarchyAbstractPlugin*> plugin)
70  {
71  return handler->registerPlugin(plugin);
72  }
73 };
74 
75 //-----------------------------------------------------------------------------
77 {
78  PythonQt::self()->addDecorators(new qSlicerSubjectHierarchyModuleWidgetsPythonQtDecorators);
79 }
80 
81 #endif
bool registerPlugin(qSlicerSubjectHierarchyPluginHandler *handler, PythonQtPassOwnershipToCPP< qSlicerSubjectHierarchyAbstractPlugin *> plugin)
static Q_INVOKABLE void setActionPosition(QAction *action, int section, int weight=0, double weightAdjustment=0.0)
void static_qSlicerSubjectHierarchyAbstractPlugin_setActionPosition(QAction *action, int section, int weight=0, double weightAdjustment=0.0)
Q_INVOKABLE bool registerPlugin(qSlicerSubjectHierarchyAbstractPlugin *plugin)
static Q_INVOKABLE qSlicerSubjectHierarchyPluginHandler * instance()
Singleton class managing Subject Hierarchy plugins.