|
29 | 29 |
|
30 | 30 | from Orange.misc.environ import data_dir |
31 | 31 | from Orange.widgets import widget, settings, gui |
| 32 | +from Orange.widgets.utils.signals import Output |
32 | 33 | from Orange.widgets.widget import Msg |
33 | 34 |
|
34 | 35 | INDEX_URL = "http://datasets.orange.biolab.si/" |
@@ -118,7 +119,8 @@ class Warning(widget.OWWidget.Warning): |
118 | 119 | only_local_datasets = Msg("Could not fetch data sets list, only local " |
119 | 120 | "cached data sets are shown") |
120 | 121 |
|
121 | | - outputs = [("Data", Orange.data.Table)] |
| 122 | + class Outputs: |
| 123 | + data = Output("Data", Orange.data.Table) |
122 | 124 |
|
123 | 125 | #: Selected data set id |
124 | 126 | selected_id = settings.Setting(None) # type: Optional[Tuple[str, str]] |
@@ -404,7 +406,7 @@ def commit(self): |
404 | 406 | self.setBlocking(False) |
405 | 407 | self.commit_cached(di.prefix, di.filename) |
406 | 408 | else: |
407 | | - self.send("Data", None) |
| 409 | + self.Outputs.data.send(None) |
408 | 410 |
|
409 | 411 | @Slot(object) |
410 | 412 | def __commit_complete(self, f): |
@@ -434,11 +436,11 @@ def __commit_complete(self, f): |
434 | 436 | data = Orange.data.Table(path) |
435 | 437 | else: |
436 | 438 | data = None |
437 | | - self.send("Data", data) |
| 439 | + self.Outputs.data.send(data) |
438 | 440 |
|
439 | 441 | def commit_cached(self, prefix, filename): |
440 | 442 | path = LocalFiles(local_cache_path()).localpath(prefix, filename) |
441 | | - self.send("Data", Orange.data.Table(path)) |
| 443 | + self.Outputs.data.send(Orange.data.Table(path)) |
442 | 444 |
|
443 | 445 | @Slot() |
444 | 446 | def __progress_advance(self): |
|
0 commit comments