def closeEvent(event): if not sigint_called: button = QMessageBox.question(main_window, main_window.tr('Close application'), main_window.tr('Do you really want to close the application?'), QMessageBox.Cancel | QMessageBox.Close) else: button = QMessageBox.Close if button == QMessageBox.Close: event.accept() else: event.ignore()
def closeEvent(event): if not sigint_called: button = QMessageBox.question( main_window, main_window.tr('Close application'), main_window.tr('Do you really want to close the application?'), QMessageBox.Cancel | QMessageBox.Close) else: button = QMessageBox.Close if button == QMessageBox.Close: event.accept() else: event.ignore()
def clear_all(): global current_name confirmed = True if current_name is None: button = QMessageBox.question(main_window, main_window.tr('Clear all poses'), main_window.tr('Do you really want to delete all poses?'), QMessageBox.No | QMessageBox.Yes) confirmed = button == QMessageBox.Yes if confirmed: print 'clear_all()' for index in range(main_window.PoseList_tabWidget.count()): model = models[index] model.remove_all_actions() current_name = None set_tab(0) main_window.angled_view_radioButton.click()
def clear_all(): global current_name confirmed = True if current_name is None: button = QMessageBox.question( main_window, main_window.tr('Clear all poses'), main_window.tr('Do you really want to delete all poses?'), QMessageBox.No | QMessageBox.Yes) confirmed = button == QMessageBox.Yes if confirmed: print 'clear_all()' for index in range(main_window.PoseList_tabWidget.count()): model = models[index] model.remove_all_actions() current_name = None set_tab(0) main_window.angled_view_radioButton.click()