diff --git a/__main__.py b/__main__.py index cd349f4..f47f3ad 100755 --- a/__main__.py +++ b/__main__.py @@ -1,3 +1,4 @@ + #!/usr/bin/env python3 #-*-coding:utf-8-*- import sqlite3 @@ -23,7 +24,7 @@ def connect_db(db_filename): def create_new_db(db_filename): db, c = connect_db(db_filename) - c.execute('''CREATE TABLE ime (code text, char text)''') + c.execute('''CREATE TABLE ime (code text, char text)''') return db, c @@ -66,7 +67,7 @@ def rawcode2truecode(raw): index = 0 for i in raw: i_index = raw_code_order.index(i) - + uncorrected_column = i_index // 3 #correct the column no. 2 -> 3; 9 -> 0 column = str(uncorrected_column + 1)[-1] @@ -88,7 +89,7 @@ class MainWindow(QtGui.QMainWindow, ui.Ui_MainWindow): self.pushButton.clicked.connect(self.input_characters) self.pushButton_2.clicked.connect(self.clear_input) self.action_About.triggered.connect(self.show_about) - + def clear_input(self): self.label_2.setText("") self.lineEdit.clear() @@ -108,38 +109,40 @@ class MainWindow(QtGui.QMainWindow, ui.Ui_MainWindow): result = result + '