fw4spl
ioDicomWeb/include/ioDicomWeb/SQueryEditor.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "ioDicomWeb/config.hpp"
10 
11 #include <fwGui/editor/IEditor.hpp>
12 
13 #include <fwMedData/SeriesDB.hpp>
14 
15 #include <fwNetworkIO/http/ClientQt.hpp>
16 
17 #include <boost/filesystem/path.hpp>
18 
19 #include <QDateEdit>
20 #include <QLineEdit>
21 #include <QObject>
22 #include <QPointer>
23 #include <QPushButton>
24 #include <QWidget>
25 
26 namespace ioDicomWeb
27 {
28 
51 class IODICOMWEB_CLASS_API SQueryEditor : public QObject,
53 {
54 Q_OBJECT;
55 
56 public:
57 
59 
61  IODICOMWEB_API SQueryEditor() noexcept;
62 
64  IODICOMWEB_API virtual ~SQueryEditor() noexcept;
65 
66 protected:
67 
69  IODICOMWEB_API virtual void configuring() override;
70 
72  IODICOMWEB_API virtual void starting() override;
73 
75  IODICOMWEB_API virtual void stopping() override;
76 
78  IODICOMWEB_API void updating() override;
79 
80 private Q_SLOTS:
82  void queryPatientName();
83 
85  void queryStudyDate();
86 
87 private:
92  IODICOMWEB_API void displayErrorMessage(const std::string& message) const;
93 
98  void updateSeriesDB(::fwMedData::SeriesDB::ContainerType series);
99 
101  QPointer< QLineEdit > m_patientNameLineEdit;
102 
104  QPointer< QPushButton > m_patientNameQueryButton;
105 
107  QPointer< QDateEdit > m_beginStudyDateEdit;
108 
110  QPointer< QDateEdit > m_endStudyDateEdit;
111 
113  QPointer< QPushButton > m_studyDateQueryButton;
114 
116  ::fwNetworkIO::http::ClientQt m_clientQt;
117 
119  std::string getPreferenceKey(const std::string& key) const;
120 
122  std::string m_serverHostnameKey;
123 
125  std::string m_serverPortKey;
126 
128  std::string m_serverHostname;
129 
131  int m_serverPort;
132 
133 };
134 
135 } // namespace ioDicomWeb
Namespace containing medical data.
Defines the service interface managing the editor service for object.
Definition: IEditor.hpp:25
STL namespace.
This editor service is used to perform an HTTP query on a Pacs.
The namespace fwNetworkIO contains the primary methods to access network.
#define fwCoreServiceClassDefinitionsMacro(_classinfo_)
Generate common code for services classes.
ioDicomWeb contains services use to deal with PACS through HTTP.