summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x9kwpyqt.py34
1 files changed, 6 insertions, 28 deletions
diff --git a/9kwpyqt.py b/9kwpyqt.py
index 51da3b0..ed796de 100755
--- a/9kwpyqt.py
+++ b/9kwpyqt.py
@@ -71,12 +71,8 @@ class CaptchaGUI(QWidget):
self.statsLabel = QLabel("online stats")
self.statsLabel.setAlignment(Qt.AlignRight)
- # self.timerLabel.setStyleSheet("QLabel { color: darkred; }")
-
self.LayoutStats = QHBoxLayout()
self.LayoutStats.addWidget(self.accountLabel)
- # self.LayoutStats.addWidget(self.timerLabel)
- # self.LayoutStats.addWidget(self.timerProgress)
self.LayoutStats.addWidget(self.statsLabel)
self.LayoutStats.sizeConstraint = QLayout.SetMinimumSize
@@ -93,30 +89,18 @@ class CaptchaGUI(QWidget):
self.captchaBox = QHBoxLayout()
self.captchaBox.addWidget(self.captchaImage)
- # Bottom: Input + Submit/Skip-Buttons
+ # Bottom: StartStop/Sound-Button
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)
- self.LayoutSubmitButtons.addWidget(self.skipButton)
+ self.LayoutSettings = QHBoxLayout()
+ self.LayoutSettings.addWidget(self.startstopButton)
self.LayoutSubmit = QVBoxLayout()
- self.LayoutSubmit.addLayout(self.LayoutSubmitLine)
- self.LayoutSubmit.addLayout(self.LayoutSubmitButtons)
+ self.LayoutSubmit.addWidget(self.captchaInputLine)
+ self.LayoutSubmit.addLayout(self.LayoutSettings)
# Compile layout
mainLayout = QVBoxLayout()
@@ -170,9 +154,7 @@ class CaptchaGUI(QWidget):
if key == Qt.Key_Escape:
self.skipCaptcha()
elif key == Qt.Key_Enter or key == Qt.Key_Return:
- if self.skipButton.hasFocus():
- self.skipCaptcha()
- elif self.startstopButton.hasFocus():
+ if self.startstopButton.hasFocus():
self.toggleRunning()
else:
self.submitCaptcha()
@@ -200,10 +182,6 @@ class CaptchaGUI(QWidget):
self.startstopButton.setText(self.running and "Stop" or "Start")
self.startstopButton.setChecked(self.running)
- def saveImage(self):
- if self.captchaImage.image:
- self.captchaImage.image.save("captcha-"+str(time.time())+".jpg")
-
##################################################
# Handle network
##################################################