Skip to content

Commit

Permalink
Merge pull request #5001 from janezd/remove-backward-gui-imports
Browse files Browse the repository at this point in the history
Gui: Remove backward-compatibility imports
  • Loading branch information
janezd committed Sep 25, 2020
2 parents c500dc8 + 804bac7 commit 9c07ac0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
8 changes: 0 additions & 8 deletions Orange/widgets/gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@
ControlGetter, VerticalScrollArea, ProgressBar,
ControlledCallback, ControlledCallFront, ValueCallback, connectControl,
)
# exposed for backcompat. Should not be imported from here, or not
# imported at all
from orangewidget.gui import (
SpinBoxWFocusOut, DoubleSpinBoxWFocusOut, LineEditWFocusOut, OrangeComboBox
) # pylint: disable=unused-import
from Orange.widgets.utils.buttons import (
VariableTextPushButton
) # pylint: disable=unused-import


try:
Expand Down
4 changes: 2 additions & 2 deletions Orange/widgets/unsupervised/owlouvainclustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,12 +124,12 @@ def __init__(self):
graph_box, self, "metric_idx", label="Distance metric",
items=[m[0] for m in METRICS], callback=self._invalidate_graph,
orientation=Qt.Horizontal,
) # type: gui.OrangeComboBox
)
self.k_neighbors_spin = gui.spin(
graph_box, self, "k_neighbors", minv=1, maxv=_MAX_K_NEIGBOURS,
label="k neighbors", controlWidth=80, alignment=Qt.AlignRight,
callback=self._invalidate_graph,
) # type: gui.SpinBoxWFocusOut
)
self.resolution_spin = gui.hSlider(
graph_box, self, "resolution", minValue=0, maxValue=5., step=1e-1,
label="Resolution", intOnly=False, labelFormat="%.1f",
Expand Down
4 changes: 2 additions & 2 deletions Orange/widgets/visualize/owpythagoreanforest.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,12 @@ def __init__(self):
box_display, self, 'target_class_index', label='Target class',
orientation=Qt.Horizontal, items=[], contentsLength=8,
searchable=True
) # type: gui.OrangeComboBox
)
self.ui_size_calc_combo = gui.comboBox(
box_display, self, 'size_calc_idx', label='Size',
orientation=Qt.Horizontal,
items=list(zip(*self.SIZE_CALCULATION))[0], contentsLength=8,
) # type: gui.OrangeComboBox
)
self.ui_zoom_slider = gui.hSlider(
box_display, self, 'zoom', label='Zoom', ticks=False, minValue=100,
maxValue=400, createLabel=False, intOnly=False,
Expand Down

0 comments on commit 9c07ac0

Please sign in to comment.