Permalink
Browse files

updated imports to not import directly from PtQt4

  • Loading branch information...
1 parent 9d68990 commit 6e2e420eb70abffa11c3592be6c27e6d5e471fea bhendrix committed Dec 24, 2010
Showing with 6 additions and 6 deletions.
  1. +6 −6 enthought/rst/rest_editor_view.py
@@ -23,7 +23,7 @@
# System library imports
from configobj import ConfigObj
from validate import Validator
-from PyQt4 import QtGui, Qt
+from enthought.qt.api import QtGui, Qt
# ETS imports
from enthought.etsconfig.api import ETSConfig
@@ -110,7 +110,7 @@ def init(self, info):
# We redefine the keyPressEvent_action function in the CodeWidget
# to call the fix_table function when the user types text in a table
def keyPressEvent_action(self, event):
- if self.auto_table_fix and event.modifiers() != Qt.Qt.ControlModifier:
+ if self.auto_table_fix and event.modifiers() != Qt.ControlModifier:
self._fix_table(event.key())
def object_auto_table_fix_changed(self, info):
@@ -248,7 +248,7 @@ def _fix_table(self, key):
if not self._cursor_in_table(cursor):
return
- if Qt.Qt.Key_ydiaeresis >= key >= Qt.Qt.Key_Space:
+ if Qt.Key_ydiaeresis >= key >= Qt.Key_Space:
old_pos = self._move_end_of_cell(cursor)
if self._chars_before_cursor(cursor, 2) == ' ':
cursor.deletePreviousChar()
@@ -276,7 +276,7 @@ def _fix_table(self, key):
cursor.setPosition(old_pos)
- elif key == Qt.Qt.Key_Backspace:
+ elif key == Qt.Key_Backspace:
chars_before = self._chars_before_cursor(cursor, 2)
if chars_before == '| ' or chars_before == '+ ':
cursor.insertText(' ')
@@ -292,7 +292,7 @@ def _fix_table(self, key):
cursor.insertText(' ')
cursor.setPosition(old_pos)
- elif key == Qt.Qt.Key_Delete:
+ elif key == Qt.Key_Delete:
if self._chars_at_cursor(cursor, 1) == '|':
cursor.movePosition(Qt.QTextCursor.Right, Qt.QTextCursor.MoveAnchor)
cursor.insertText('|')
@@ -308,7 +308,7 @@ def _fix_table(self, key):
cursor.insertText(' ')
cursor.setPosition(old_pos)
- elif key == Qt.Qt.Key_Return:
+ elif key == Qt.Key_Return:
old_pos = cursor.position()
cursor.movePosition(Qt.QTextCursor.StartOfLine, 0)

0 comments on commit 6e2e420

Please sign in to comment.