ctkDICOMDatasetViewerWidget.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*=========================================================================
  2. Library: CTK
  3. Copyright (c) Kitware Inc.
  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.commontk.org/LICENSE
  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 __ctkDICOMDatasetViewerWidget_h
  15. #define __ctkDICOMDatasetViewerWidget_h
  16. /// Qt includes
  17. #include <QWidget>
  18. #include <QImage>
  19. /// CTK includes
  20. #include "ctkQImageViewerWidget.h"
  21. #include "ctkPimpl.h"
  22. #include "ctkWidgetsExport.h"
  23. class ctkDICOMDatasetViewerWidgetPrivate;
  24. ///
  25. /// ctkDICOMDatasetViewerWidget is the base class of image viewer widgets.
  26. class CTK_WIDGETS_EXPORT ctkDICOMDatasetViewerWidget
  27. : public ctkQImageViewerWidget
  28. {
  29. Q_OBJECT
  30. public:
  31. /// Superclass typedef
  32. typedef ctkQImageViewerWidget Superclass;
  33. /// Constructor
  34. ctkDICOMDatasetViewerWidget( QWidget * parent = 0 );
  35. /// Destructor
  36. virtual ~ctkDICOMDatasetViewerWidget( void );
  37. public slots:
  38. //void add( const QImage * image );
  39. void mousePressEvent( QMouseEvent * event );
  40. void mouseMoveEvent( QMouseEvent * event );
  41. virtual void update( bool zoomChanged=false, bool sizeChanged=false );
  42. protected:
  43. /// protected constructor to derive private implementations
  44. ctkDICOMDatasetViewerWidget( ctkDICOMDatasetViewerWidgetPrivate & pvt,
  45. QWidget* parent=0 );
  46. private:
  47. QScopedPointer< ctkDICOMDatasetViewerWidgetPrivate > d_ptr;
  48. Q_DECLARE_PRIVATE( ctkDICOMDatasetViewerWidget );
  49. Q_DISABLE_COPY( ctkDICOMDatasetViewerWidget );
  50. };
  51. #endif