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