fw4spl
SeriesEditor.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_SERIESEDITOR_HPP__
8 #define __UIMEDDATAQT_WIDGET_SERIESEDITOR_HPP__
9 
10 #include "uiMedDataQt/config.hpp"
11 
12 #include <fwCore/macros.hpp>
13 
14 #include <QListWidget>
15 #include <QPalette>
16 #include <QPointer>
17 #include <QWidget>
18 
19 class QLineEdit;
20 class QPushButton;
21 
22 namespace fwMedData
23 {
24 class Series;
25 }
26 
27 namespace uiMedDataQt
28 {
29 namespace widget
30 {
31 
35 class ListInput : public QWidget
36 {
37 Q_OBJECT
38 
39 public:
43  ListInput();
44  ~ListInput()
45  {
46  }
49  QListWidget* getListWidget()
51  {
52  return m_performingPhysiciansName;
53  }
54 
55 protected Q_SLOTS:
56 
58  void onAddPhysician();
59 
61  void onRemovePhysician();
62 
64  void onInputChanged(const QString&);
65 
67  void onSelectionChanged();
68 
69 protected:
71  QPointer<QLineEdit> m_physicianInput;
72 
76  QPointer<QPushButton> m_addPhysicianButton;
77  QPointer<QPushButton> m_removePhysicianButton;
80  QPointer<QListWidget> m_performingPhysiciansName;
82 };
83 
87 class UIMEDDATAQT_CLASS_API SeriesEditor : public QWidget
88 {
89 Q_OBJECT
90 
91 public:
92 
96  UIMEDDATAQT_API SeriesEditor(QWidget* parent = 0);
97  UIMEDDATAQT_API ~SeriesEditor();
100  UIMEDDATAQT_API void setSeries(SPTR(::fwMedData::Series) series);
102 
104  UIMEDDATAQT_API SPTR(::fwMedData::Series) getSeries();
105 
107  UIMEDDATAQT_API bool isValid() const;
108 
109 protected Q_SLOTS:
110 
112  void onDateChanged(const QString&);
113 
115  void onTimeChanged(const QString&);
116 
118  void onDescChanged(const QString&);
119 
120 protected:
121 
123  SPTR(::fwMedData::Series) m_series;
124 
128  QPointer<QLineEdit> m_modality;
129  QPointer<QLineEdit> m_date;
130  QPointer<QLineEdit> m_time;
131  QPointer<QLineEdit> m_description;
132  QPointer<QLineEdit> m_physicianInput;
133  QPointer<QPushButton> m_addPhysicianButton;
134  QPointer<QPushButton> m_removePhysicianButton;
135  QPointer<ListInput> m_physicians;
138  QPalette m_palette;
140 };
141 
142 } // namespace widget
143 } // namespace uiMedDataQt
144 
145 #endif // __UIMEDDATAQT_WIDGET_SERIESEDITOR_HPP__
146 
The namespace uiMedDataQt contains editors for medical data.
#define SPTR(_cls_)
Widget to edit fwMedData::Series information.
Simple list widget where items can be added/removed from an input widget with add/remove buttons...
Namespace containing medical data.
This file defines fwCore base macros.
QPointer< QLineEdit > m_physicianInput
Input widget to edit items.