Skip to content

Commit

Permalink
OWDataSet: Remove control area
Browse files Browse the repository at this point in the history
  • Loading branch information
janezd committed Oct 1, 2019
1 parent 05b3cdb commit 23be550
Showing 1 changed file with 6 additions and 16 deletions.
22 changes: 6 additions & 16 deletions Orange/widgets/data/owdatasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ class OWDataSets(OWWidget):
replaces = ["orangecontrib.prototypes.widgets.owdatasets.OWDataSets"]
keywords = ["online"]

want_control_area = False

# The following constants can be overridden in a subclass
# to reuse this widget for a different repository
# Take care when refactoring! (used in e.g. single-cell)
Expand Down Expand Up @@ -186,14 +188,8 @@ def __init__(self):

self.__awaiting_state = None # type: Optional[_FetchState]

box = gui.widgetBox(self.controlArea, "Info")

self.infolabel = QLabel(text="Initializing...\n\n")
box.layout().addWidget(self.infolabel)

gui.widgetLabel(self.mainArea, "Filter")
self.filterLineEdit = QLineEdit(
textChanged=self.filter
textChanged=self.filter, placeholderText="Search for data set ..."
)
self.mainArea.layout().addWidget(self.filterLineEdit)

Expand Down Expand Up @@ -233,8 +229,9 @@ def __init__(self):
setattr(self, "splitter_state", bytes(self.splitter.saveState()))
)
self.mainArea.layout().addWidget(self.splitter)
self.controlArea.layout().addStretch(10)
gui.auto_send(self.controlArea, self, "auto_commit")
box = gui.hBox(self.mainArea)
gui.rubber(box)
gui.auto_send(box, self, "auto_commit")

proxy = QSortFilterProxyModel()
proxy.setFilterKeyColumn(-1)
Expand Down Expand Up @@ -369,10 +366,6 @@ def __set_index(self, f):
header = self.view.header()
header.restoreState(self.header_state)

# Update the info text
self.infolabel.setText(
format_info(model.rowCount(), len(self.allinfo_local)))

if current_index != -1:
selmodel = self.view.selectionModel()
selmodel.select(
Expand All @@ -391,9 +384,6 @@ def __update_cached_state(self):
item.setData(" " if info.islocal else "", Qt.DisplayRole)
allinfo.append(info)

self.infolabel.setText(format_info(
model.rowCount(), sum(info.islocal for info in allinfo)))

def selected_dataset(self):
"""
Return the current selected dataset info or None if not selected
Expand Down

0 comments on commit 23be550

Please sign in to comment.