ctkDICOMAppWidget.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 __ctkDICOMAppWidget_h
  15. #define __ctkDICOMAppWidget_h
  16. // Qt includes
  17. #include <QMainWindow>
  18. #include "ctkDICOMWidgetsExport.h"
  19. class QModelIndex;
  20. class ctkDICOMAppWidgetPrivate;
  21. class ctkDICOMThumbnailWidget;
  22. class CTK_DICOM_WIDGETS_EXPORT ctkDICOMAppWidget : public QWidget
  23. {
  24. Q_OBJECT
  25. Q_PROPERTY(QString databaseDirectory READ databaseDirectory WRITE setDatabaseDirectory)
  26. public:
  27. typedef QWidget Superclass;
  28. explicit ctkDICOMAppWidget(QWidget* parent=0);
  29. virtual ~ctkDICOMAppWidget();
  30. QString databaseDirectory() const;
  31. public slots:
  32. void setDatabaseDirectory(const QString& directory);
  33. void onAddToDatabase();
  34. void onDICOMModelSelected(const QModelIndex& index);
  35. void onThumbnailSelected(const ctkDICOMThumbnailWidget& widget);
  36. void openImportDialog();
  37. void openExportDialog();
  38. void openQueryDialog();
  39. signals:
  40. /// Emited when directory is changed
  41. void databaseDirectoryChanged(const QString&);
  42. protected:
  43. QScopedPointer<ctkDICOMAppWidgetPrivate> d_ptr;
  44. protected slots:
  45. void onImportDirectory(QString directory);
  46. private:
  47. Q_DECLARE_PRIVATE(ctkDICOMAppWidget);
  48. Q_DISABLE_COPY(ctkDICOMAppWidget);
  49. };
  50. #endif