21 #include <QMouseEvent> 30 m_Controls.btnSelect->installEventFilter(
this);
43 if (newInternalSelection.empty())
49 if (autoSelectedNode.IsNotNull())
51 newInternalSelection.append(autoSelectedNode);
55 else if (newInternalSelection.size()>1)
58 newInternalSelection = { newInternalSelection.front() };
77 if (!selection.empty())
79 result = selection.front();
88 if (ev->type() == QEvent::MouseButtonRelease)
90 auto mouseEv =
dynamic_cast<QMouseEvent*
>(ev);
96 if (mouseEv->button() == Qt::LeftButton)
98 if (this->isEnabled())
107 if (!selection.empty())
169 if (storage.IsNotNull())
174 for (
const auto& ignoreNode : ignoreNodes)
176 if (node == ignoreNode)
193 result = storage->GetNode(predicate);
203 selection.append(selectedNode);
214 if (autoNode.IsNotNull())
itk::SmartPointer< T > Lock() const
static QIcon ThemeIcon(const QByteArray &originalSVG)
void SetSelectOnlyVisibleNodes(bool selectOnlyVisibleNodes)
static Pointer New(const FunctionType &_arg)
void SetSelectionMode(SelectionMode mode)
NodeList GetSelectedNodes() const
Widget that allows to show and edit the content of an mitk::IsoDoseLevel instance.
void SetDataStorage(mitk::DataStorage *dataStorage)
Sets the data storage that will be used /monitored by widget.
virtual void SetNodePredicate(const mitk::NodePredicateBase *nodePredicate)
Sets the node predicate and updates the widget, according to the node predicate.
void SetCurrentSelection(NodeList selectedNodes)
Class for nodes of the DataTree.