ui/ImageView.py
def prompt_concept(self):
        """
        Prompt for a concept selection and return selection
        :return: Concept selected
        """
        dialog = QDialog()
        dialog.setLayout(QVBoxLayout())
        dialog.setWindowTitle('Specify a concept')
        dialog.setWindowFlag(Qt.WindowCloseButtonHint, False)
        search = ConceptSearchbar()

        submit_button = QPushButton('Submit')
        submit_button.setEnabled(False)
        submit_button.pressed.connect(dialog.close)

        concept_selected = ''

        def update_concept_selected(concept):
            nonlocal concept_selected
            nonlocal submit_button
            concept_selected = concept
            submit_button.setEnabled(True)

        search.set_callback(update_concept_selected)

        dialog.layout().addWidget(search)
        dialog.layout().addWidget(submit_button)

        dialog.setModal(True)
        dialog.exec_()

        return concept_selected

        Prompt for a concept selection and return selection
        :return: Concept selected
        
Prompt for a concept selection and return selection
Prompt for a concept selection and return selection
def prompt_concept(self):
        dialog = QDialog()
        dialog.setLayout(QVBoxLayout())
        dialog.setWindowTitle('Specify a concept')
        dialog.setWindowFlag(Qt.WindowCloseButtonHint, False)
        search = ConceptSearchbar()
        submit_button = QPushButton('Submit')
        submit_button.setEnabled(False)
        submit_button.pressed.connect(dialog.close)
        concept_selected = ''
        def update_concept_selected(concept):
            nonlocal concept_selected
            nonlocal submit_button
            concept_selected = concept
            submit_button.setEnabled(True)
        search.set_callback(update_concept_selected)
        dialog.layout().addWidget(search)
        dialog.layout().addWidget(submit_button)
        dialog.setModal(True)
        dialog.exec_()
        return concept_selected
def prompt_concept ( self ) : dialog = QDialog ( ) dialog . setLayout ( QVBoxLayout ( ) ) dialog . setWindowTitle ( 'Specify a concept' ) dialog . setWindowFlag ( Qt . WindowCloseButtonHint , False ) search = ConceptSearchbar ( ) submit_button = QPushButton ( 'Submit' ) submit_button . setEnabled ( False ) submit_button . pressed . connect ( dialog . close ) concept_selected = '' def update_concept_selected ( concept ) : nonlocal concept_selected nonlocal submit_button concept_selected = concept submit_button . setEnabled ( True ) search . set_callback ( update_concept_selected ) dialog . layout ( ) . addWidget ( search ) dialog . layout ( ) . addWidget ( submit_button ) dialog . setModal ( True ) dialog . exec_ ( ) return concept_selected
Prompt for a concept selection and return selection
Prompt for a concept selection and return selection
"""
        Prompt for a concept selection and return selection
        :return: Concept selected
        """
None
self