コード例 #1
0
ファイル: MainWindow.py プロジェクト: Mvedrines/Pythagora
 def toggleHideRestore(self):
     '''Show or hide the window based on some parameters. We can detect
     when we are obscured and come to the top. In other cases we hide if
     mapped and show if not.
     '''
     if KDE:
         if KWindowSystem.activeWindow() == self.winId() and self.isVisible():
             self.hide()
         else:
             self.show()
             KWindowSystem.forceActiveWindow(self.winId())
     else:
         if self.isVisible():
             self.hide()
         else: self.show()
コード例 #2
0
 def toggleHideRestore(self):
     '''Show or hide the window based on some parameters. We can detect
     when we are obscured and come to the top. In other cases we hide if
     mapped and show if not.
     '''
     if KDE:
         if KWindowSystem.activeWindow() == self.winId() and self.isVisible(
         ):
             self.hide()
         else:
             self.show()
             KWindowSystem.forceActiveWindow(self.winId())
     else:
         if self.isVisible():
             self.hide()
         else:
             self.show()