summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Glüpker <git@wgmd.de>2016-03-22 16:35:59 +0100
committerAndré Glüpker <git@wgmd.de>2016-03-22 16:35:59 +0100
commitc1108bfad7919d2cd0df1cfeef0ef720110210db (patch)
tree88a6249f5669a3de7305c35f8b88632fea955a88
parent52b0ada6565e7ca76db2ba0b6b36596cd3500cb8 (diff)
download9kwpyqt-c1108bfad7919d2cd0df1cfeef0ef720110210db.tar.gz
9kwpyqt-c1108bfad7919d2cd0df1cfeef0ef720110210db.tar.bz2
9kwpyqt-c1108bfad7919d2cd0df1cfeef0ef720110210db.zip
Debugfunction to save current image (commented out)
-rwxr-xr-x9kwpyqt.py7
1 files changed, 7 insertions, 0 deletions
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
##################################################