-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
46 lines (34 loc) · 1.35 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import os
from PyQt5 import QtWidgets
from nldlgui import Ui_MainWindow
import sys
from StreamTextEdit import StreamTextEdit
# os.environ['QT_QPA_PLATFORM_PLUGIN_PATH'] = "D:/Programme/Anaconda3/Library/plugins/platforms"
def converthandler(self):
print("handling convert button")
processInputNL("test")
def processInputNL(input):
print("processing input"+input)
def neuefunc():
print("neu")
class ApplicationWindow(QtWidgets.QMainWindow):
def __init__(self):
super(ApplicationWindow, self).__init__()
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
# self.ui.txtNL = StreamTextEdit(self.ui.centralwidget)
self.ui.btnConvert.clicked.connect(lambda x: processInputNL(self.ui.txtNL.toPlainText()))
self.ui.txtNL.outputfeld = self.ui.txtResultDSL
self.ui.txtNL.setSuggestlist(self.ui.listvorschlaege)
self.ui.textEdit.setSuggestlist(self.ui.listvorschlaege)
self.ui.textEdit.outputfeld = self.ui.txtResultDSL
self.ui.txtNL.startBackgroundThread()
self.ui.btnConvert.setVisible(False)
# self.ui.txtNL.keyReleaseEvent.connect(lambda x: processInputNL(self.ui.txtNL.toPlainText()))
def main():
app = QtWidgets.QApplication(sys.argv)
application = ApplicationWindow()
application.show()
sys.exit(app.exec_())
if __name__ == "__main__":
main()