|
Slicer 4.2
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
|
00001 /*============================================================================== 00002 00003 Program: 3D Slicer 00004 00005 Copyright (c) Kitware Inc. 00006 00007 See COPYRIGHT.txt 00008 or http://www.slicer.org/copyright/copyright.txt for details. 00009 00010 Unless required by applicable law or agreed to in writing, software 00011 distributed under the License is distributed on an "AS IS" BASIS, 00012 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 00013 See the License for the specific language governing permissions and 00014 limitations under the License. 00015 00016 This file was originally developed by Jean-Christophe Fillion-Robin, Kitware Inc. 00017 and was partially funded by NIH grant 3P41RR013218-12S1 00018 00019 ==============================================================================*/ 00020 00021 #ifndef __qSlicerScriptedLoadableModuleWidget_h 00022 #define __qSlicerScriptedLoadableModuleWidget_h 00023 00024 // SlicerQt includes 00025 #include "qSlicerAbstractModuleWidget.h" 00026 00027 #include "qSlicerBaseQTGUIExport.h" 00028 00029 // Forward Declare PyObject* 00030 #ifndef PyObject_HEAD 00031 struct _object; 00032 typedef _object PyObject; 00033 #endif 00034 class qSlicerScriptedLoadableModuleWidgetPrivate; 00035 00036 class Q_SLICER_BASE_QTGUI_EXPORT qSlicerScriptedLoadableModuleWidget 00037 :public qSlicerAbstractModuleWidget 00038 { 00039 Q_OBJECT 00040 Q_PROPERTY(QString moduleName READ moduleName) 00041 public: 00042 typedef qSlicerAbstractModuleWidget Superclass; 00043 typedef qSlicerScriptedLoadableModuleWidgetPrivate Pimpl; 00044 qSlicerScriptedLoadableModuleWidget(QWidget * parentWidget=0); 00045 virtual ~qSlicerScriptedLoadableModuleWidget(); 00046 00047 QString pythonSource()const; 00048 bool setPythonSource(const QString& newPythonSource, const QString& className = QLatin1String("")); 00049 00051 Q_INVOKABLE PyObject* self() const; 00052 00053 virtual void enter(); 00054 virtual void exit(); 00055 00056 protected: 00057 virtual void setup(); 00058 00059 protected: 00060 QScopedPointer<qSlicerScriptedLoadableModuleWidgetPrivate> d_ptr; 00061 00062 private: 00063 Q_DECLARE_PRIVATE(qSlicerScriptedLoadableModuleWidget); 00064 Q_DISABLE_COPY(qSlicerScriptedLoadableModuleWidget); 00065 }; 00066 00067 #endif
1.7.4