Prechádzať zdrojové kódy

Extend ctkTransferFunction*Item for better pythonqt wrapping

Jean-Christophe Fillion-Robin 10 rokov pred
rodič
commit
012a9e89b8
1 zmenil súbory, kde vykonal 69 pridanie a 0 odobranie
  1. 69 0
      Libs/Widgets/ctkWidgetsPythonQtDecorators.h

+ 69 - 0
Libs/Widgets/ctkWidgetsPythonQtDecorators.h

@@ -26,6 +26,9 @@
 
 // CTK includes
 #include <ctkErrorLogModel.h>
+#include <ctkTransferFunctionBarsItem.h>
+#include <ctkTransferFunctionControlPointsItem.h>
+#include <ctkTransferFunctionGradientItem.h>
 #include <ctkWorkflowWidgetStep.h>
 
 // NOTE:
@@ -49,6 +52,8 @@ public:
 
 public Q_SLOTS:
 
+  // ctkWorkflowWidgetStep
+
   bool hasCreateUserInterfaceCommand(ctkWorkflowWidgetStep* step)const
     {
     return step->hasCreateUserInterfaceCommand();
@@ -77,6 +82,66 @@ public Q_SLOTS:
     {
     return ctkErrorLogLevel::logLevelAsString(logLevel);
     }
+
+  // ctkTransferFunctionBarsItem
+
+  ctkTransferFunctionBarsItem* new_ctkTransferFunctionBarsItem(QGraphicsItem* parent = 0)
+    {
+    return new ctkTransferFunctionBarsItem(parent);
+    }
+
+  ctkTransferFunctionBarsItem* new_ctkTransferFunctionBarsItem(
+      ctkTransferFunction* transferFunc,
+      QGraphicsItem* parent = 0)
+    {
+    return new ctkTransferFunctionBarsItem(transferFunc, parent);
+    }
+
+  void delete_ctkTransferFunctionBarsItem(ctkTransferFunctionBarsItem* obj)
+    {
+    delete obj;
+    }
+
+  // ctkTransferFunctionControlPointsItem
+
+  ctkTransferFunctionControlPointsItem* new_ctkTransferFunctionControlPointsItem(
+      QGraphicsItem* parent = 0)
+    {
+    return new ctkTransferFunctionControlPointsItem(parent);
+    }
+
+  ctkTransferFunctionControlPointsItem* new_ctkTransferFunctionControlPointsItem(
+      ctkTransferFunction* transferFunc,
+      QGraphicsItem* parent = 0)
+    {
+    return new ctkTransferFunctionControlPointsItem(transferFunc, parent);
+    }
+
+  void delete_ctkTransferFunctionControlPointsItem(ctkTransferFunctionControlPointsItem* obj)
+    {
+    delete obj;
+    }
+
+  // ctkTransferFunctionGradientItem
+
+  ctkTransferFunctionGradientItem* new_ctkTransferFunctionGradientItem(
+      QGraphicsItem* parent = 0)
+    {
+    return new ctkTransferFunctionGradientItem(parent);
+    }
+
+  ctkTransferFunctionGradientItem* new_ctkTransferFunctionGradientItem(
+      ctkTransferFunction* transferFunc,
+      QGraphicsItem* parent = 0)
+    {
+    return new ctkTransferFunctionGradientItem(transferFunc, parent);
+    }
+
+  void delete_ctkTransferFunctionGradientItem(ctkTransferFunctionGradientItem* obj)
+    {
+    delete obj;
+    }
+
 };
 
 //-----------------------------------------------------------------------------
@@ -88,6 +153,10 @@ void initCTKWidgetsPythonQtDecorators()
   //       so that the log level QFlags are exposed to python.
   PythonQt::self()->registerClass(&ctkErrorLogLevel::staticMetaObject, "CTKCore");
 
+  PythonQt::self()->registerClass(&ctkTransferFunctionBarsItem::staticMetaObject, "CTKWidgets");
+  PythonQt::self()->registerClass(&ctkTransferFunctionControlPointsItem::staticMetaObject, "CTKWidgets");
+  PythonQt::self()->registerClass(&ctkTransferFunctionGradientItem::staticMetaObject, "CTKWidgets");
+
   PythonQt::self()->addDecorators(new ctkWidgetsPythonQtDecorators);
 }