From f51e5ed8781016cc6dfb91d7b0867336288ee2c0 Mon Sep 17 00:00:00 2001 From: Marcel Kapfer Date: Wed, 9 Sep 2020 23:44:52 +0200 Subject: [PATCH] Added clear fields dialog code --- wikicookbook.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wikicookbook.py b/wikicookbook.py index 5a9f440..ff853f3 100644 --- a/wikicookbook.py +++ b/wikicookbook.py @@ -28,6 +28,7 @@ from PyQt5.QtWidgets import QApplication, QMainWindow, QMessageBox, QTableWidget from ui_mainwindow import Ui_MainWindow from ui_code_dialog import Ui_WikiCode from ui_about_dialog import Ui_About +from ui_clear_dialog import Ui_ClearDialog class AboutDialog(QDialog, Ui_About): def __init__(self, *args, **kwargs): @@ -38,6 +39,16 @@ class AboutDialog(QDialog, Ui_About): self.show() +class ClearDialog(QDialog, Ui_ClearDialog): + def __init__(self, *args, **kwargs): + super(ClearDialog, self).__init__(*args, **kwargs) + self.setupUi(self) + + self.b_yes.clicked.connect(self.accept) + self.b_no.clicked.connect(self.reject) + + self.show() + class WikiCodeDialog(QDialog, Ui_WikiCode): def __init__(self, code, *args, **kwargs): super(WikiCodeDialog, self).__init__(*args, **kwargs)