示例#1
0
 def visibility_changed(self, enable):
     """DockWidget visibility has changed"""
     if enable:
         self.dockwidget.raise_()
         widget = self.get_focus_widget()
         if widget is not None:
             widget.setFocus()
     visible = self.dockwidget.isVisible() or self.ismaximized
     toggle_actions(self.menu_actions, visible)
     toggle_actions(self.toolbar_actions, visible)
     if visible:
         self.refresh() #XXX Is it a good idea?
示例#2
0
 def visibility_changed(self, enable):
     """DockWidget visibility has changed"""
     if enable:
         self.dockwidget.raise_()
         widget = self.get_focus_widget()
         if widget is not None:
             widget.setFocus()
     visible = self.dockwidget.isVisible() or self.ismaximized
     if self.DISABLE_ACTIONS_WHEN_HIDDEN:
         toggle_actions(self.plugin_actions, visible)
     self.isvisible = enable and visible
     if self.isvisible:
         self.refresh_plugin()   # To give focus to the plugin's widget
示例#3
0
 def visibility_changed(self, enable):
     """DockWidget visibility has changed"""
     if enable:
         self.dockwidget.raise_()
         widget = self.get_focus_widget()
         if widget is not None:
             widget.setFocus()
     visible = self.dockwidget.isVisible() or self.ismaximized
     if self.DISABLE_ACTIONS_WHEN_HIDDEN:
         toggle_actions(self.plugin_actions, visible)
     self.isvisible = enable and visible
     if self.isvisible:
         self.refresh_plugin()  # To give focus to the plugin's widget