forked from TatyanaKonina/text-search-algorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Puttern Matching.py
98 lines (60 loc) · 2.06 KB
/
Puttern Matching.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
import sys
from PyQt5.QtWidgets import *
from PyQt5 import QtGui
class Tab(QDialog):
def __init__(self):
super().__init__()
self.setWindowTitle("myproj")
self.resize(900, 450)
vbox=QVBoxLayout()
tabWidget=QTabWidget()
tabWidget.setTabPosition(QTabWidget.South)
tabWidget.addTab(TextGeneration(), "Text Generation")
vbox.addWidget(tabWidget)
self.setLayout(vbox)
tabWidget.addTab(FindWord(), "Algorithms")
vbox.addWidget(tabWidget)
self.setLayout(vbox)
class TextGeneration(QWidget):
def __init__(self):
super().__init__()
label=QLabel("Text Generation")
label.setFont(QtGui.QFont("Calibri", 8))
comboBox = QComboBox()
comboBox.addItems(["Full Random", "Random words", "Text"])
# comboBox.setFont(QtGui.QFont("Calibri", 9))
sourceText=QTextEdit()
textCombobox=QComboBox()
textCombobox.addItems(["Text 1", "Text 2", "Text 3", "Text 4"])
sizeLine=QLineEdit()
countLine=QLineEdit()
labelSourceText=QLabel("SourceText")
buttonOk=QPushButton("OK")
fbox=QFormLayout()
gbox=QGridLayout()
fbox1=QFormLayout()
fbox.addRow(label)
fbox.addRow(comboBox)
fbox.addRow("Size of text: ", sizeLine)
fbox.addRow("Text count: ", countLine)
fbox.addRow(" ", buttonOk)
fbox1.addRow(labelSourceText)
fbox1.addRow(textCombobox)
fbox1.addRow(sourceText)
gbox.setColumnStretch(1,1)
gbox.addLayout(fbox,0,0)
gbox.addLayout(fbox1,0,1)
# hbox.addWidget(sourceText)
self.setLayout(gbox)
#self.setLayout(hbox)
class FindWord(QWidget):
def __init__(self):
super().__init__()
class Result(QWidget):
def __init__(self):
super().__init__()
if __name__ == '__main__':
app = QApplication(sys.argv) #создание объекта класса QApplication
tabDialog=Tab()
tabDialog.show()
sys.exit(app.exec_())