7 #ifndef __UIMEDDATAQT_WIDGET_SELECTOR_HPP__ 8 #define __UIMEDDATAQT_WIDGET_SELECTOR_HPP__ 10 #include "uiMedDataQt/config.hpp" 11 #include "uiMedDataQt/widget/SelectorModel.hpp" 13 #include <fwMedData/Series.hpp> 14 #include <fwMedData/Study.hpp> 16 #include <QModelIndex> 18 #include <QStandardItem> 19 #include <QStandardItemModel> 34 class UIMEDDATAQT_CLASS_API
Selector :
public QTreeView
40 typedef QVector< ::fwMedData::Series::sptr > SeriesVectorType;
46 UIMEDDATAQT_API
Selector(QWidget* parent = 0);
52 UIMEDDATAQT_API
void clear();
59 UIMEDDATAQT_API
void addSeries(::fwMedData::Series::sptr series);
65 UIMEDDATAQT_API
void removeSeries(::fwMedData::Series::sptr series);
71 UIMEDDATAQT_API
void keyPressEvent(QKeyEvent* event);
77 UIMEDDATAQT_API
void setSeriesIcons(
const SeriesIconType& seriesIcons);
80 UIMEDDATAQT_API
void setAllowedRemove(
bool allowed);
83 UIMEDDATAQT_API
void setInsertMode(
bool insert);
93 void selectSeries(QVector< ::fwMedData::Series::sptr > selection, QVector< ::fwMedData::Series::sptr > deselection);
99 void removeSeries(QVector< ::fwMedData::Series::sptr > selection);
110 void selectionChanged(
const QItemSelection& selected,
const QItemSelection& deselected );
118 SeriesVectorType getSeries(
const QItemSelection& selection );
124 SeriesVectorType getSeries(
const QModelIndexList& indexList);
127 QModelIndexList getStudyIndexes(
const QModelIndexList& indexList);
130 SeriesVectorType getSeriesFromStudyIndex(
const QModelIndex& index);
133 void deleteSelection();
138 QPointer<SelectorModel> m_model;
141 bool m_allowedRemove;
148 #endif // __UIMEDDATAQT_WIDGET_SELECTOR_HPP__ The namespace uiMedDataQt contains editors for medical data.