def __init__(self): self._screen = Wnck.Screen.get_default() self._screen.force_update() self._window_manager: WindowManager = WindowManager() self._window_manager.start() self._windows_switcher: Optional[WindowsSwitcher] = None
def __init__(self, width, height): self.window = Window('NeurAlbertaTech', width, height) self.window_manager = WindowManager(self.window) # Set the window icon window_icon = pygame.image.load("neuralbertatech_logo.png") pygame.display.set_icon(window_icon)
def __init__(self): GameState( ) # initialize the singleton before threading to avoid race conditions self.root = tk.Tk() self.windowManager = WindowManager() self.display = Display(self.root, self.windowManager) self.inputHandler = InputHandler(self.display.widget)
def __init__(self, capture=None, face_img_path=None, should_mirror=False): self._window_manager = WindowManager(self.on_keypress) self._capture_manager = CaptureManager(cv2.VideoCapture(0)) \ if capture is None else CaptureManager(capture) self._window_name = 'FaceOff' self._should_mirror = should_mirror self._face_tracker = FaceTracker() self._show_face_rect = False self._swap_face = True self._template_face = None if face_img_path is not None: self._template_face = cv2.imread(face_img_path)
def __init__(self): self._thread_mode = True self._windowManager = WindowManager('Minimum Viable Product', self.on_keypress) self._amount_frames = 0 self._success_finding_contours = 0 # DroidCam URL # url = 'http://192.168.55.78:4747/video' url = 0 self._captureManager = CaptureManager( cv2.VideoCapture(url), self._windowManager, False)
def __init__(self): super().__init__() self.setupUi(self) self.trayIcon = QSystemTrayIcon(self) self.trayIcon.setIcon(QIcon('ui/icon.png')) self.trayIcon.activated.connect(self.restore_window) self.WM = WindowManager() self.pre_window = self.WM.get_fore_window() self.rnn = RNN() self.runState = False self.startButton.clicked.connect(self.btn_clk_start) self.startState = True self.trainButton.clicked.connect(self.btn_clk_train) self.helpButton.clicked.connect(self.btn_clk_help) self.helpState = True self.timer = QTimer(self) self.timer.start(200) self.timer.timeout.connect(self.run)
def __init__(self, version, parent=None): QtGui.QMainWindow.__init__(self, parent) self.version = version self.modules = [] self.viewers = {} self.menus = MenuManager(self) self.actions = ActionManager(self) self.createUI() self.createActions() self.createMenus() self.themes = ThemeManager(self) self.plugins = {} self.setContextMenuPolicy(QtCore.Qt.NoContextMenu) self.dockWidgets = [] self.windowManager = WindowManager(self) self.statusBar().showMessage( self.tr("Gorgon: Protein Visualization Suite")) self.setWindowTitle(self.tr("Gorgon - v" + self.version)) pathname = os.path.abspath(os.path.dirname(sys.argv[0])) self.setWindowIcon(QtGui.QIcon(pathname + '/gorgon.ico'))
#!/usr/bin/python import sys from libpyGORGON import PDBAtom,Vector3DFloat from PyQt4 import QtGui, QtCore from window_manager import WindowManager from main_window_form import MainWindowForm app = QtGui.QApplication(sys.argv) window = MainWindowForm("2.0") window.addModule(WindowManager(window)) window.showMaximized() cAlphaViewer=window.viewers['calpha'] rawAtom=PDBAtom('AAAA', 'A', 1, 'CA') rawAtom.setPosition(Vector3DFloat(-1, 0, 0)) rawAtom = cAlphaViewer.renderer.addAtom(rawAtom) a = PDBAtom('AAAA', 'A', 2, 'CA') a.setPosition(Vector3DFloat(1, 0, 0)) print 'a:', a b = cAlphaViewer.renderer.addAtom(a) print 'b-1:', b if not cAlphaViewer.loaded: cAlphaViewer.loaded = True cAlphaViewer.emitModelLoaded() del a #This line causes a segmentation fault later on, which is weird because we never use the atom at this location in memory after this #Thus, unless there's a change, I'll have to be extremely careful about Python's garbage collection rawAtom.setColor(1, 0, 0, 1) #Red
def __init__(self): self._window_manager = WindowManager('Minimum Viable Product', self._on_keypress) self._recorder = ImageDataRecorder(self._window_manager) self._second_phase_activate = False
def set_foreground_window(pid=None, cmdline=None, class_name=None, window_text=None): WindowManager(pid, cmdline, class_name, window_text).set_foreground()
def __init__(self): self.root = tk.Tk() self.windowManager = WindowManager(Globals.NumCols, Globals.NumRows) self.display = Display(self.root, self.windowManager) self.inputHandler = InputHandler(self.display.getWidget())
from chatbot import Chatbot from order_maker import OrderMaker from window import Window from window_manager import WindowManager import threading import time bot = Chatbot() orderMaker = OrderMaker() window = WindowManager() window.startWindows() #threadServer = threading.Thread(target=startServer(), args=()) #threadWindows = threading.Thread(target=window.startWindows(), args=()) #threadWindows.start() #threadServer.start()