summaryrefslogtreecommitdiff
path: root/portato/gui/qt/terminal.py
diff options
context:
space:
mode:
Diffstat (limited to 'portato/gui/qt/terminal.py')
-rw-r--r--portato/gui/qt/terminal.py34
1 files changed, 17 insertions, 17 deletions
diff --git a/portato/gui/qt/terminal.py b/portato/gui/qt/terminal.py
index eabe467..fd01e05 100644
--- a/portato/gui/qt/terminal.py
+++ b/portato/gui/qt/terminal.py
@@ -10,7 +10,7 @@
#
# Written by René 'Necoro' Neumann <necoro@necoro.net>
-from PyQt4 import QtGui, QtCore
+from PyQt4 import Qt
from threading import Thread, Lock
from os import read
@@ -18,24 +18,24 @@ from os import read
from portato.gui.wrapper import Console
from portato.helper import debug
-class BoldFormat (QtGui.QTextCharFormat):
+class BoldFormat (Qt.QTextCharFormat):
def __init__(self):
- QtGui.QTextCharFormat.__init__(self)
- self.setFontWeight(QtGui.QFont.Bold)
+ Qt.QTextCharFormat.__init__(self)
+ self.setFontWeight(Qt.QFont.Bold)
-class UnderlineFormat (QtGui.QTextCharFormat):
+class UnderlineFormat (Qt.QTextCharFormat):
def __init__(self):
- QtGui.QTextCharFormat.__init__(self)
+ Qt.QTextCharFormat.__init__(self)
self.setFontUnderline(True)
-class ColorFormat (QtGui.QTextCharFormat):
+class ColorFormat (Qt.QTextCharFormat):
def __init__(self, color):
- QtGui.QTextCharFormat.__init__(self)
+ Qt.QTextCharFormat.__init__(self)
- self.setForeground(QtGui.QBrush(QtGui.QColor(color)))
+ self.setForeground(Qt.QBrush(Qt.QColor(color)))
# we only support a subset of the commands
esc_seq = ("\x1b", "[")
@@ -60,10 +60,10 @@ attr[36] = ColorFormat("cyan")
attr[37] = ColorFormat("white")
attr[39] = None # default
-class QtConsole (Console, QtGui.QTextEdit):
+class QtConsole (Console, Qt.QTextEdit):
def __init__ (self, parent):
- QtGui.QTextEdit.__init__(self, parent)
+ Qt.QTextEdit.__init__(self, parent)
self.pty = None
self.running = False
@@ -74,8 +74,8 @@ class QtConsole (Console, QtGui.QTextEdit):
self.setReadOnly(True)
- QtCore.QObject.connect(self, QtCore.SIGNAL("doSomeWriting"), self._write)
- QtCore.QObject.connect(self, QtCore.SIGNAL("deletePrevChar()"), self._deletePrev)
+ Qt.QObject.connect(self, Qt.SIGNAL("doSomeWriting"), self._write)
+ Qt.QObject.connect(self, Qt.SIGNAL("deletePrevChar()"), self._deletePrev)
def _deletePrev (self):
self.textCursor().deletePreviousChar()
@@ -87,7 +87,7 @@ class QtConsole (Console, QtGui.QTextEdit):
if not self.textCursor().atEnd(): # move cursor and re-set format
f = self.currentCharFormat()
- self.moveCursor(QtGui.QTextCursor.End)
+ self.moveCursor(Qt.QTextCursor.End)
self.setCurrentCharFormat(f)
# insert the text
@@ -97,7 +97,7 @@ class QtConsole (Console, QtGui.QTextEdit):
self.ensureCursorVisible()
def write(self, text):
- self.emit(QtCore.SIGNAL("doSomeWriting"), text)
+ self.emit(Qt.SIGNAL("doSomeWriting"), text)
def start_new_thread (self):
self.run = True
@@ -126,7 +126,7 @@ class QtConsole (Console, QtGui.QTextEdit):
if s == "": break
if ord(s) == backspace:
- self.emit(QtCore.SIGNAL("deletePrevChar()"))
+ self.emit(Qt.SIGNAL("deletePrevChar()"))
continue
if s == esc_seq[0]: # -> 0x27
@@ -198,4 +198,4 @@ class QtConsole (Console, QtGui.QTextEdit):
return f
def virgin_format (self):
- return QtGui.QTextCharFormat(self.stdFormat)
+ return Qt.QTextCharFormat(self.stdFormat)
-9/+3 2014-04-18Abstract remove empty directories into function.Jason A. Donenfeld1-14/+11 2014-04-18Remember to prune empty folders.Jason A. Donenfeld1-0/+8 2014-04-18init: allow deinitializationJason A. Donenfeld2-2/+18 2014-04-18bash-completion: filter dot files from resultsJason A. Donenfeld1-3/+8 2014-04-18reencrypt: remove option, do automaticallyJason A. Donenfeld5-39/+25 2014-04-18reencryption: add to completion filesJason A. Donenfeld3-1/+5 2014-04-18Specify variable gpg.Jason A. Donenfeld1-1/+1 2014-04-18style: don't escape new line on &&Jason A. Donenfeld1-2/+2 2014-04-18reencryption: remove temporary file on failureJason A. Donenfeld1-1/+1 2014-04-18reencryption: only reencrypt files when requiredJason A. Donenfeld2-16/+37 2014-04-17cp: typo as cvJason A. Donenfeld1-1/+1 2014-04-17bash: gpg_id is localJason A. Donenfeld1-0/+1 2014-04-17move/copy: always reencrypt passwords at destinationJason A. Donenfeld5-25/+56 2014-04-17makefile: allow platform files with gnu sedJason A. Donenfeld1-7/+8 2014-04-17mv: Add pass mv/rename supportJason A. Donenfeld5-3/+78 2014-04-17revelation2pass: add plain XML importJavali1-11/+15 2014-04-17platform: add cygwin supportJason A. Donenfeld2-1/+17