Add commands.py

This commit is contained in:
Florian Bruhin 2013-12-16 22:07:22 +01:00
parent ea31eb35c8
commit 64568de851

12
qutebrowser/commands.py Normal file
View File

@ -0,0 +1,12 @@
from PyQt5.QtCore import QObject, pyqtSignal
class CommandParser(QObject):
openurl = pyqtSignal(str)
tabopen = pyqtSignal(str)
def parse(self, cmd):
c = cmd.split()
if c[0] == ':open':
self.openurl.emit(c[1])
elif c[0] == ':tabopen':
self.tabopen.emit(c[1])