-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmainUI.py
59 lines (45 loc) · 1.41 KB
/
mainUI.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
47
48
49
50
51
52
53
54
55
56
57
58
59
import sys
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from addrule import addrule
from vennUI import vennUI
from findrule import findrule
class mainUI(QMainWindow):
def __init__(self):
super().__init__()
self.initUI()
def initUI(self):
self.setWindowTitle('venn relation')
self.setGeometry(100, 100, 300, 200)
layout = QVBoxLayout()
layout.addStretch(1)
label = QLabel("subject - predicate - object")
label.setAlignment(Qt.AlignCenter)
font = label.font()
font.setPointSize(15)
label.setFont(font)
self.label = label
btn = QPushButton("Add rule")
btn.clicked.connect(self.onButtonClicked)
layout.addWidget(label)
layout.addWidget(btn)
btn2 = QPushButton("Execute Query")
btn2.clicked.connect(self.onButton2Clicked)
layout.addWidget(btn2)
layout.addStretch(1)
centralWidget = QWidget()
centralWidget.setLayout(layout)
self.setCentralWidget(centralWidget)
def onButtonClicked(self):
win = vennUI()
win.showModal()
r = win.showModal()
#if r:
# text = win.outputText()
# self.label.setText(text)
#text = win.edit.text()
def onButton2Clicked(self):
win = findrule()
win.showModal()
def show(self):
super().show()