UI/UserInterface.py

changeset 4083
4418377391bc
parent 4079
a3319822d303
child 4107
501c964e20e7
equal deleted inserted replaced
4082:48d503f74963 4083:4418377391bc
716 UI.PixmapCache.getIcon("task.png"), 716 UI.PixmapCache.getIcon("task.png"),
717 self.tr("Task-Viewer")) 717 self.tr("Task-Viewer"))
718 718
719 # Create the log viewer part of the user interface 719 # Create the log viewer part of the user interface
720 from .LogView import LogViewer 720 from .LogView import LogViewer
721 self.logViewer = LogViewer() 721 self.logViewer = LogViewer(self)
722 self.hToolbox.addItem(self.logViewer, 722 self.hToolbox.addItem(self.logViewer,
723 UI.PixmapCache.getIcon("logViewer.png"), 723 UI.PixmapCache.getIcon("logViewer.png"),
724 self.tr("Log-Viewer")) 724 self.tr("Log-Viewer"))
725 725
726 if self.embeddedShell: 726 if self.embeddedShell:
846 self.tr("Task-Viewer")) 846 self.tr("Task-Viewer"))
847 847
848 # Create the log viewer part of the user interface 848 # Create the log viewer part of the user interface
849 logging.debug("Creating Log Viewer...") 849 logging.debug("Creating Log Viewer...")
850 from .LogView import LogViewer 850 from .LogView import LogViewer
851 self.logViewer = LogViewer() 851 self.logViewer = LogViewer(self)
852 self.bottomSidebar.addTab(self.logViewer, 852 self.bottomSidebar.addTab(self.logViewer,
853 UI.PixmapCache.getIcon("logViewer.png"), 853 UI.PixmapCache.getIcon("logViewer.png"),
854 self.tr("Log-Viewer")) 854 self.tr("Log-Viewer"))
855 855
856 if self.embeddedShell: 856 if self.embeddedShell:
979 self.rightSidebar]: 979 self.rightSidebar]:
980 index = container.indexOf(widget) 980 index = container.indexOf(widget)
981 if index != -1: 981 if index != -1:
982 container.removeTab(index) 982 container.removeTab(index)
983 983
984 def showLogTab(self, tabname): 984 def showLogViewer(self):
985 """ 985 """
986 Public method to show a particular Log-Viewer tab. 986 Public method to show the Log-Viewer.
987
988 @param tabname string naming the tab to be shown (string)
989 """ 987 """
990 if Preferences.getUI("LogViewerAutoRaise"): 988 if Preferences.getUI("LogViewerAutoRaise"):
991 if self.layoutType == "Toolboxes": 989 if self.layoutType == "Toolboxes":
992 self.hToolboxDock.show() 990 self.hToolboxDock.show()
993 self.hToolbox.setCurrentWidget(self.logViewer) 991 self.hToolbox.setCurrentWidget(self.logViewer)
5624 """ 5622 """
5625 Public slot to append text to the stdout log viewer tab. 5623 Public slot to append text to the stdout log viewer tab.
5626 5624
5627 @param s output to be appended (string) 5625 @param s output to be appended (string)
5628 """ 5626 """
5629 self.showLogTab("stdout")
5630 self.appendStdout.emit(s) 5627 self.appendStdout.emit(s)
5631 5628
5632 def appendToStderr(self, s): 5629 def appendToStderr(self, s):
5633 """ 5630 """
5634 Public slot to append text to the stderr log viewer tab. 5631 Public slot to append text to the stderr log viewer tab.
5635 5632
5636 @param s output to be appended (string) 5633 @param s output to be appended (string)
5637 """ 5634 """
5638 self.showLogTab("stderr")
5639 self.appendStderr.emit(s) 5635 self.appendStderr.emit(s)
5640 5636
5641 ########################################################## 5637 ##########################################################
5642 ## Below are slots needed by the plugin menu 5638 ## Below are slots needed by the plugin menu
5643 ########################################################## 5639 ##########################################################

eric ide

mercurial