-
Notifications
You must be signed in to change notification settings - Fork 3
/
view.py
133 lines (127 loc) · 7.17 KB
/
view.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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'view.ui'
#
# Created by: PyQt5 UI code generator 5.9.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(1607, 910)
self.graphicsView = QtWidgets.QGraphicsView(Dialog)
self.graphicsView.setGeometry(QtCore.QRect(20, 30, 1381, 851))
self.graphicsView.setObjectName("graphicsView")
self.layoutWidget = QtWidgets.QWidget(Dialog)
self.layoutWidget.setGeometry(QtCore.QRect(1430, 720, 151, 71))
self.layoutWidget.setObjectName("layoutWidget")
self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.layoutWidget)
self.verticalLayout_3.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.visualize = QtWidgets.QPushButton(self.layoutWidget)
self.visualize.setObjectName("visualize")
self.verticalLayout_3.addWidget(self.visualize)
self.layoutWidget1 = QtWidgets.QWidget(Dialog)
self.layoutWidget1.setGeometry(QtCore.QRect(1430, 40, 151, 51))
self.layoutWidget1.setObjectName("layoutWidget1")
self.verticalLayout_4 = QtWidgets.QVBoxLayout(self.layoutWidget1)
self.verticalLayout_4.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_4.setObjectName("verticalLayout_4")
self.node = QtWidgets.QLabel(self.layoutWidget1)
self.node.setTextFormat(QtCore.Qt.PlainText)
self.node.setScaledContents(False)
self.node.setAlignment(QtCore.Qt.AlignCenter)
self.node.setObjectName("node")
self.verticalLayout_4.addWidget(self.node)
self.nodeInput = QtWidgets.QComboBox(self.layoutWidget1)
self.nodeInput.setObjectName("nodeInput")
self.nodeInput.addItem("")
self.nodeInput.addItem("")
self.nodeInput.addItem("")
self.nodeInput.addItem("")
self.verticalLayout_4.addWidget(self.nodeInput)
self.layoutWidget2 = QtWidgets.QWidget(Dialog)
self.layoutWidget2.setGeometry(QtCore.QRect(1430, 482, 151, 43))
self.layoutWidget2.setObjectName("layoutWidget2")
self.verticalLayout_5 = QtWidgets.QVBoxLayout(self.layoutWidget2)
self.verticalLayout_5.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_5.setObjectName("verticalLayout_5")
self.speed = QtWidgets.QLabel(self.layoutWidget2)
self.speed.setAlignment(QtCore.Qt.AlignCenter)
self.speed.setObjectName("speed")
self.verticalLayout_5.addWidget(self.speed)
self.speedInput = QtWidgets.QSlider(self.layoutWidget2)
self.speedInput.setOrientation(QtCore.Qt.Horizontal)
self.speedInput.setObjectName("speedInput")
self.verticalLayout_5.addWidget(self.speedInput)
self.layoutWidget3 = QtWidgets.QWidget(Dialog)
self.layoutWidget3.setGeometry(QtCore.QRect(1430, 610, 151, 51))
self.layoutWidget3.setObjectName("layoutWidget3")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.layoutWidget3)
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.currentnode = QtWidgets.QLabel(self.layoutWidget3)
self.currentnode.setAlignment(QtCore.Qt.AlignCenter)
self.currentnode.setObjectName("currentnode")
self.verticalLayout_2.addWidget(self.currentnode)
self.currentnodeInput = QtWidgets.QLineEdit(self.layoutWidget3)
self.currentnodeInput.setAlignment(QtCore.Qt.AlignCenter)
self.currentnodeInput.setObjectName("currentnodeInput")
self.verticalLayout_2.addWidget(self.currentnodeInput)
self.layoutWidget4 = QtWidgets.QWidget(Dialog)
self.layoutWidget4.setGeometry(QtCore.QRect(1430, 140, 151, 51))
self.layoutWidget4.setObjectName("layoutWidget4")
self.verticalLayout = QtWidgets.QVBoxLayout(self.layoutWidget4)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.algo = QtWidgets.QLabel(self.layoutWidget4)
self.algo.setLayoutDirection(QtCore.Qt.LeftToRight)
self.algo.setAlignment(QtCore.Qt.AlignCenter)
self.algo.setObjectName("algo")
self.verticalLayout.addWidget(self.algo)
self.algoInput = QtWidgets.QComboBox(self.layoutWidget4)
self.algoInput.setObjectName("algoInput")
self.algoInput.addItem("")
self.algoInput.addItem("")
self.algoInput.addItem("")
self.algoInput.addItem("")
self.algoInput.addItem("")
self.algoInput.setItemText(5, "")
self.verticalLayout.addWidget(self.algoInput)
self.layoutWidget5 = QtWidgets.QWidget(Dialog)
self.layoutWidget5.setGeometry(QtCore.QRect(1430, 280, 151, 121))
self.layoutWidget5.setObjectName("layoutWidget5")
self.verticalLayout_6 = QtWidgets.QVBoxLayout(self.layoutWidget5)
self.verticalLayout_6.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_6.setObjectName("verticalLayout_6")
self.clearb = QtWidgets.QPushButton(self.layoutWidget5)
self.clearb.setObjectName("clearb")
self.verticalLayout_6.addWidget(self.clearb)
self.clearw = QtWidgets.QPushButton(self.layoutWidget5)
self.clearw.setObjectName("clearw")
self.verticalLayout_6.addWidget(self.clearw)
self.clearp = QtWidgets.QPushButton(self.layoutWidget5)
self.clearp.setObjectName("clearp")
self.verticalLayout_6.addWidget(self.clearp)
self.retranslateUi(Dialog)
QtCore.QMetaObject.connectSlotsByName(Dialog)
def retranslateUi(self, Dialog):
_translate = QtCore.QCoreApplication.translate
Dialog.setWindowTitle(_translate("Dialog", "PATH VISUALIZER"))
self.visualize.setText(_translate("Dialog", "VISUALIZE"))
self.node.setText(_translate("Dialog", "SELECT NODE"))
self.nodeInput.setItemText(0, _translate("Dialog", "Start Node"))
self.nodeInput.setItemText(1, _translate("Dialog", "Target Node"))
self.nodeInput.setItemText(2, _translate("Dialog", "Weighted Node"))
self.nodeInput.setItemText(3, _translate("Dialog", "Unweighted Node"))
self.speed.setText(_translate("Dialog", "VISUALIZATION SPEED"))
self.currentnode.setText(_translate("Dialog", "CURRENT NODE"))
self.algo.setText(_translate("Dialog", " ALGORITHMS"))
self.algoInput.setItemText(0, _translate("Dialog", "Breadth First Search"))
self.algoInput.setItemText(1, _translate("Dialog", "Depth First Search"))
self.algoInput.setItemText(2, _translate("Dialog", "Dijkstra\'s Algorithm"))
self.algoInput.setItemText(3, _translate("Dialog", "Greedy Best First Search"))
self.algoInput.setItemText(4, _translate("Dialog", "A* Algorithm"))
self.clearb.setText(_translate("Dialog", "CLEAR BOARD"))
self.clearw.setText(_translate("Dialog", "CLEAR WEIGHT/BLOCK"))
self.clearp.setText(_translate("Dialog", "CLEAR PATH"))