ctkDICOMUtil.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Brigham & Women's Hospital
  4. Licensed under the Apache License, Version 2.0 (the "License");
  5. you may not use this file except in compliance with the License.
  6. You may obtain a copy of the License at
  7. http://www.apache.org/licenses/LICENSE-2.0.txt
  8. Unless required by applicable law or agreed to in writing, software
  9. distributed under the License is distributed on an "AS IS" BASIS,
  10. WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. See the License for the specific language governing permissions and
  12. limitations under the License.
  13. =========================================================================*/
  14. #ifndef __ctkDICOMUtil_h
  15. #define __ctkDICOMUtil_h
  16. // Qt includes
  17. #include <QObject>
  18. #include <QString>
  19. // CTK includes
  20. #include "ctkDICOMCoreExport.h"
  21. #include "ctkDICOMDatabase.h"
  22. class ctkDICOMUtilPrivate;
  23. class CTK_DICOM_CORE_EXPORT ctkDICOMUtil : public QObject
  24. {
  25. Q_OBJECT
  26. Q_FLAGS(LogLevel)
  27. public:
  28. enum LogLevel
  29. {
  30. None = 0x0,
  31. Unknown = 0x1,
  32. Status = 0x2,
  33. Trace = 0x4,
  34. Debug = 0x8,
  35. Info = 0x10,
  36. Warning = 0x20,
  37. Error = 0x40,
  38. Critical = 0x80,
  39. Fatal = 0x100
  40. };
  41. Q_DECLARE_FLAGS(LogLevels, LogLevel)
  42. Q_ENUMS(LogLevel)
  43. explicit ctkDICOMUtil(QObject* parent = 0);
  44. virtual ~ctkDICOMUtil();
  45. Q_INVOKABLE void setDICOMLogLevel(LogLevel level);
  46. Q_INVOKABLE LogLevel getDICOMLogLevel() const;
  47. Q_INVOKABLE QString DICOMLogLevel() const;
  48. protected:
  49. QScopedPointer<ctkDICOMUtilPrivate> d_ptr;
  50. private:
  51. Q_DECLARE_PRIVATE(ctkDICOMUtil);
  52. Q_DISABLE_COPY(ctkDICOMUtil);
  53. };
  54. #endif