def identify(self): print("Identify {}".format(len(self.identifyWindows))) if (len(self.identifyWindows) == 0): index = 0 print('monitors._monitor_observers') for _monitor_observer in self.monitors._monitor_observers: print('monitors._monitor_observers a {}'.format( type(_monitor_observer))) if (type(_monitor_observer) == MonitorObserver.MonitorObserver ): print('monitors._monitor_observers b {} {}'.format( type(_monitor_observer._monitor._rect), _monitor_observer._monitor._rect)) self.identifyWindows.append( Identify.IdentifyWindow( index, QtCore.QRect( _monitor_observer._monitor._rect[0], _monitor_observer._monitor._rect[1], _monitor_observer._monitor._rect[2] - _monitor_observer._monitor._rect[0], _monitor_observer._monitor._rect[3] - _monitor_observer._monitor._rect[1]), self.window, self.restore_deactivation)) index += 1 print('windows {}'.format(len(self.identifyWindows))) for window in self.identifyWindows: print(' window show {}'.format(str(window))) window.show()
windows = [] index = 0 print('monitors._monitor_observers') for _monitor_observer in monitors._monitor_observers: print('monitors._monitor_observers a {}'.format( type(_monitor_observer))) if (type(_monitor_observer) == MonitorObserver.MonitorObserver): print('monitors._monitor_observers b {} {}'.format( type(_monitor_observer._monitor._rect), _monitor_observer._monitor._rect)) windows.append( Identify.IdentifyWindow( index, QtCore.QRect( _monitor_observer._monitor._rect[0], _monitor_observer._monitor._rect[1], _monitor_observer._monitor._rect[2] - _monitor_observer._monitor._rect[0], _monitor_observer._monitor._rect[3] - _monitor_observer._monitor._rect[1]), main_window, hallo)) index += 1 print('windows {}'.format(len(windows))) for window in windows: print(' window {}'.format(str(window))) window.show() print('wait') sys.exit(app.exec_())