-
Notifications
You must be signed in to change notification settings - Fork 3
/
mainwindow.py
290 lines (282 loc) · 15.8 KB
/
mainwindow.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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow3.ui'
#
# Created by: PyQt4 UI code generator 4.12.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig, _encoding)
except AttributeError:
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text, disambig)
class Ui_NeuroFloper(object):
def setupUi(self, NeuroFloper):
NeuroFloper.setObjectName(_fromUtf8("NeuroFloper"))
NeuroFloper.resize(750, 568)
NeuroFloper.setMinimumSize(QtCore.QSize(495, 397))
NeuroFloper.setMaximumSize(QtCore.QSize(750, 600))
icon = QtGui.QIcon()
icon.addPixmap(QtGui.QPixmap(_fromUtf8("logo_black.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
NeuroFloper.setWindowIcon(icon)
self.centralwidget = QtGui.QWidget(NeuroFloper)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralwidget)
self.verticalLayout_3.setObjectName(_fromUtf8("verticalLayout_3"))
self.horizontalLayout_3 = QtGui.QHBoxLayout()
self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
self.label_2 = QtGui.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setFamily(_fromUtf8("DejaVu Serif"))
font.setPointSize(11)
font.setBold(True)
font.setWeight(75)
self.label_2.setFont(font)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.horizontalLayout_3.addWidget(self.label_2)
spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_3.addItem(spacerItem)
self.testlabel = QtGui.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setBold(True)
font.setWeight(75)
self.testlabel.setFont(font)
self.testlabel.setObjectName(_fromUtf8("testlabel"))
self.horizontalLayout_3.addWidget(self.testlabel)
self.verticalLayout_3.addLayout(self.horizontalLayout_3)
self.line = QtGui.QFrame(self.centralwidget)
self.line.setFrameShape(QtGui.QFrame.HLine)
self.line.setFrameShadow(QtGui.QFrame.Sunken)
self.line.setObjectName(_fromUtf8("line"))
self.verticalLayout_3.addWidget(self.line)
self.horizontalLayout_2 = QtGui.QHBoxLayout()
self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
self.gridLayout = QtGui.QGridLayout()
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.OutputNumber = QtGui.QLCDNumber(self.centralwidget)
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(170, 85, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 85, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 85, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
self.OutputNumber.setPalette(palette)
self.OutputNumber.setAutoFillBackground(False)
self.OutputNumber.setNumDigits(5)
self.OutputNumber.setSegmentStyle(QtGui.QLCDNumber.Filled)
self.OutputNumber.setObjectName(_fromUtf8("OutputNumber"))
self.gridLayout.addWidget(self.OutputNumber, 2, 1, 1, 1)
self.LayerNumber = QtGui.QLCDNumber(self.centralwidget)
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(170, 85, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 85, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 85, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
self.LayerNumber.setPalette(palette)
self.LayerNumber.setAutoFillBackground(False)
self.LayerNumber.setNumDigits(5)
self.LayerNumber.setSegmentStyle(QtGui.QLCDNumber.Filled)
self.LayerNumber.setObjectName(_fromUtf8("LayerNumber"))
self.gridLayout.addWidget(self.LayerNumber, 0, 1, 1, 1)
self.label_5 = QtGui.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setFamily(_fromUtf8("Liberation Mono"))
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.label_5.setFont(font)
self.label_5.setObjectName(_fromUtf8("label_5"))
self.gridLayout.addWidget(self.label_5, 2, 0, 1, 1)
self.label_3 = QtGui.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setFamily(_fromUtf8("Liberation Mono"))
font.setPointSize(11)
font.setBold(False)
font.setWeight(50)
self.label_3.setFont(font)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.gridLayout.addWidget(self.label_3, 0, 0, 1, 1)
self.label_4 = QtGui.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setFamily(_fromUtf8("Liberation Mono"))
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.label_4.setFont(font)
self.label_4.setObjectName(_fromUtf8("label_4"))
self.gridLayout.addWidget(self.label_4, 1, 0, 1, 1)
self.InputNumber = QtGui.QLCDNumber(self.centralwidget)
palette = QtGui.QPalette()
brush = QtGui.QBrush(QtGui.QColor(170, 85, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Active, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 85, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Inactive, QtGui.QPalette.BrightText, brush)
brush = QtGui.QBrush(QtGui.QColor(170, 85, 0))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.Light, brush)
brush = QtGui.QBrush(QtGui.QColor(255, 255, 255))
brush.setStyle(QtCore.Qt.SolidPattern)
palette.setBrush(QtGui.QPalette.Disabled, QtGui.QPalette.BrightText, brush)
self.InputNumber.setPalette(palette)
self.InputNumber.setAutoFillBackground(False)
self.InputNumber.setNumDigits(5)
self.InputNumber.setSegmentStyle(QtGui.QLCDNumber.Filled)
self.InputNumber.setObjectName(_fromUtf8("InputNumber"))
self.gridLayout.addWidget(self.InputNumber, 1, 1, 1, 1)
self.horizontalLayout_2.addLayout(self.gridLayout)
spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout_2.addItem(spacerItem1)
self.verticalLayout = QtGui.QVBoxLayout()
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.label_6 = QtGui.QLabel(self.centralwidget)
font = QtGui.QFont()
font.setFamily(_fromUtf8("Liberation Mono"))
font.setPointSize(10)
font.setBold(False)
font.setWeight(50)
self.label_6.setFont(font)
self.label_6.setObjectName(_fromUtf8("label_6"))
self.verticalLayout.addWidget(self.label_6)
self.FunctionsView = QtGui.QListWidget(self.centralwidget)
self.FunctionsView.setObjectName(_fromUtf8("FunctionsView"))
self.verticalLayout.addWidget(self.FunctionsView)
self.horizontalLayout_2.addLayout(self.verticalLayout)
self.verticalLayout_3.addLayout(self.horizontalLayout_2)
self.Image = QtGui.QGraphicsView(self.centralwidget)
self.Image.setObjectName(_fromUtf8("Image"))
self.verticalLayout_3.addWidget(self.Image)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
self.SaveFLOPER = QtGui.QPushButton(self.centralwidget)
self.SaveFLOPER.setObjectName(_fromUtf8("SaveFLOPER"))
self.horizontalLayout.addWidget(self.SaveFLOPER)
spacerItem2 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
self.horizontalLayout.addItem(spacerItem2)
self.Tune = QtGui.QPushButton(self.centralwidget)
self.Tune.setObjectName(_fromUtf8("Tune"))
self.horizontalLayout.addWidget(self.Tune)
self.verticalLayout_3.addLayout(self.horizontalLayout)
NeuroFloper.setCentralWidget(self.centralwidget)
self.menubar = QtGui.QMenuBar(NeuroFloper)
self.menubar.setGeometry(QtCore.QRect(0, 0, 750, 26))
self.menubar.setObjectName(_fromUtf8("menubar"))
self.menu = QtGui.QMenu(self.menubar)
self.menu.setObjectName(_fromUtf8("menu"))
self.menuLoad_Test_Cases = QtGui.QMenu(self.menu)
self.menuLoad_Test_Cases.setObjectName(_fromUtf8("menuLoad_Test_Cases"))
self.menuFLOPER = QtGui.QMenu(self.menubar)
self.menuFLOPER.setObjectName(_fromUtf8("menuFLOPER"))
self.menuHelp = QtGui.QMenu(self.menubar)
self.menuHelp.setObjectName(_fromUtf8("menuHelp"))
NeuroFloper.setMenuBar(self.menubar)
self.statusbar = QtGui.QStatusBar(NeuroFloper)
self.statusbar.setObjectName(_fromUtf8("statusbar"))
NeuroFloper.setStatusBar(self.statusbar)
self.actionLoad_Keras_Model = QtGui.QAction(NeuroFloper)
self.actionLoad_Keras_Model.setObjectName(_fromUtf8("actionLoad_Keras_Model"))
self.actionDelete_Model = QtGui.QAction(NeuroFloper)
self.actionDelete_Model.setObjectName(_fromUtf8("actionDelete_Model"))
self.actionExit = QtGui.QAction(NeuroFloper)
self.actionExit.setObjectName(_fromUtf8("actionExit"))
self.actionAbout = QtGui.QAction(NeuroFloper)
self.actionAbout.setObjectName(_fromUtf8("actionAbout"))
self.actionSave_as_FLOPER_program = QtGui.QAction(NeuroFloper)
self.actionSave_as_FLOPER_program.setObjectName(_fromUtf8("actionSave_as_FLOPER_program"))
self.actionEdit_FLOPER_program = QtGui.QAction(NeuroFloper)
self.actionEdit_FLOPER_program.setObjectName(_fromUtf8("actionEdit_FLOPER_program"))
self.actionTune_it = QtGui.QAction(NeuroFloper)
self.actionTune_it.setObjectName(_fromUtf8("actionTune_it"))
self.actionLoad_Test_Cases = QtGui.QAction(NeuroFloper)
self.actionLoad_Test_Cases.setObjectName(_fromUtf8("actionLoad_Test_Cases"))
self.actionFrom_csv = QtGui.QAction(NeuroFloper)
self.actionFrom_csv.setObjectName(_fromUtf8("actionFrom_csv"))
self.actionFrom_test = QtGui.QAction(NeuroFloper)
self.actionFrom_test.setObjectName(_fromUtf8("actionFrom_test"))
self.actionModify_Test_Cases = QtGui.QAction(NeuroFloper)
self.actionModify_Test_Cases.setObjectName(_fromUtf8("actionModify_Test_Cases"))
self.menuLoad_Test_Cases.addAction(self.actionFrom_csv)
self.menuLoad_Test_Cases.addAction(self.actionFrom_test)
self.menu.addAction(self.actionLoad_Keras_Model)
self.menu.addSeparator()
self.menu.addAction(self.menuLoad_Test_Cases.menuAction())
self.menu.addAction(self.actionModify_Test_Cases)
self.menu.addSeparator()
self.menu.addAction(self.actionDelete_Model)
self.menu.addAction(self.actionExit)
self.menuFLOPER.addAction(self.actionSave_as_FLOPER_program)
self.menuFLOPER.addAction(self.actionEdit_FLOPER_program)
self.menuFLOPER.addAction(self.actionTune_it)
self.menuHelp.addAction(self.actionAbout)
self.menubar.addAction(self.menu.menuAction())
self.menubar.addAction(self.menuFLOPER.menuAction())
self.menubar.addAction(self.menuHelp.menuAction())
self.retranslateUi(NeuroFloper)
QtCore.QMetaObject.connectSlotsByName(NeuroFloper)
def retranslateUi(self, NeuroFloper):
NeuroFloper.setWindowTitle(_translate("NeuroFloper", "Neuro-FLOPER", None))
self.label_2.setText(_translate("NeuroFloper", "General information for: testmodel1", None))
self.testlabel.setText(_translate("NeuroFloper", "No .test file loaded", None))
self.label_5.setText(_translate("NeuroFloper", "Nodes in output layer:", None))
self.label_3.setText(_translate("NeuroFloper", "Number of layers:", None))
self.label_4.setText(_translate("NeuroFloper", "Nodes in input layer:", None))
self.label_6.setText(_translate("NeuroFloper", "Activation functions:", None))
self.SaveFLOPER.setText(_translate("NeuroFloper", "Save as FLOPER program", None))
self.Tune.setText(_translate("NeuroFloper", "Tune it!", None))
self.menu.setTitle(_translate("NeuroFloper", "Main", None))
self.menuLoad_Test_Cases.setTitle(_translate("NeuroFloper", "Load Test Cases...", None))
self.menuFLOPER.setTitle(_translate("NeuroFloper", "FLOPER", None))
self.menuHelp.setTitle(_translate("NeuroFloper", "Help", None))
self.actionLoad_Keras_Model.setText(_translate("NeuroFloper", "Load Keras Model", None))
self.actionDelete_Model.setText(_translate("NeuroFloper", "Restore Default Configuration", None))
self.actionDelete_Model.setToolTip(_translate("NeuroFloper", "Restore Default Configuration", None))
self.actionExit.setText(_translate("NeuroFloper", "Exit", None))
self.actionAbout.setText(_translate("NeuroFloper", "About", None))
self.actionSave_as_FLOPER_program.setText(_translate("NeuroFloper", "Save as FLOPER program", None))
self.actionEdit_FLOPER_program.setText(_translate("NeuroFloper", "Edit FLOPER program", None))
self.actionTune_it.setText(_translate("NeuroFloper", "Tune it!", None))
self.actionLoad_Test_Cases.setText(_translate("NeuroFloper", "Load Test Cases", None))
self.actionFrom_csv.setText(_translate("NeuroFloper", "From .csv", None))
self.actionFrom_test.setText(_translate("NeuroFloper", "From .test", None))
self.actionModify_Test_Cases.setText(_translate("NeuroFloper", "Modify Test Cases", None))