Exemplo n.º 1
0
    def remove_widget(self):
        dialog = ConfirmationDialog(
            'Are you sure you want to remove bot "{}"?'.format(self.botname))
        return_value = dialog.exec_()
        if return_value:
            self.controller.remove_bot(self.botname)
            self.deleteLater()

            # Todo: Remove the line below this after multi-bot support is added
            self.view.ui.add_bot_button.setEnabled(True)
Exemplo n.º 2
0
 def handle_save_dialog():
     dialog = ConfirmationDialog(
         'Saving the worker will cancel all the current orders.\n' 'Are you sure you want to do this?'
     )
     return dialog.exec_()