A dialog box allowing to select study operation to be performed on the module activating.
More...
The dialog box is shown when the user tries to activate any module while there is no opened study. The dialog box proposes user to select one of the possible operations which should be done before module activating, for example, create new study or open study from the file. The available operations are assigned by adding the buttons with the unique identifier to the dialog box. When the user clicks any operation button, the dialog box sets its identifier as the return code and closes.
The typical usage of the dialog box:
dlg.addButton( "New study", NewStudyId );
dlg.addButton( "Open study...", OpenStudyId );
int ret = dlg.exec();
switch( ret ) {
case NewStudyId:
createNewStudy();
break;
case OpenStudyId:
QString fileName = QFileDialog::getOpenFileName( desktop(), "Open File" );
if ( !fileName.isEmpty() )
openStudy( fileName );
break;
default:
break;
}
- See Also
- addButton()