19 #include <QGridLayout> 20 #include <QTextBrowser> 21 #include <QPushButton> 27 : QDialog(parent, flags)
29 QList<mitk::DataNode::ConstPointer> constNodes;
31 for (
auto& node : nodes)
33 constNodes.append(node.GetPointer());
36 InitWidgets(constNodes);
40 : QDialog(parent, flags)
45 void QmitkNodeDetailsDialog::InitWidgets(
const QList<mitk::DataNode::ConstPointer>& nodes)
47 auto parentLayout =
new QGridLayout;
54 QPushButton* cancelButton =
new QPushButton(
"Cancel",
this);
56 setMinimumSize(512, 512);
57 setLayout(parentLayout);
58 setSizeGripEnabled(
true);
61 parentLayout->addWidget(dataStorageComboBox, 0, 0, 1, 2);
65 parentLayout->addWidget(cancelButton, 3, 0, 1, 2);
69 for (
auto& node : nodes)
71 dataStorageComboBox->AddNode(node);
78 cancelButton->setDefault(
true);
91 if (
nullptr != baseData)
93 baseData->Print(s, i);
104 if (keyWord.isEmpty() || text.isEmpty())
120 if (event->type() == QEvent::KeyPress)
122 QKeyEvent *keyEvent =
static_cast<QKeyEvent*
>(event);
132 return QObject::eventFilter(obj, event);
138 textCursor.setPosition(0);
Base of all data objects.
Displays all or a subset (defined by a predicate) of nodes of the Data Storage.
void KeyWordTextChanged(const QString &text)
BaseData * GetData() const
Get the data object (instance of BaseData, e.g., an Image) managed by this DataNode.
void OnSearchButtonClicked(bool checked=false)
QPushButton * m_SearchButton
QTextBrowser * m_TextBrowser
QmitkNodeDetailsDialog(const QList< mitk::DataNode::ConstPointer > &nodes, QWidget *parent=nullptr, Qt::WindowFlags flags=nullptr)
void OnSelectionChanged(const mitk::DataNode *)
Throw a signal when the data node selection changed.
void OnSelectionChanged(const mitk::DataNode *)
void OnCancelButtonClicked(bool checked=false)
Class for nodes of the DataTree.
bool eventFilter(QObject *obj, QEvent *event) override