Invalid selection.
The number of selected nodes must be uneven! the current number is " << nodes.size() << ".
"; + return ss.str(); + } + return std::string(); + }; + + multNodeSelectionWidget->SetSelectionCheckFunction(checkFunction); + \endcode + + This check function will be passed to the QmitkNodeSelectionDialog and is used to print an error message, if an invalid selection is made inside the node selection dialog. + This will prevent the user from confirming an even selection. If a valid selection is made no error message will be printed and the user can confirm the selection. + \b QmitkNodeSelectionButton - The QmitkNodeSelectionButton is used inside the QmitkSingleNodeSelectionWidget to display the thumbnail or icon of the selected data node (if available) along with an HTML text of the data node info. It is a custom QPushButton that overrides - QPushButton::paintEvent(QPaintEvent *p) to draw the thumbnail or icon and to display the HTML text. + The QmitkNodeSelectionButton is a customized QPushButton and is used for example inside the QmitkSingleNodeSelectionWidget: It displays the thumbnail or icon of the selected data node (if available) along with an HTML text of the data node info. \section DataStorageViewerTestPlugin The DataStorageViewerTest plugin The \a org.mitk.gui.qt.datastorageviewertest plugin can be enabled and used inside the MITK workbench. It serves as a test / demo plugin with a single view that shows different uses of the new selection concept and its related classes. The following classes are used: -# Top row: A QmitkDataStorageListInspector -# Top right: A QmitkDataStorageTreeInspector -# Bottom left: A QmitkSingleNodeSelectionWidget -# Bottom right: A QmitkMultiNodeSelectionWidget The top row presents the two examples of an implementation of the QmitkAbstractDataStorageInspector. They display the whole content of the given data storage in two different ways. No node predicates are used in this case. Both inspectors come with two checkboxes to set each inspectors as a selection provider and a selection listener. With these checkboxes turned on the QmitkSelectionServiceConnector for each inspector is connected to the QmitkModelViewSelectionConnector of each inspector (as shown in \ref QmitkSelectionServiceConnector_ref "QmitkSelectionServiceConnector").