def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, True) self.add_widget(VideoPlayerWidget()) self.buffer_widget.play(url) self.build_all_methods(self.buffer_widget)
def __init__(self, buffer_id, url, arguments, fit_to_view, background_color): Buffer.__init__(self, buffer_id, url, arguments, fit_to_view, background_color) self.add_widget(BrowserView()) self.buffer_widget.loadStarted.connect(self.start_progress) self.buffer_widget.loadProgress.connect(self.update_progress) self.buffer_widget.loadFinished.connect(self.stop_progress) self.buffer_widget.web_page.windowCloseRequested.connect( self.request_close_buffer) self.search_term = "" with open( os.path.join(os.path.dirname(__file__), "js", "get_markers.js"), "r") as f: self.get_markers_js = f.read() with open( os.path.join(os.path.dirname(__file__), "js", "goto_marker.js"), "r") as f: self.goto_marker_raw = f.read()
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, False, QColor(0, 0, 0, 255)) self.add_widget(PdfViewerWidget(url, config_dir, QColor(0, 0, 0, 255))) self.buffer_widget.translate_double_click_word.connect( self.translate_text)
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict): dumper(["it's dumping time 2"]) Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, True, QColor(0, 0, 0, 255)) # Buffer.__init__(self, buffer_id, url, arguments, True, QColor(0, 0, 0, 255)) # def __init__(self, buffer_id, url, arguments): # with open("/tmp/eaf3.csv", "a") as fo: # wr = csv.writer(fo) # wr.writerow(["runs_now"]) self.update() dumper(list(self.emacs_var_dict.keys())) dumper(["it's dumping time 3"]) self.add_widget(ob_viz(QColor(0, 0, 0, 255))) dumper(["it's dumping time 4"]) self.timer = QTimer(self, timeout=self.update_demo, interval=40) self.timer.start() self.reload_timer = 0 self.edge_string = "" self.cur_node = "" self.update()
def __init__(self, buffer_id, url): Buffer.__init__(self, buffer_id, url, False, QColor(255, 255, 255, 255)) self.add_widget(BrowserWidget()) self.buffer_widget.setUrl(QUrl(url)) self.buffer_widget.titleChanged.connect(self.change_title) self.buffer_widget.web_page.open_url_in_new_tab.connect(self.open_url)
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path, call_emacs): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, call_emacs, True) self.add_widget(QPushButton("Hello, EAF hacker, it's working!!!")) self.buffer_widget.setStyleSheet("font-size: 100px")
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, True) self.background_color = QColor(0, 0, 0) self.add_widget(CameraWidget(QColor(0, 0, 0, 255)))
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, False) self.background_color = QColor(get_emacs_var("eaf-emacs-theme-background-color")) self.add_widget(FileTransferWidget(url, get_emacs_var("eaf-emacs-theme-background-color"), get_emacs_var("eaf-emacs-theme-foreground-color")))
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, False, QColor(0, 0, 0, 255)) self.add_widget(PdfViewerWidget(url, QColor(0, 0, 0, 255))) self.buffer_widget.send_input_message = self.send_input_message self.buffer_widget.translate_double_click_word.connect( self.translate_text)
def __init__(self, buffer_id, url): Buffer.__init__(self, buffer_id, url, False, QColor(255, 255, 255, 255)) self.url = url self.add_widget(BrowserWidget()) self.load_org_html_file()
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, False) self.background_color = QColor(0, 0, 0) arguments_dict = json.loads(arguments) self.add_widget(GitViewerWidget(buffer_id, config_dir, arguments_dict["directory"]))
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, True, QColor(0, 0, 0, 255)) self.add_widget(VideoPlayerWidget()) self.buffer_widget.play(url) self.build_widget_method("play_backward", "seek_backward") self.build_widget_method("play_forward", "seek_forward")
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, True) self.background_color = QColor(0, 0, 0) self.add_widget(VideoPlayerWidget()) self.buffer_widget.play(url) self.build_all_methods(self.buffer_widget)
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path, call_emacs): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, call_emacs, True) self.add_widget(VideoPlayerWidget()) self.buffer_widget.play(url) self.build_widget_method("play_backward", "seek_backward") self.build_widget_method("play_forward", "seek_forward")
def __init__(self, buffer_id, url, arguments, fit_to_view, background_color): Buffer.__init__(self, buffer_id, url, arguments, fit_to_view, background_color) self.add_widget(BrowserView()) self.buffer_widget.loadStarted.connect(self.start_progress) self.buffer_widget.loadProgress.connect(self.update_progress) self.buffer_widget.loadFinished.connect(self.stop_progress) self.buffer_widget.web_page.windowCloseRequested.connect(self.request_close_buffer)
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, True) arguments_dict = json.loads(arguments) self.add_widget( GitViewerWidget(buffer_id, config_dir, arguments_dict["directory"]))
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, True, QColor(0, 0, 0, 255)) self.add_widget(QTermWidget.QTermWidget()) self.buffer_widget.setTerminalFont(QFont('Source Code Pro', 14)) self.buffer_widget.setColorScheme('Linux') self.buffer_widget.finished.connect(self.request_close_buffer)
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, True) self.add_widget(RSSReaderWidget(buffer_id, config_dir)) self.buffer_widget.browser.buffer = self self.build_all_methods(self.buffer_widget) self.build_all_methods(self.buffer_widget.browser)
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, True, QColor(0, 0, 0, 255)) self.add_widget(RSSReaderWidget(config_dir)) self.buffer_widget.browser.message_to_emacs = self.message_to_emacs self.buffer_widget.browser.set_emacs_var = self.set_emacs_var self.buffer_widget.browser.eval_in_emacs = self.eval_in_emacs self.buffer_widget.browser.send_input_message = self.send_input_message
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, True, QColor(0, 0, 0, 255)) parser = qutebrowser.get_argparser() args = parser.parse_args(arguments.split()) print('before app.run') app.run(args) print('after app.run') qwidget = app.qApp.topLevelWidgets()[0] print(qwidget) self.add_widget(qwidget)
def __init__(self, buffer_id, url, config_dir, argument, emacs_var_dict, module_path): Buffer.__init__(self, buffer_id, url, argument, emacs_var_dict, module_path, False) self.background_color = QColor( emacs_var_dict["eaf-emacs-theme-background-color"]) self.add_widget( FileUploaderWidget( url, emacs_var_dict["eaf-emacs-theme-background-color"], emacs_var_dict["eaf-emacs-theme-foreground-color"]))
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, False) self.delete_temp_file = arguments == "temp_pdf_file" self.add_widget( PdfViewerWidget(url, config_dir, QColor(0, 0, 0, 255), buffer_id, emacs_var_dict)) self.buffer_widget.translate_double_click_word.connect( self.translate_text) self.build_all_methods(self.buffer_widget)
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, True, QColor(0, 0, 0, 255)) self.add_widget(RSSReaderWidget(config_dir)) for method_name in ["next_subscription", "prev_subscription", "next_article", "prev_article", "first_subscription", "last_subscription", "first_article", "last_article"]: self.build_widget_method(method_name) for method_name in ["scroll_up", "scroll_down", "scroll_up_page", "scroll_down_page", "scroll_to_begin", "scroll_to_bottom", "search_text_forward", "search_text_backward"]: self.build_browser_method(method_name) self.build_browser_method("action_quit", "search_quit")
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path, call_emacs): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, call_emacs, False) self.delete_temp_file = arguments == "temp_pdf_file" self.add_widget(PdfViewerWidget(url, config_dir, QColor(0, 0, 0, 255), buffer_id, emacs_var_dict, call_emacs)) self.buffer_widget.translate_double_click_word.connect(self.translate_text) for method_name in ["scroll_up", "scroll_down", "scroll_up_page", "scroll_down_page", "scroll_to_home", "scroll_to_end", "zoom_reset", "zoom_in", "zoom_out", "save_current_pos", "jump_to_saved_pos", "scroll_right", "scroll_left", "toggle_read_mode", "toggle_inverted_mode", "toggle_mark_link"]: self.build_widget_method(method_name)
def __init__(self, buffer_id, url): Buffer.__init__(self, buffer_id, url, False, QColor(255, 255, 255, 255)) # Get free port to render markdown. self.port = self.get_free_port() self.url = url # Start markdown render process. subprocess.Popen("grip {0} {1}".format(url, self.port), shell=True) # Init widget. self.add_widget(BrowserWidget()) # Add timer make load markdown preview link after grip process start finish. timer = threading.Timer(2, self.load_markdown_server) timer.start()
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, False) arguments_dict = json.loads(arguments) self.kernel = arguments_dict["kernel"] font_size = get_emacs_var("eaf-jupyter-font-size") font_family = get_emacs_var("eaf-jupyter-font-family") self.add_widget( EafJupyterWidget(self.kernel, font_size=font_size, font_family=font_family)) QTimer.singleShot(500, self.focus_widget) self.build_all_methods(self.buffer_widget)
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, module_path): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, module_path, False) arguments_dict = json.loads(arguments) self.kernel = arguments_dict["kernel"] font_size = int(self.emacs_var_dict["eaf-jupyter-font-size"]) font_family = self.emacs_var_dict["eaf-jupyter-font-family"] self.add_widget( EafJupyterWidget(emacs_var_dict, self.kernel, font_size=font_size, font_family=font_family)) self.build_all_methods(self.buffer_widget)
def __init__(self, buffer_id, url, config_dir, arguments, emacs_var_dict, fit_to_view, background_color): Buffer.__init__(self, buffer_id, url, arguments, emacs_var_dict, fit_to_view, background_color) self.add_widget(BrowserView(config_dir)) # Set User Agent with Firefox's one to make EAF browser can login in Google account. self.profile = QWebEngineProfile(self.buffer_widget) self.profile.defaultProfile().setHttpUserAgent( "Mozilla/5.0 (X11; Linux i586; rv:31.0) Gecko/20100101 Firefox/72.0" ) self.buffer_widget.loadStarted.connect(self.start_progress) self.buffer_widget.loadProgress.connect(self.update_progress) self.buffer_widget.loadFinished.connect(self.stop_progress) self.buffer_widget.web_page.windowCloseRequested.connect( self.request_close_buffer)
def __init__(self, buffer_id, url, config_dir, argument, emacs_var_dict, module_path): Buffer.__init__(self, buffer_id, url, argument, emacs_var_dict, module_path, False) self.add_widget(FileUploaderWidget(url, QColor(0, 0, 0, 255)))
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, False, QColor(0, 0, 0, 255)) self.add_widget(AirShareWidget(url, QColor(0, 0, 0, 255)))
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, True, QColor(0, 0, 0, 255)) self.add_widget(CameraWidget(QColor(0, 0, 0, 255)))
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, True, QColor(0, 0, 0, 255)) self.add_widget(VideoPlayerWidget()) self.buffer_widget.play(url)
def __init__(self, buffer_id, url, argument): Buffer.__init__(self, buffer_id, url, argument, False, QColor(0, 0, 0, 255)) self.add_widget(FileUploaderWidget(url, QColor(0, 0, 0, 255)))
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, True, QColor(0, 0, 0, 255)) self.add_widget(QPushButton("Hello, EAF hacker, it's working!!!")) self.buffer_widget.setStyleSheet("font-size: 100px")
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, False, QColor(0, 0, 0, 255)) self.add_widget(FileTransferWidget(url, QColor(0, 0, 0, 255)))
def __init__(self, buffer_id, url, arguments): Buffer.__init__(self, buffer_id, url, arguments, False, QColor(0, 0, 0, 255)) self.add_widget(PdfViewerWidget(url, QColor(0, 0, 0, 255))) self.buffer_widget.send_input_message = self.send_input_message