From c1108bfad7919d2cd0df1cfeef0ef720110210db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Gl=C3=BCpker?= Date: Tue, 22 Mar 2016 16:35:59 +0100 Subject: Debugfunction to save current image (commented out) --- 9kwpyqt.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/9kwpyqt.py b/9kwpyqt.py index 1bb9099..d92398d 100755 --- a/9kwpyqt.py +++ b/9kwpyqt.py @@ -71,15 +71,18 @@ class CaptchaGUI(QWidget): self.captchaInputLine = QLineEdit() self.startstopButton = QPushButton("Start") self.startstopButton.setCheckable(True) + # self.saveImageButton = QPushButton("Sa&ve Image") self.submitButton = QPushButton("&Submit") self.skipButton = QPushButton("S&kip") self.startstopButton.clicked.connect(self.toggleRunning) + # self.saveImageButton.clicked.connect(self.saveImage) self.submitButton.clicked.connect(self.submitCaptcha) self.skipButton.clicked.connect(self.skipCaptcha) self.LayoutSubmitLine = QHBoxLayout() self.LayoutSubmitLine.addWidget(self.startstopButton) self.LayoutSubmitLine.addWidget(self.captchaInputLine) + # self.LayoutSubmitLine.addWidget(self.saveImageButton) self.LayoutSubmitButtons = QHBoxLayout() self.LayoutSubmitButtons.addWidget(self.submitButton) @@ -174,6 +177,10 @@ class CaptchaGUI(QWidget): self.startstopButton.setText(self.running and "Stop" or "Start") self.startstopButton.setChecked(self.running) + def saveImage(self): + if self.image: + self.image.save("captcha-"+str(time.time())+".jpg") + ################################################## # Handle network ################################################## -- cgit v1.2.3