Skip to content

Commit 0335134

Browse files
committed
add modify button and corresponding logic for dataslots; refactir analysis gui
1 parent a14687d commit 0335134

20 files changed

+596
-74
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
- fix regression with isoelastics in QuickView
33
- fix display of features as hue
44
- functionalize plotting panel
5+
- add modify button and corresponding logic for dataslots
6+
- refactor analysis view into separate submodule
57
2.0.0a20
68
- fix missing source files in previous release
79
2.0.0a19

shapeout2/gui/analysis/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .ana_filter import FilterPanel # noqa: F401
2+
from .ana_meta import MetaPanel # noqa: F401
3+
from .ana_plot import PlotPanel # noqa: F401
4+
from .ana_slot import SlotPanel # noqa: F401
5+
from .ana_view import AnalysisView # noqa: F401
Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44

55
import dclab
66

7-
from ..pipeline import Filter
7+
from ...pipeline import Filter
88

9-
from . import rangecontrol
10-
from . import idiom
9+
from .. import rangecontrol
10+
from .. import idiom
1111

1212
# features shown by default
1313
SHOW_FEATURES = ["deform", "area_um", "bright_avg"]
@@ -20,7 +20,7 @@ class FilterPanel(QtWidgets.QWidget):
2020
def __init__(self, *args, **kwargs):
2121
QtWidgets.QWidget.__init__(self)
2222
path_ui = pkg_resources.resource_filename(
23-
"shapeout2.gui", "ana_filter.ui")
23+
"shapeout2.gui.analysis", "ana_filter.ui")
2424
uic.loadUi(path_ui, self)
2525
self.setUpdatesEnabled(False)
2626
self._init_box_filters()
@@ -108,7 +108,7 @@ def current_filter(self):
108108

109109
@property
110110
def filter_ids(self):
111-
"""List of filter names"""
111+
"""List of filter identifiers"""
112112
return sorted(Filter.get_instances().keys())
113113

114114
@property
@@ -159,7 +159,6 @@ def update_content(self, event=None, filt_index=None):
159159
self.setEnabled(True)
160160
# update combobox
161161
self.comboBox_filters.blockSignals(True)
162-
# this also updates the combobox
163162
if filt_index is None:
164163
filt_index = self.comboBox_filters.currentIndex()
165164
if filt_index > len(self.filter_ids) - 1 or filt_index < 0:
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,8 @@ class MetaPanel(QtWidgets.QWidget):
77
def __init__(self, *args, **kwargs):
88
QtWidgets.QWidget.__init__(self)
99
path_ui = pkg_resources.resource_filename(
10-
"shapeout2.gui", "ana_meta.ui")
10+
"shapeout2.gui.analysis", "ana_meta.ui")
1111
uic.loadUi(path_ui, self)
12+
13+
def update_content(self):
14+
pass
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import numpy as np
55
from PyQt5 import uic, QtCore, QtWidgets
66

7-
from ..pipeline import Plot
8-
from ..pipeline.plot import STATE_OPTIONS
7+
from ...pipeline import Plot
8+
from ...pipeline.plot import STATE_OPTIONS
99

1010

1111
COLORMAPS = ["jet"]
@@ -18,7 +18,7 @@ class PlotPanel(QtWidgets.QWidget):
1818
def __init__(self, *args, **kwargs):
1919
QtWidgets.QWidget.__init__(self)
2020
path_ui = pkg_resources.resource_filename(
21-
"shapeout2.gui", "ana_plot.ui")
21+
"shapeout2.gui.analysis", "ana_plot.ui")
2222
uic.loadUi(path_ui, self)
2323

2424
# current Shape-Out 2 pipeline
Lines changed: 100 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<x>0</x>
88
<y>0</y>
99
<width>627</width>
10-
<height>681</height>
10+
<height>796</height>
1111
</rect>
1212
</property>
1313
<property name="windowTitle">
@@ -105,24 +105,7 @@
105105
</item>
106106
<item>
107107
<layout class="QGridLayout" name="gridLayout">
108-
<item row="3" column="1">
109-
<widget class="RangeControl" name="widget_range_y" native="true">
110-
<property name="minimumSize">
111-
<size>
112-
<width>0</width>
113-
<height>25</height>
114-
</size>
115-
</property>
116-
</widget>
117-
</item>
118-
<item row="2" column="0">
119-
<widget class="QLabel" name="label_7">
120-
<property name="text">
121-
<string>Y axis</string>
122-
</property>
123-
</widget>
124-
</item>
125-
<item row="4" column="0">
108+
<item row="5" column="0">
126109
<widget class="QLabel" name="label_9">
127110
<property name="toolTip">
128111
<string>Kernel Density Estimator</string>
@@ -133,22 +116,15 @@
133116
</widget>
134117
</item>
135118
<item row="1" column="1">
136-
<widget class="RangeControl" name="widget_range_x" native="true">
137-
<property name="minimumSize">
138-
<size>
139-
<width>0</width>
140-
<height>25</height>
141-
</size>
119+
<layout class="QHBoxLayout" name="horizontalLayout_7">
120+
<property name="rightMargin">
121+
<number>0</number>
142122
</property>
143-
</widget>
144-
</item>
145-
<item row="2" column="1">
146-
<layout class="QHBoxLayout" name="horizontalLayout_8">
147123
<item>
148-
<widget class="QComboBox" name="comboBox_axis_y"/>
124+
<widget class="QComboBox" name="comboBox_axis_x"/>
149125
</item>
150126
<item>
151-
<widget class="QComboBox" name="comboBox_scale_y">
127+
<widget class="QComboBox" name="comboBox_scale_x">
152128
<item>
153129
<property name="text">
154130
<string>linear</string>
@@ -162,7 +138,7 @@
162138
</widget>
163139
</item>
164140
<item>
165-
<spacer name="horizontalSpacer_11">
141+
<spacer name="horizontalSpacer_3">
166142
<property name="orientation">
167143
<enum>Qt::Horizontal</enum>
168144
</property>
@@ -176,23 +152,20 @@
176152
</item>
177153
</layout>
178154
</item>
179-
<item row="0" column="0">
155+
<item row="1" column="0">
180156
<widget class="QLabel" name="label_6">
181157
<property name="text">
182158
<string>X axis</string>
183159
</property>
184160
</widget>
185161
</item>
186-
<item row="0" column="1">
187-
<layout class="QHBoxLayout" name="horizontalLayout_7">
188-
<property name="rightMargin">
189-
<number>0</number>
190-
</property>
162+
<item row="3" column="1">
163+
<layout class="QHBoxLayout" name="horizontalLayout_8">
191164
<item>
192-
<widget class="QComboBox" name="comboBox_axis_x"/>
165+
<widget class="QComboBox" name="comboBox_axis_y"/>
193166
</item>
194167
<item>
195-
<widget class="QComboBox" name="comboBox_scale_x">
168+
<widget class="QComboBox" name="comboBox_scale_y">
196169
<item>
197170
<property name="text">
198171
<string>linear</string>
@@ -206,7 +179,7 @@
206179
</widget>
207180
</item>
208181
<item>
209-
<spacer name="horizontalSpacer_3">
182+
<spacer name="horizontalSpacer_11">
210183
<property name="orientation">
211184
<enum>Qt::Horizontal</enum>
212185
</property>
@@ -220,7 +193,14 @@
220193
</item>
221194
</layout>
222195
</item>
223-
<item row="4" column="1">
196+
<item row="3" column="0">
197+
<widget class="QLabel" name="label_7">
198+
<property name="text">
199+
<string>Y axis</string>
200+
</property>
201+
</widget>
202+
</item>
203+
<item row="5" column="1">
224204
<layout class="QHBoxLayout" name="horizontalLayout_10">
225205
<item>
226206
<widget class="QComboBox" name="comboBox_kde">
@@ -246,6 +226,84 @@
246226
</item>
247227
</layout>
248228
</item>
229+
<item row="2" column="1">
230+
<widget class="RangeControl" name="widget_range_x" native="true">
231+
<property name="minimumSize">
232+
<size>
233+
<width>0</width>
234+
<height>25</height>
235+
</size>
236+
</property>
237+
</widget>
238+
</item>
239+
<item row="4" column="1">
240+
<widget class="RangeControl" name="widget_range_y" native="true">
241+
<property name="minimumSize">
242+
<size>
243+
<width>0</width>
244+
<height>25</height>
245+
</size>
246+
</property>
247+
</widget>
248+
</item>
249+
<item row="0" column="0">
250+
<widget class="QLabel" name="label_3">
251+
<property name="text">
252+
<string>Style</string>
253+
</property>
254+
</widget>
255+
</item>
256+
<item row="0" column="1">
257+
<layout class="QHBoxLayout" name="horizontalLayout_11">
258+
<item>
259+
<widget class="QComboBox" name="comboBox">
260+
<item>
261+
<property name="text">
262+
<string>Multiple Plots</string>
263+
</property>
264+
</item>
265+
<item>
266+
<property name="text">
267+
<string>Joint Plot</string>
268+
</property>
269+
</item>
270+
</widget>
271+
</item>
272+
<item>
273+
<widget class="QSpinBox" name="spinBox">
274+
<property name="suffix">
275+
<string> row(s)</string>
276+
</property>
277+
<property name="minimum">
278+
<number>1</number>
279+
</property>
280+
</widget>
281+
</item>
282+
<item>
283+
<widget class="QSpinBox" name="spinBox_2">
284+
<property name="suffix">
285+
<string> column(s)</string>
286+
</property>
287+
<property name="minimum">
288+
<number>1</number>
289+
</property>
290+
</widget>
291+
</item>
292+
<item>
293+
<spacer name="horizontalSpacer_13">
294+
<property name="orientation">
295+
<enum>Qt::Horizontal</enum>
296+
</property>
297+
<property name="sizeHint" stdset="0">
298+
<size>
299+
<width>0</width>
300+
<height>20</height>
301+
</size>
302+
</property>
303+
</spacer>
304+
</item>
305+
</layout>
306+
</item>
249307
</layout>
250308
</item>
251309
<item>
@@ -364,13 +422,6 @@
364422
</item>
365423
</layout>
366424
</item>
367-
<item>
368-
<layout class="QVBoxLayout" name="verticalLayout_range_controls">
369-
<property name="topMargin">
370-
<number>0</number>
371-
</property>
372-
</layout>
373-
</item>
374425
<item>
375426
<widget class="QGroupBox" name="groupBox_scatter">
376427
<property name="title">

0 commit comments

Comments
 (0)