Esempio n. 1
0
 def setViewMenu(self, action=None):
     print 'In AlarmGUI.setViewMenu(%s)' % action
     self.mainwindow.viewMenu.clear()
     windows = WindowManager.getWindowsNames()
     for w in windows:
         self.mainwindow.viewMenu.addAction(
             w, lambda x=w: WindowManager.putOnTop(x))
     self.mainwindow.viewMenu.addAction('Close All',
                                        lambda: WindowManager.closeAll())
     return
Esempio n. 2
0
 def showNewAlarmPanel(s=self, a=alarmApp):
     i = len([
         w for w in WindowManager.getWindowsNames()
         if w.startswith('panel')
     ])
     name = 'panel%d' % i
     a.tools[name] = WindowManager.addWindow(
         panic.gui.panel.QAlarmPanel())
     a.tools[name].setModel(s.view)
     a.tools[name].show()