ctkDICOMQueryRetrieveWidget.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  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.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 __ctkDICOMQueryRetrieveWidget_h
  15. #define __ctkDICOMQueryRetrieveWidget_h
  16. #include "ctkDICOMWidgetsExport.h"
  17. // Qt includes
  18. #include <QWidget>
  19. #include <QItemSelection>
  20. // CTK includes
  21. #include <ctkDICOMDatabase.h>
  22. class ctkDICOMQueryRetrieveWidgetPrivate;
  23. /// \ingroup DICOM_Widgets
  24. class CTK_DICOM_WIDGETS_EXPORT ctkDICOMQueryRetrieveWidget : public QWidget
  25. {
  26. Q_OBJECT;
  27. public:
  28. typedef QWidget Superclass;
  29. explicit ctkDICOMQueryRetrieveWidget(QWidget* parent=0);
  30. virtual ~ctkDICOMQueryRetrieveWidget();
  31. QSharedPointer<ctkDICOMDatabase> retrieveDatabase()const;
  32. public Q_SLOTS:
  33. void setRetrieveDatabase(QSharedPointer<ctkDICOMDatabase> retrieveDatabase);
  34. void query();
  35. void retrieve();
  36. void cancel();
  37. void onSelectionChanged(const QItemSelection &, const QItemSelection &);
  38. Q_SIGNALS:
  39. /// Signal emit when studies have been retrieved (user clicked on the
  40. /// "Retrieve" button) or when the widget is cancelled (user clicked on the
  41. /// "Cancel" button).
  42. void studiesRetrieved(QStringList);
  43. /// Signal to emit when cancel button pressed (after studiesRetrieved is emitted)
  44. void canceled();
  45. protected Q_SLOTS:
  46. void onQueryProgressChanged(int value);
  47. void updateRetrieveProgress(int value);
  48. protected:
  49. QScopedPointer<ctkDICOMQueryRetrieveWidgetPrivate> d_ptr;
  50. private:
  51. Q_DECLARE_PRIVATE(ctkDICOMQueryRetrieveWidget);
  52. Q_DISABLE_COPY(ctkDICOMQueryRetrieveWidget);
  53. };
  54. #endif