Commits

Aleš Erjavec committed f1cafef

Added a menu action to show the Report view.

Comments (0)

Files changed (2)

Orange/OrangeCanvas/application/canvasmain.py

                     triggered=self.show_output_view,
                     )
 
+        self.show_report_action = \
+            QAction(self.tr("Show Report View"), self,
+                    triggered=self.show_report_view
+                    )
+
         if sys.platform == "darwin":
             # Actions for native Mac OSX look and feel.
             self.minimize_action = \
         # Options menu
         self.options_menu = QMenu(self.tr("&Options"), self)
         self.options_menu.addAction(self.show_output_action)
+        self.options_menu.addAction(self.show_report_action)
 #        self.options_menu.addAction("Add-ons")
 #        self.options_menu.addAction("Developers")
 #        self.options_menu.addAction("Run Discovery")
         """
         self.output_dock.show()
 
+    def show_report_view(self):
+        doc = self.current_document()
+        scheme = doc.scheme()
+        scheme.show_report_view()
+
     def output_view(self):
         """Return the output text widget.
         """

Orange/OrangeCanvas/scheme/widgetsscheme.py

         log.debug("Scheme node properties sync (changed: %s)", changed)
         return changed
 
+    def show_report_view(self):
+        from OWReport import get_instance
+        inst = get_instance()
+        inst.show()
+        inst.raise_()
+
 
 class WidgetManager(QObject):
     """