fw4spl
PatientEditor.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 #ifndef __UIMEDDATAQT_WIDGET_PATIENTEDITOR_HPP__
8 #define __UIMEDDATAQT_WIDGET_PATIENTEDITOR_HPP__
9 
10 #include "uiMedDataQt/config.hpp"
11 
12 #include <fwCore/macros.hpp>
13 
14 #include <QPointer>
15 #include <QWidget>
16 
17 class QLineEdit;
18 class QComboBox;
19 
20 namespace fwMedData
21 {
22 class Series;
23 class Patient;
24 }
25 
26 namespace uiMedDataQt
27 {
28 namespace widget
29 {
30 
34 class UIMEDDATAQT_CLASS_API PatientEditor : public QWidget
35 {
36 Q_OBJECT
37 
38 public:
39 
41  UIMEDDATAQT_API PatientEditor(QWidget* parent = 0);
42 
44  UIMEDDATAQT_API ~PatientEditor();
45 
47  UIMEDDATAQT_API void setSeries(SPTR(::fwMedData::Series) series);
48 
50  UIMEDDATAQT_API SPTR(::fwMedData::Patient) getPatient() const;
51 
53  UIMEDDATAQT_API bool isValid() const;
54 
55 protected Q_SLOTS:
56  void onNameChanged(const QString&);
57  void onBirthChanged(const QString&);
58 
59 protected:
60 
61  SPTR(::fwMedData::Series) m_series;
62 
63  QPointer< QLineEdit > m_txtName;
64  QPointer< QLineEdit > m_txtBirthdate;
65  QPointer< QComboBox > m_cbSex;
66 
67  QPalette m_paletteName;
68  QPalette m_paletteBirthdate;
69 };
70 
71 } // namespace widget
72 } // namespace uiMedDataQt
73 
74 #endif // __UIMEDDATAQT_WIDGET_PATIENTEDITOR_HPP__
75 
The namespace uiMedDataQt contains editors for medical data.
#define SPTR(_cls_)
This class contains helper to generate Medical Data (SeriesDB, ImageSeries, ...). ...
Widget to edit fwMedData::Patient information.
Namespace containing medical data.
This file defines fwCore base macros.