#pragma once /*========================================================================= medInria Copyright (c) INRIA 2013 - 2020. All rights reserved. See LICENSE.txt for details. This software is distributed WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. =========================================================================*/ #include #include #include #include #include #include #include #include #include class medSourceModelPresenter; class medSourcesWidget : public QWidget { Q_OBJECT public: medSourcesWidget(); ~medSourcesWidget(); void addSources(medDataHub *dataHub); public slots: void addSource(medDataHub *dataHub, QString sourceInstanceId); void removeSource(QString sourceInstanceId); void setSourceVisible(QString sourceInstanceId, bool checked); void expandSourceTree(QAction *action); void filter(const QString &); void onDoubleClick(QModelIndex const & index); signals: void openOnDoubleClick(medDataIndex); private: void onCustomContextMenu(QPoint const &point, QMenu *pi_pMenu); QModelIndex indexFromMenu(QMenu *pi_pMenu); private: QVBoxLayout m_layout; QMap m_treeMap; // sourceInstanceId, SubTreeWidget QMap m_titleMap; // sourceInstanceId, source instance names QMap m_TreeviewByMenuMap; };