CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkDICOMCorePythonQtDecorators.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Library: CTK
4 
5  Copyright (c) Kitware Inc.
6 
7  Licensed under the Apache License, Version 2.0 (the "License");
8  you may not use this file except in compliance with the License.
9  You may obtain a copy of the License at
10 
11  http://www.apache.org/licenses/LICENSE-2.0.txt
12 
13  Unless required by applicable law or agreed to in writing, software
14  distributed under the License is distributed on an "AS IS" BASIS,
15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  See the License for the specific language governing permissions and
17  limitations under the License.
18 
19 =========================================================================*/
20 
21 #ifndef __ctkDICOMCorePythonQtDecorators_h
22 #define __ctkDICOMCorePythonQtDecorators_h
23 
24 // PythonQt includes
25 #include <PythonQt.h>
26 
27 // CTK includes
28 #include <ctkDICOMUtil.h>
29 
30 // NOTE:
31 //
32 // For decorators it is assumed that the methods will never be called
33 // with the self argument as NULL. The self argument is the first argument
34 // for non-static methods.
35 //
36 
38 class ctkDICOMCorePythonQtDecorators : public QObject
39 {
40  Q_OBJECT
41 public:
42 
44  {
45  }
46 
47 public Q_SLOTS:
48 
49  //
50  // None yet - refer to other libs for examples
51  //
52 
53 };
54 
55 //-----------------------------------------------------------------------------
56 class PythonQtWrapper_CTKDICOMCore : public QObject
57 {
58  Q_OBJECT
59 
60 public Q_SLOTS:
62  {
63  return ctk::dicomLogLevel();
64  }
65 
67  {
68  ctk::setDICOMLogLevel(level);
69  }
70 
72  {
74  }
75 };
76 
77 //-----------------------------------------------------------------------------
79 {
80  PythonQt::self()->addDecorators(new ctkDICOMCorePythonQtDecorators);
81  PythonQt::self()->registerCPPClass("ctk", "", "CTKDICOMCore", PythonQtCreateObject<PythonQtWrapper_CTKDICOMCore>);
82 }
83 
84 #endif
PythonQtWrapper_CTKDICOMCore::static_ctk_dicomLogLevel
ctkErrorLogLevel::LogLevel static_ctk_dicomLogLevel()
Definition: ctkDICOMCorePythonQtDecorators.h:61
ctk::dicomLogLevelAsString
QString CTK_DICOM_CORE_EXPORT dicomLogLevelAsString()
ctk::setDICOMLogLevel
void CTK_DICOM_CORE_EXPORT setDICOMLogLevel(ctkErrorLogLevel::LogLevel level)
ctkErrorLogLevel::LogLevel
LogLevel
Definition: ctkErrorLogLevel.h:39
ctk::dicomLogLevel
ctkErrorLogLevel::LogLevel CTK_DICOM_CORE_EXPORT dicomLogLevel()
ctkDICOMUtil.h
PythonQtWrapper_CTKDICOMCore::static_ctk_dicomLogLevelAsString
QString static_ctk_dicomLogLevelAsString()
Definition: ctkDICOMCorePythonQtDecorators.h:71
ctkDICOMCorePythonQtDecorators
Definition: ctkDICOMCorePythonQtDecorators.h:38
PythonQtWrapper_CTKDICOMCore::static_ctk_setDICOMLogLevel
void static_ctk_setDICOMLogLevel(ctkErrorLogLevel::LogLevel level)
Definition: ctkDICOMCorePythonQtDecorators.h:66
ctkDICOMCorePythonQtDecorators::ctkDICOMCorePythonQtDecorators
ctkDICOMCorePythonQtDecorators()
Definition: ctkDICOMCorePythonQtDecorators.h:43
PythonQtWrapper_CTKDICOMCore
Definition: ctkDICOMCorePythonQtDecorators.h:56
initCTKDICOMCorePythonQtDecorators
void initCTKDICOMCorePythonQtDecorators()
Definition: ctkDICOMCorePythonQtDecorators.h:78