File wellmet/qt_gui/qt_gui.py changed (mode: 100644) (index 8cebfb0..245cbb0) |
... |
... |
class QtGuiWindow(QtWidgets.QMainWindow): |
75 |
75 |
self.file_menu = self.bar.addMenu("File") |
self.file_menu = self.bar.addMenu("File") |
76 |
76 |
#č kontejner jen aby Python mně Cečkové objekty nevymazal |
#č kontejner jen aby Python mně Cečkové objekty nevymazal |
77 |
77 |
self.file_actions = [] |
self.file_actions = [] |
78 |
|
load_coordinates_action = QtGui.QAction("Load coordinates", self) |
|
|
78 |
|
load_coordinates_action = QtGui.QAction("Load coordinates...", self) |
79 |
79 |
load_coordinates_action.triggered.connect(self.load_coordinates) |
load_coordinates_action.triggered.connect(self.load_coordinates) |
80 |
80 |
self.file_menu.addAction(load_coordinates_action) |
self.file_menu.addAction(load_coordinates_action) |
81 |
81 |
self.file_actions.append(load_coordinates_action) |
self.file_actions.append(load_coordinates_action) |
82 |
82 |
|
|
83 |
|
export_coordinates_action = QtGui.QAction("Export coordinates", self) |
|
|
83 |
|
export_coordinates_action = QtGui.QAction("Export coordinates...", self) |
84 |
84 |
export_coordinates_action.triggered.connect(self.export_coordinates) |
export_coordinates_action.triggered.connect(self.export_coordinates) |
85 |
85 |
self.file_menu.addAction(export_coordinates_action) |
self.file_menu.addAction(export_coordinates_action) |
86 |
86 |
self.file_actions.append(export_coordinates_action) |
self.file_actions.append(export_coordinates_action) |
87 |
87 |
|
|
88 |
|
import_samples_action = QtGui.QAction("Import samples", self) |
|
|
88 |
|
import_samples_action = QtGui.QAction("Import samples...", self) |
89 |
89 |
import_samples_action.triggered.connect(self.import_samples) |
import_samples_action.triggered.connect(self.import_samples) |
90 |
90 |
self.file_menu.addAction(import_samples_action) |
self.file_menu.addAction(import_samples_action) |
91 |
91 |
self.file_actions.append(import_samples_action) |
self.file_actions.append(import_samples_action) |
92 |
92 |
|
|
93 |
|
export_samples_action = QtGui.QAction("Export samples", self) |
|
|
93 |
|
export_samples_action = QtGui.QAction("Export samples...", self) |
94 |
94 |
export_samples_action.triggered.connect(self.export_samples) |
export_samples_action.triggered.connect(self.export_samples) |
95 |
95 |
self.file_menu.addAction(export_samples_action) |
self.file_menu.addAction(export_samples_action) |
96 |
96 |
self.file_actions.append(export_samples_action) |
self.file_actions.append(export_samples_action) |
|
... |
... |
class QtGuiWindow(QtWidgets.QMainWindow): |
98 |
98 |
self.view = self.bar.addMenu("View") |
self.view = self.bar.addMenu("View") |
99 |
99 |
|
|
100 |
100 |
self.graph_menu = self.bar.addMenu("Box") |
self.graph_menu = self.bar.addMenu("Box") |
101 |
|
self.add_random_points_action = QtGui.QAction("Add random points", self) |
|
|
101 |
|
self.add_random_points_action = QtGui.QAction("Add random points...", self) |
102 |
102 |
self.add_random_points_action.triggered.connect(self.add_random_points) |
self.add_random_points_action.triggered.connect(self.add_random_points) |
103 |
103 |
self.graph_menu.addAction(self.add_random_points_action) |
self.graph_menu.addAction(self.add_random_points_action) |
104 |
|
self.batch_run_action = QtGui.QAction("Batch run", self) |
|
|
104 |
|
self.batch_run_action = QtGui.QAction("Batch run...", self) |
105 |
105 |
self.batch_run_action.triggered.connect(self.batch_run) |
self.batch_run_action.triggered.connect(self.batch_run) |
106 |
106 |
self.graph_menu.addAction(self.batch_run_action) |
self.graph_menu.addAction(self.batch_run_action) |
107 |
107 |
self.gen_dmatrix_action = QtGui.QAction("Matrix view...", self) |
self.gen_dmatrix_action = QtGui.QAction("Matrix view...", self) |
|
... |
... |
class QtGuiWindow(QtWidgets.QMainWindow): |
199 |
199 |
# self.btn2 = QtWidgets.QPushButton('connect/disconnect') |
# self.btn2 = QtWidgets.QPushButton('connect/disconnect') |
200 |
200 |
# self.btn2.setCheckable(True) |
# self.btn2.setCheckable(True) |
201 |
201 |
# self.btn2.clicked.connect(self.bx_connect) |
# self.btn2.clicked.connect(self.bx_connect) |
|
202 |
|
self.batch_btn = QtWidgets.QPushButton('batch run...') |
|
203 |
|
self.batch_btn.clicked.connect(self.batch_run) |
202 |
204 |
|
|
203 |
205 |
self.btn3 = QtWidgets.QPushButton('redraw') |
self.btn3 = QtWidgets.QPushButton('redraw') |
204 |
206 |
self.btn3.clicked.connect(lambda:self.redraw_called.emit()) |
self.btn3.clicked.connect(lambda:self.redraw_called.emit()) |
|
... |
... |
class QtGuiWindow(QtWidgets.QMainWindow): |
218 |
220 |
self.layout.addWidget(self.slider, 0, 1) |
self.layout.addWidget(self.slider, 0, 1) |
219 |
221 |
self.layout.addWidget(self.label_nsim, 0, 2) |
self.layout.addWidget(self.label_nsim, 0, 2) |
220 |
222 |
self.layout.addWidget(self.btn, 0, 3) |
self.layout.addWidget(self.btn, 0, 3) |
221 |
|
#self.layout.addWidget(self.btn2, 0, 4) |
|
222 |
|
self.layout.addWidget(self.btn3, 0, 4) |
|
223 |
|
self.layout.addWidget(self.central_widget, 1, 0, 1, 5) |
|
|
223 |
|
self.layout.addWidget(self.batch_btn, 0, 4) |
|
224 |
|
self.layout.addWidget(self.btn3, 0, 5) |
|
225 |
|
self.layout.addWidget(self.central_widget, 1, 0, 1, 6) |
224 |
226 |
|
|
225 |
227 |
|
|
226 |
228 |
|
|
|
... |
... |
class QtGuiWindow(QtWidgets.QMainWindow): |
317 |
319 |
self.tabifyDockWidget(self.dockables[0], dock) |
self.tabifyDockWidget(self.dockables[0], dock) |
318 |
320 |
else: |
else: |
319 |
321 |
pf_exact = -1 |
pf_exact = -1 |
|
322 |
|
|
|
323 |
|
#dock = QtWidgets.QDockWidget("Voronoi estimation graph", self) |
|
324 |
|
#dock.setWidget(gw.VoronoiEstimationGraph(self.sample_box, self, dock)) |
|
325 |
|
#self.dockables.append(dock) |
|
326 |
|
#self.tabifyDockWidget(self.dockables[0], dock) |
|
327 |
|
|
|
328 |
|
|
|
329 |
|
dock = QtWidgets.QDockWidget("GRaph", self) |
|
330 |
|
dock.setWidget(gw.GRaph(self, self.box_estimation_data, dock)) |
|
331 |
|
self.dockables.append(dock) |
|
332 |
|
self.tabifyDockWidget(self.dockables[0], dock) |
320 |
333 |
|
|
321 |
334 |
dock = QtWidgets.QDockWidget("Estimation graph", self) |
dock = QtWidgets.QDockWidget("Estimation graph", self) |
322 |
335 |
widget = gw.EstimationGraph(pf_exact, self.box_estimation_data, dock) |
widget = gw.EstimationGraph(pf_exact, self.box_estimation_data, dock) |
|
... |
... |
class QtGuiWindow(QtWidgets.QMainWindow): |
324 |
337 |
self.dockables.append(dock) |
self.dockables.append(dock) |
325 |
338 |
self.tabifyDockWidget(self.dockables[0], dock) |
self.tabifyDockWidget(self.dockables[0], dock) |
326 |
339 |
|
|
327 |
|
|
|
328 |
|
dock = QtWidgets.QDockWidget("Voronoi estimation graph", self) |
|
329 |
|
dock.setWidget(gw.VoronoiEstimationGraph(self.sample_box, self, dock)) |
|
330 |
|
self.dockables.append(dock) |
|
331 |
|
self.tabifyDockWidget(self.dockables[0], dock) |
|
332 |
|
|
|
333 |
|
dock = QtWidgets.QDockWidget("GRaph", self) |
|
334 |
|
dock.setWidget(gw.GRaph(self, self.box_estimation_data, dock)) |
|
335 |
|
self.dockables.append(dock) |
|
336 |
|
self.tabifyDockWidget(self.dockables[0], dock) |
|
337 |
340 |
|
|
338 |
341 |
csv_filter = "CSV files (*.csv)" |
csv_filter = "CSV files (*.csv)" |
339 |
342 |
npy_filter = "NumPy binary files (*.npy)" |
npy_filter = "NumPy binary files (*.npy)" |