def __init__(self): if Jaime.instance: raise Exception("Can't call to constructor with another instance created") self.tabs_widget = QTabWidget() self.view = QWebView() self.page = QWebPage() self.config = SafeConfigParser() Logger.getLoggerFor(self.__class__) self.tabs_widget.insertTab(0,self.view,'label') self.tabs = {} self.graph_file = None self.close_tab_timer = QTimer() self.close_tab_timer.setSingleShot(False) #cada 30 segundos se cierra un tab self.close_tab_timer.setInterval(10000) self.view.setPage(self.page) self.tabs['mainTab'] = self.view self.network_manager = CustomNetworkAccessManager.getInstance() self.navigator = Navigator.getInstance() self.route_node = YahooRouteNode.getInstance() self.graph_parser = GraphParser.getInstance() self.page.setNetworkAccessManager(self.network_manager)
def __init__(self): self.network_manager = CustomNetworkAccessManager.getInstance() self.axis = [] self.human_events = {} self.node_collected_data = {} self.last_url = None self.current_url = QUrl() self.current_axis_id = None self.crossed_axis_method = None self.crossed_axes = [] self.crossed_axes_string = '' self.cross_axis_delay = QTimer() self.cross_axis_delay.setSingleShot(True) self.cross_axis_delay.timeout.connect(self.crossedAxis) self.cross_axis_params = None self.loading_timeout = QTimer() self.loading_timeout.setSingleShot(True) self.loading_timeout.setInterval(30000) self.loading_timeout.timeout.connect(self.loadingTimeoutAction) self.inactivity_timeout = QTimer() self.inactivity_timeout.setSingleShot(True) self.inactivity_timeout.setInterval(10000) self.inactivity_timeout.timeout.connect(self.inactivityTimeoutAction) self.page_reloads = 0 Logger.getLoggerFor(self.__class__)