CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
ctkDICOMQueryRetrieveWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Library: CTK
4 
5  Copyright (c) Kitware Inc.
6 
7  Licensed under the Apache License, Version 2.0 (the "License");
8  you may not use this file except in compliance with the License.
9  You may obtain a copy of the License at
10 
11  http://www.apache.org/licenses/LICENSE-2.0.txt
12 
13  Unless required by applicable law or agreed to in writing, software
14  distributed under the License is distributed on an "AS IS" BASIS,
15  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  See the License for the specific language governing permissions and
17  limitations under the License.
18 
19 =========================================================================*/
20 
21 #ifndef __ctkDICOMQueryRetrieveWidget_h
22 #define __ctkDICOMQueryRetrieveWidget_h
23 
24 #include "ctkDICOMWidgetsExport.h"
25 
26 // Qt includes
27 #include <QWidget>
28 #include <QItemSelection>
29 #include <QMap>
30 #include <QVariant>
31 #include <QString>
32 
34 // CTK includes
35 #include <ctkDICOMDatabase.h>
36 
37 class ctkDICOMQueryRetrieveWidgetPrivate;
38 
40 class CTK_DICOM_WIDGETS_EXPORT ctkDICOMQueryRetrieveWidget : public QWidget
41 {
42 Q_OBJECT;
43 Q_PROPERTY(ctkDICOMTableManager* dicomTableManager READ dicomTableManager)
44 public:
45  typedef QWidget Superclass;
46  explicit ctkDICOMQueryRetrieveWidget(QWidget* parent=0);
48  QMap<QString,QVariant> getServerParameters();
49 
51 
52  QSharedPointer<ctkDICOMDatabase> retrieveDatabase()const;
53 
55  void useProgressDialog(bool enable);
56 
57 public Q_SLOTS:
58  void setRetrieveDatabase(QSharedPointer<ctkDICOMDatabase> retrieveDatabase);
59  void query();
60  void retrieve();
61  void cancel();
62 
63 Q_SIGNALS:
67  void studiesRetrieved(QStringList);
69  void canceled();
70 
71 protected Q_SLOTS:
72  void onQueryProgressChanged(int value);
73  void updateRetrieveProgress(int value);
74 
75 protected:
76  QScopedPointer<ctkDICOMQueryRetrieveWidgetPrivate> d_ptr;
77 
78 private:
79  Q_DECLARE_PRIVATE(ctkDICOMQueryRetrieveWidget);
80  Q_DISABLE_COPY(ctkDICOMQueryRetrieveWidget);
81 };
82 
83 #endif
QSharedPointer< ctkDICOMDatabase > retrieveDatabase() const
QMap< QString, QVariant > getServerParameters()
virtual ~ctkDICOMQueryRetrieveWidget()
void studiesRetrieved(QStringList)
QScopedPointer< ctkDICOMQueryRetrieveWidgetPrivate > d_ptr
void useProgressDialog(bool enable)
enable or disable ctk progress bars
void canceled()
Signal to emit when cancel button pressed (after studiesRetrieved is emitted)
ctkDICOMTableManager * dicomTableManager()
void updateRetrieveProgress(int value)
void onQueryProgressChanged(int value)
ctkDICOMQueryRetrieveWidget(QWidget *parent=0)
void setRetrieveDatabase(QSharedPointer< ctkDICOMDatabase > retrieveDatabase)