Medical Imaging Interaction Toolkit  2026.06.00
Medical Imaging Interaction Toolkit
QmitkXnatCreateObjectDialog Class Reference

Dialog for creating new XNAT objects (subjects or experiments). More...

#include <QmitkXnatCreateObjectDialog.h>

Inheritance diagram for QmitkXnatCreateObjectDialog:
Collaboration diagram for QmitkXnatCreateObjectDialog:

Public Types

enum  SpecificType { SUBJECT , EXPERIMENT }
 Enumeration of XNAT object types that can be created. More...
 

Public Member Functions

 QmitkXnatCreateObjectDialog (SpecificType type, QWidget *parent=nullptr)
 Construct the create-object dialog for the given XNAT type. More...
 
 ~QmitkXnatCreateObjectDialog () override
 Destructor. Cleans up the embedded property widget. More...
 
ctkXnatObject * GetXnatObject ()
 Retrieve the XNAT object populated with user-entered properties. More...
 

Protected Slots

void OnAcceptClicked ()
 Slot called when the Create button is clicked. More...
 
void OnCancelClicked ()
 Slot called when the Cancel button is clicked. Rejects the dialog. More...
 

Detailed Description

Dialog for creating new XNAT objects (subjects or experiments).

QmitkXnatCreateObjectDialog presents a form that allows the user to fill in the properties needed to create a new XNAT subject or experiment. The dialog embeds the appropriate property widget (QmitkXnatSubjectWidget or QmitkXnatExperimentWidget) in CREATE mode, making all input fields editable. It validates that mandatory fields (such as label/ID and, for experiments, the XSI type) are filled before accepting.

See also
QmitkXnatSubjectWidget, QmitkXnatExperimentWidget, ctkXnatObject

Definition at line 33 of file QmitkXnatCreateObjectDialog.h.

Member Enumeration Documentation

◆ SpecificType

Enumeration of XNAT object types that can be created.

Enumerator
SUBJECT 

Create a new XNAT subject.

EXPERIMENT 

Create a new XNAT experiment.

Definition at line 41 of file QmitkXnatCreateObjectDialog.h.

Constructor & Destructor Documentation

◆ QmitkXnatCreateObjectDialog()

QmitkXnatCreateObjectDialog::QmitkXnatCreateObjectDialog ( SpecificType  type,
QWidget *  parent = nullptr 
)

Construct the create-object dialog for the given XNAT type.

Creates the appropriate property widget (QmitkXnatSubjectWidget or QmitkXnatExperimentWidget) in CREATE mode and embeds it into the dialog layout along with Create and Cancel buttons.

Parameters
[in]typeThe type of XNAT object to create (SUBJECT or EXPERIMENT).
[in]parentOptional parent widget.

◆ ~QmitkXnatCreateObjectDialog()

QmitkXnatCreateObjectDialog::~QmitkXnatCreateObjectDialog ( )
override

Destructor. Cleans up the embedded property widget.

Member Function Documentation

◆ GetXnatObject()

ctkXnatObject* QmitkXnatCreateObjectDialog::GetXnatObject ( )

Retrieve the XNAT object populated with user-entered properties.

The returned object is a ctkXnatSubject or ctkXnatExperiment depending on the SpecificType passed to the constructor. Properties are set from the widget fields when the user clicks Create.

Returns
Pointer to the created ctkXnatObject. Ownership is transferred to the caller.
Precondition
The dialog should have been accepted for the object properties to be fully populated.

◆ OnAcceptClicked

void QmitkXnatCreateObjectDialog::OnAcceptClicked ( )
protectedslot

Slot called when the Create button is clicked.

Validates mandatory fields (label for subjects; label and xsiType for experiments). If validation fails, a warning message box is shown and the dialog remains open. Otherwise the dialog is accepted.

◆ OnCancelClicked

void QmitkXnatCreateObjectDialog::OnCancelClicked ( )
protectedslot

Slot called when the Cancel button is clicked. Rejects the dialog.


The documentation for this class was generated from the following file: