File qt_plot.py changed (mode: 100644) (index 151af7a..4201e2e) |
... |
... |
class SimplexEstimationWidget(pg.LayoutWidget): |
1301 |
1301 |
|
|
1302 |
1302 |
|
|
1303 |
1303 |
|
|
1304 |
|
|
|
1305 |
|
class FastSimplexEstimationWidget(pg.LayoutWidget): |
|
|
1304 |
|
class FastSimplexEstimationWidget(QtGui.QSplitter): |
1306 |
1305 |
# I'd like to get access to the samplebox stuff via the container's reference, |
# I'd like to get access to the samplebox stuff via the container's reference, |
1307 |
1306 |
def __init__(self, samplebox_item, parent=None, *args, **kwargs): |
def __init__(self, samplebox_item, parent=None, *args, **kwargs): |
1308 |
1307 |
super().__init__(parent) |
super().__init__(parent) |
|
... |
... |
class FastSimplexEstimationWidget(pg.LayoutWidget): |
1317 |
1316 |
self.setup() |
self.setup() |
1318 |
1317 |
|
|
1319 |
1318 |
def setup(self): |
def setup(self): |
|
1319 |
|
self.setOrientation(QtCore.Qt.Vertical) |
|
1320 |
|
self.layout = pg.LayoutWidget(self) |
1320 |
1321 |
params = list() |
params = list() |
1321 |
1322 |
params.append({'name': 'method', 'type': 'list', 'values': ['fast', 'full'], 'value': 'fast'}) |
params.append({'name': 'method', 'type': 'list', 'values': ['fast', 'full'], 'value': 'fast'}) |
1322 |
1323 |
params.append({'name': 'model space', 'type': 'list', 'values': self.sb_item.spaces, 'value': 'Rn'}) |
params.append({'name': 'model space', 'type': 'list', 'values': self.sb_item.spaces, 'value': 'Rn'}) |
|
... |
... |
class FastSimplexEstimationWidget(pg.LayoutWidget): |
1353 |
1354 |
self.ptree = pg.parametertree.ParameterTree() |
self.ptree = pg.parametertree.ParameterTree() |
1354 |
1355 |
self.ptree.setParameters(self.param, showTop=False) |
self.ptree.setParameters(self.param, showTop=False) |
1355 |
1356 |
|
|
1356 |
|
self.addWidget(self.ptree, row=0, col=0, colspan=3) |
|
|
1357 |
|
self.layout.addWidget(self.ptree, row=0, col=0, colspan=3) |
1357 |
1358 |
|
|
1358 |
1359 |
|
|
1359 |
1360 |
|
|
1360 |
1361 |
self.btn = QtGui.QPushButton('estimate') |
self.btn = QtGui.QPushButton('estimate') |
1361 |
|
self.addWidget(self.btn, row=1, col=0) |
|
|
1362 |
|
self.layout.addWidget(self.btn, row=1, col=0) |
1362 |
1363 |
self.btn.clicked.connect(self.run_stm) |
self.btn.clicked.connect(self.run_stm) |
1363 |
1364 |
|
|
1364 |
1365 |
self.btn2 = QtGui.QPushButton('redraw') |
self.btn2 = QtGui.QPushButton('redraw') |
1365 |
|
self.addWidget(self.btn2, row=1, col=1) |
|
|
1366 |
|
self.layout.addWidget(self.btn2, row=1, col=1) |
1366 |
1367 |
self.btn2.clicked.connect(self.recolor) |
self.btn2.clicked.connect(self.recolor) |
1367 |
1368 |
|
|
1368 |
1369 |
self.btn3 = QtGui.QPushButton('hide') |
self.btn3 = QtGui.QPushButton('hide') |
1369 |
|
self.addWidget(self.btn3, row=1, col=2) |
|
|
1370 |
|
self.layout.addWidget(self.btn3, row=1, col=2) |
1370 |
1371 |
self.btn3.clicked.connect(self.hide) |
self.btn3.clicked.connect(self.hide) |
1371 |
1372 |
|
|
|
1373 |
|
self.addWidget(self.layout) |
|
1374 |
|
|
1372 |
1375 |
self.table = pg.TableWidget(sortable=False) |
self.table = pg.TableWidget(sortable=False) |
1373 |
|
self.addWidget(self.table, row=2, col=0, colspan=3) |
|
|
1376 |
|
self.addWidget(self.table) |
1374 |
1377 |
|
|
1375 |
1378 |
|
|
1376 |
1379 |
|
|
|
... |
... |
class FastSimplexEstimationWidget(pg.LayoutWidget): |
1606 |
1609 |
|
|
1607 |
1610 |
|
|
1608 |
1611 |
|
|
1609 |
|
class VoronoiEstimationWidget(pg.LayoutWidget): |
|
|
1612 |
|
class VoronoiEstimationWidget(QtGui.QSplitter): |
1610 |
1613 |
""" |
""" |
1611 |
1614 |
addLabel(text=' ', row=None, col=None, rowspan=1, colspan=1, **kargs) |
addLabel(text=' ', row=None, col=None, rowspan=1, colspan=1, **kargs) |
1612 |
1615 |
""" |
""" |
|
... |
... |
class VoronoiEstimationWidget(pg.LayoutWidget): |
1626 |
1629 |
|
|
1627 |
1630 |
# INHERETED by gl_plot |
# INHERETED by gl_plot |
1628 |
1631 |
def setup(self): |
def setup(self): |
|
1632 |
|
self.setOrientation(QtCore.Qt.Vertical) |
|
1633 |
|
self.layout = pg.LayoutWidget(self) |
1629 |
1634 |
# model_space='Rn', sampling_space=None, p_norm=1, budget=20000 |
# model_space='Rn', sampling_space=None, p_norm=1, budget=20000 |
1630 |
1635 |
params = [{'name': 'method', 'type': 'list', 'values': ['Voronoi_tesselation','Voronoi_2_point_estimation'], 'value': 'Voronoi_2_point_estimation'}] |
params = [{'name': 'method', 'type': 'list', 'values': ['Voronoi_tesselation','Voronoi_2_point_estimation'], 'value': 'Voronoi_2_point_estimation'}] |
1631 |
1636 |
params.append({'name': 'model space', 'type': 'list', 'values': self.sb_item.spaces, 'value': 'Rn'}) |
params.append({'name': 'model space', 'type': 'list', 'values': self.sb_item.spaces, 'value': 'Rn'}) |
|
... |
... |
class VoronoiEstimationWidget(pg.LayoutWidget): |
1649 |
1654 |
self.ptree = pg.parametertree.ParameterTree() |
self.ptree = pg.parametertree.ParameterTree() |
1650 |
1655 |
self.ptree.setParameters(self.param, showTop=False) |
self.ptree.setParameters(self.param, showTop=False) |
1651 |
1656 |
|
|
1652 |
|
self.addWidget(self.ptree, row=0, col=0, colspan=3) |
|
|
1657 |
|
self.layout.addWidget(self.ptree, row=0, col=0, colspan=3) |
1653 |
1658 |
|
|
1654 |
1659 |
|
|
1655 |
1660 |
self.btn = QtGui.QPushButton('estimate') |
self.btn = QtGui.QPushButton('estimate') |
1656 |
|
self.addWidget(self.btn, row=1, col=0) |
|
|
1661 |
|
self.layout.addWidget(self.btn, row=1, col=0) |
1657 |
1662 |
self.btn.clicked.connect(self.run_stm) |
self.btn.clicked.connect(self.run_stm) |
1658 |
1663 |
|
|
1659 |
1664 |
self.btn2 = QtGui.QPushButton('redraw') |
self.btn2 = QtGui.QPushButton('redraw') |
1660 |
|
self.addWidget(self.btn2, row=1, col=1) |
|
|
1665 |
|
self.layout.addWidget(self.btn2, row=1, col=1) |
1661 |
1666 |
self.btn2.clicked.connect(self.recolor) |
self.btn2.clicked.connect(self.recolor) |
1662 |
1667 |
|
|
1663 |
1668 |
self.btn3 = QtGui.QPushButton('hide') |
self.btn3 = QtGui.QPushButton('hide') |
1664 |
|
self.addWidget(self.btn3, row=1, col=2) |
|
|
1669 |
|
self.layout.addWidget(self.btn3, row=1, col=2) |
1665 |
1670 |
self.btn3.clicked.connect(self.hide) |
self.btn3.clicked.connect(self.hide) |
1666 |
1671 |
|
|
1667 |
|
# self.autorun = QtGui.QCheckBox('Run with the box') |
|
1668 |
|
# self.addWidget(self.autorun, row=1, col=1) |
|
|
1672 |
|
self.addWidget(self.layout) |
1669 |
1673 |
|
|
1670 |
1674 |
self.table = pg.TableWidget(sortable=False) |
self.table = pg.TableWidget(sortable=False) |
1671 |
|
self.addWidget(self.table, row=2, col=0, colspan=3) |
|
|
1675 |
|
self.addWidget(self.table) |
1672 |
1676 |
|
|
1673 |
1677 |
# pro začatek postačí |
# pro začatek postačí |
1674 |
1678 |
self.cells = [] |
self.cells = [] |