Remove all the pyqtSlot decorators
This commit is contained in:
parent
bba3696630
commit
3fa18c5599
@ -14,7 +14,6 @@ class TabbedBrowser(TabWidget):
|
|||||||
self.currentChanged.connect(self.index_changed)
|
self.currentChanged.connect(self.index_changed)
|
||||||
self.tabopen("http://ddg.gg/")
|
self.tabopen("http://ddg.gg/")
|
||||||
|
|
||||||
@pyqtSlot(str)
|
|
||||||
def tabopen(self, url):
|
def tabopen(self, url):
|
||||||
tab = BrowserTab(self)
|
tab = BrowserTab(self)
|
||||||
tab.openurl(url)
|
tab.openurl(url)
|
||||||
@ -25,17 +24,14 @@ class TabbedBrowser(TabWidget):
|
|||||||
tab.loadFinished.connect(self.load_finished)
|
tab.loadFinished.connect(self.load_finished)
|
||||||
tab.titleChanged.connect(self.update_title)
|
tab.titleChanged.connect(self.update_title)
|
||||||
|
|
||||||
@pyqtSlot(str)
|
|
||||||
def openurl(self, url):
|
def openurl(self, url):
|
||||||
tab = self.currentWidget()
|
tab = self.currentWidget()
|
||||||
tab.openurl(url)
|
tab.openurl(url)
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def undo_close(self):
|
def undo_close(self):
|
||||||
if self.url_stack:
|
if self.url_stack:
|
||||||
self.tabopen(self.url_stack.pop())
|
self.tabopen(self.url_stack.pop())
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def close_act(self):
|
def close_act(self):
|
||||||
if self.count() > 1:
|
if self.count() > 1:
|
||||||
idx = self.currentIndex()
|
idx = self.currentIndex()
|
||||||
@ -48,65 +44,49 @@ class TabbedBrowser(TabWidget):
|
|||||||
# FIXME
|
# FIXME
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def reload_act(self):
|
def reload_act(self):
|
||||||
self.currentWidget().reload()
|
self.currentWidget().reload()
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def stop_act(self):
|
def stop_act(self):
|
||||||
self.currentWidget().stop()
|
self.currentWidget().stop()
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def print_act(self):
|
def print_act(self):
|
||||||
# FIXME that does not what I expect
|
# FIXME that does not what I expect
|
||||||
preview = QPrintPreviewDialog()
|
preview = QPrintPreviewDialog()
|
||||||
preview.paintRequested.connect(self.currentWidget().print)
|
preview.paintRequested.connect(self.currentWidget().print)
|
||||||
preview.exec_()
|
preview.exec_()
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def back_act(self):
|
def back_act(self):
|
||||||
# FIXME display warning if beginning of history
|
# FIXME display warning if beginning of history
|
||||||
self.currentWidget().back()
|
self.currentWidget().back()
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def forward_act(self):
|
def forward_act(self):
|
||||||
# FIXME display warning if end of history
|
# FIXME display warning if end of history
|
||||||
self.currentWidget().forward()
|
self.currentWidget().forward()
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
@pyqtSlot(int)
|
|
||||||
def scroll_down_act(self, count=50):
|
def scroll_down_act(self, count=50):
|
||||||
self.currentWidget().page().mainFrame().scroll(0, count)
|
self.currentWidget().page().mainFrame().scroll(0, count)
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
@pyqtSlot(int)
|
|
||||||
def scroll_up_act(self, count=50):
|
def scroll_up_act(self, count=50):
|
||||||
self.currentWidget().page().mainFrame().scroll(0, -count)
|
self.currentWidget().page().mainFrame().scroll(0, -count)
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
@pyqtSlot(int)
|
|
||||||
def scroll_left_act(self, count=50):
|
def scroll_left_act(self, count=50):
|
||||||
self.currentWidget().page().mainFrame().scroll(-count, 0)
|
self.currentWidget().page().mainFrame().scroll(-count, 0)
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
@pyqtSlot(int)
|
|
||||||
def scroll_right_act(self, count=50):
|
def scroll_right_act(self, count=50):
|
||||||
self.currentWidget().page().mainFrame().scroll(count, 0)
|
self.currentWidget().page().mainFrame().scroll(count, 0)
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def scroll_start_act(self):
|
def scroll_start_act(self):
|
||||||
frame = self.currentWidget().page().mainFrame()
|
frame = self.currentWidget().page().mainFrame()
|
||||||
cur_pos = frame.scrollPosition()
|
cur_pos = frame.scrollPosition()
|
||||||
frame.setScrollPosition(QPoint(cur_pos.x(), 0))
|
frame.setScrollPosition(QPoint(cur_pos.x(), 0))
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def scroll_end_act(self):
|
def scroll_end_act(self):
|
||||||
frame = self.currentWidget().page().mainFrame()
|
frame = self.currentWidget().page().mainFrame()
|
||||||
cur_pos = frame.scrollPosition()
|
cur_pos = frame.scrollPosition()
|
||||||
size = frame.contentsSize()
|
size = frame.contentsSize()
|
||||||
frame.setScrollPosition(QPoint(cur_pos.x(), size.height()))
|
frame.setScrollPosition(QPoint(cur_pos.x(), size.height()))
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def switch_prev(self):
|
def switch_prev(self):
|
||||||
idx = self.currentIndex()
|
idx = self.currentIndex()
|
||||||
if idx > 0:
|
if idx > 0:
|
||||||
@ -115,7 +95,6 @@ class TabbedBrowser(TabWidget):
|
|||||||
# FIXME
|
# FIXME
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@pyqtSlot()
|
|
||||||
def switch_next(self):
|
def switch_next(self):
|
||||||
idx = self.currentIndex()
|
idx = self.currentIndex()
|
||||||
if idx < self.count() - 1:
|
if idx < self.count() - 1:
|
||||||
@ -124,15 +103,12 @@ class TabbedBrowser(TabWidget):
|
|||||||
# FIXME
|
# FIXME
|
||||||
pass
|
pass
|
||||||
|
|
||||||
@pyqtSlot(int)
|
|
||||||
def progress_changed(self, prog):
|
def progress_changed(self, prog):
|
||||||
self.filter_signals(self.cur_progress, prog)
|
self.filter_signals(self.cur_progress, prog)
|
||||||
|
|
||||||
@pyqtSlot(bool)
|
|
||||||
def load_finished(self, ok):
|
def load_finished(self, ok):
|
||||||
self.filter_signals(self.cur_load_finished, ok)
|
self.filter_signals(self.cur_load_finished, ok)
|
||||||
|
|
||||||
@pyqtSlot(str)
|
|
||||||
def update_title(self, text):
|
def update_title(self, text):
|
||||||
if text:
|
if text:
|
||||||
self.setTabText(self.indexOf(self.sender()), text)
|
self.setTabText(self.indexOf(self.sender()), text)
|
||||||
@ -146,7 +122,6 @@ class TabbedBrowser(TabWidget):
|
|||||||
else:
|
else:
|
||||||
logging.debug('{} - ignoring'.format(dbgstr))
|
logging.debug('{} - ignoring'.format(dbgstr))
|
||||||
|
|
||||||
@pyqtSlot(int)
|
|
||||||
def index_changed(self, idx):
|
def index_changed(self, idx):
|
||||||
tab = self.widget(idx)
|
tab = self.widget(idx)
|
||||||
self.cur_progress.emit(tab.progress)
|
self.cur_progress.emit(tab.progress)
|
||||||
|
Loading…
Reference in New Issue
Block a user