16 #include "internal/QmitkDataManagerItemDelegate.h" 17 #include "internal/QmitkNodeTableViewKeyFilter.h" 70 #include <QGridLayout> 71 #include <QVBoxLayout> 74 #include <QSignalMapper> 79 : m_ItemDelegate(nullptr)
114 m_NodeTreeView->setSelectionMode(QAbstractItemView::ExtendedSelection);
115 m_NodeTreeView->setSelectionBehavior(QAbstractItemView::SelectRows);
130 connect(
m_NodeTreeView->selectionModel(), SIGNAL(selectionChanged(
const QItemSelection &,
const QItemSelection &)),
this, SLOT(
NodeSelectionChanged(
const QItemSelection &,
const QItemSelection &)));
140 QList<berry::IEditorDescriptor::Pointer> editors = editorRegistry->
GetEditors(
"*.mitk");
141 if (editors.size() > 1)
146 QAction* action =
new QAction(descriptor->GetLabel(),
this);
154 QGridLayout* dndFrameWidgetLayout =
new QGridLayout;
156 dndFrameWidgetLayout->setContentsMargins(0, 0, 0, 0);
161 QVBoxLayout* layout =
new QVBoxLayout(parent);
163 layout->setContentsMargins(0, 0, 0, 0);
177 QModelIndex viewIndex =
m_FilterModel->mapFromSource(parent);
198 for (
auto node : nodeSet)
200 if (node.IsNotNull())
202 node->SetSelected(selectedNodes.contains(node));
224 QMetaObject::invokeMethod(
m_FilterModel,
"invalidate", Qt::QueuedConnection);
234 bool hideHelperObjects = !prefs->
GetBool(
"Show helper objects",
false);
237 if (hideHelperObjects)
247 bool hideNodesWithNoData = !prefs->
GetBool(
"Show nodes containing no data",
false);
250 if (hideNodesWithNoData)
269 QItemSelectionModel* QmitkDataManagerView::GetDataNodeSelectionModel()
const
QSignalMapper * m_ShowInMapper
Maps "Show in" actions to editor ids.
void CreateQtPartControl(QWidget *parent) override
~QmitkDataManagerView() override
void ShowIn(const QString &editorId)
Opens the editor with the given id using the current data storage.
mitk::NodePredicateBase::Pointer m_NodeWithNoDataFilterPredicate
void OnNodeVisibilityChanged()
vcl_size_t m_CurrentRowCount
saves the current amount of rows shown in the data manager
mitk::IDataStorageReference::Pointer GetDataStorageReference() const
SmartPointer< Other > Cast() const
QmitkDataStorageTreeModel * m_NodeTreeModel
A plain widget as the base pane.
void SetAllowHierarchyChange(bool allowHierarchyChange)
Set whether to allow hierarchy changes by dragging and dropping.
void NodeChanged(const mitk::DataNode *node) override
virtual QList< mitk::DataNode::Pointer > GetNodeSet() const
QmitkDataManagerItemDelegate * m_ItemDelegate
QmitkDataStorageFilterProxyModel * m_FilterModel
QmitkDataNodeContextMenu * m_DataNodeContextMenu
The context menu that shows up when right clicking on a node.
virtual bool GetBool(const QString &key, bool def) const =0
void OnPreferencesChanged(const berry::IBerryPreferences *prefs) override
mitk::NodePredicateBase::Pointer m_HelperObjectFilterPredicate
static const QString VIEW_ID
static IRenderWindowPart * OpenRenderWindowPart(berry::IWorkbenchPage::Pointer page, bool activatedEditor=true)
Uses 'GetRenderWindowPart' to open the a render window part with a certain strategy: Calls 'GetRender...
void SetPlaceNewNodesOnTop(bool _PlaceNewNodesOnTop)
QList< QAction * > m_ShowInActions
A list of "Show in" actions.
void NodeTreeViewRowsInserted(const QModelIndex &parent, int start, int end)
When rows are inserted auto expand them.
static Pointer New(mitk::BaseData *_arg)
virtual QList< IEditorDescriptor::Pointer > GetEditors(const QString &fileName)=0
int rowCount(const QModelIndex &parent=QModelIndex()) const override
bool HasFilterPredicate(mitk::NodePredicateBase::Pointer pred)
bool RemoveFilterPredicate(mitk::NodePredicateBase::Pointer pred)
void Run(berry::IWorkbenchPartSite::Pointer workbenchPartSite, mitk::DataStorage::Pointer dataStorage, const QList< mitk::DataNode::Pointer > &selectedNodes, mitk::BaseRenderer *baseRenderer)
static Pointer New(const char *_arg)
void AddFilterPredicate(mitk::NodePredicateBase::Pointer pred)
MITKMATCHPOINTREGISTRATION_EXPORT ResultImageType::Pointer map(const InputImageType *input, const RegistrationType *registration, bool throwOnOutOfInputAreaError=false, const double &paddingValue=0, const ResultImageGeometryType *resultGeometry=nullptr, bool throwOnMappingError=true, const double &errorValue=0, mitk::ImageMappingInterpolator::Type interpolatorType=mitk::ImageMappingInterpolator::Linear)
mitk::DataStorage::Pointer GetDataStorage() const
QTreeView * m_NodeTreeView
The Table view to show the selected nodes.
void NodeSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected)
Whenever the selection changes set the "selected" property respectively.
bool GetPlaceNewNodesOnTopFlag()
bool m_SurfaceDecimation
flag indicating whether a surface created from a selected decimation is decimated with vtkQuadricDeci...
QmitkDnDFrameWidget * m_DnDFrameWidget
QList< mitk::DataNode::Pointer > GetCurrentSelection() const
void NodeTreeViewRowsRemoved(const QModelIndex &parent, int start, int end)
will setup m_CurrentRowCount
void Run(berry::IWorkbenchPartSite::Pointer workbenchPartSite, mitk::DataStorage::Pointer dataStorage)
virtual IEditorRegistry * GetEditorRegistry() const =0
berry::IPreferences::Pointer GetPreferences() const
static const int MATCH_ID
Class for nodes of the DataTree.
IWorkbenchPartSite::Pointer GetSite() const override
void nodeVisibilityChanged()