MCPcopy Create free account
hub / github.com/MITK/MITK / GetOptions

Method GetOptions

Modules/QtWidgets/src/QmitkFileReaderWriterOptionsWidget.cpp:121–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

119}
120
121QmitkFileReaderWriterOptionsWidget::Options QmitkFileReaderWriterOptionsWidget::GetOptions() const
122{
123 Options options;
124
125 QFormLayout *layout = qobject_cast<QFormLayout *>(this->layout());
126 const int rows = layout->rowCount();
127 for (int i = 0; i < rows; ++i)
128 {
129 QmitkAnyAdapter *anyAdapter = dynamic_cast<QmitkAnyAdapter *>(layout->itemAt(i, QFormLayout::FieldRole)->widget());
130 if (anyAdapter)
131 {
132 options.insert(std::make_pair(anyAdapter->GetName(), anyAdapter->GetAny()));
133 }
134 }
135 return options;
136}
137
138QmitkAnyStringWidget::QmitkAnyStringWidget(const std::string &name, const us::Any &any, QWidget *parent)
139 : QLineEdit(parent), QmitkAnyAdapter(name)

Callers 5

SetCurrentReaderMethod · 0.45
acceptMethod · 0.45
acceptMethod · 0.45

Calls 3

GetAnyMethod · 0.80
rowCountMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected