Show More
@@ -159,6 +159,13 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
159 | 159 | # priority (when it has focus) over, e.g., window-level menu shortcuts. |
|
160 | 160 | override_shortcuts = Bool(False) |
|
161 | 161 | |
|
162 | # ------ Custom Qt Widgets ------------------------------------------------- | |
|
163 | ||
|
164 | # For other projects to easily override the Qt widgets used by the console | |
|
165 | # (e.g. Spyder) | |
|
166 | custom_control = None | |
|
167 | custom_page_control = None | |
|
168 | ||
|
162 | 169 | #------ Signals ------------------------------------------------------------ |
|
163 | 170 | |
|
164 | 171 | # Signals that indicate ConsoleWidget state. |
@@ -989,7 +996,9 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
989 | 996 | """ Creates and connects the underlying text widget. |
|
990 | 997 | """ |
|
991 | 998 | # Create the underlying control. |
|
992 |
if self. |
|
|
999 | if self.custom_control: | |
|
1000 | control = self.custom_control | |
|
1001 | elif self.kind == 'plain': | |
|
993 | 1002 | control = QtGui.QPlainTextEdit() |
|
994 | 1003 | elif self.kind == 'rich': |
|
995 | 1004 | control = QtGui.QTextEdit() |
@@ -1026,7 +1035,9 b' class ConsoleWidget(LoggingConfigurable, QtGui.QWidget):' | |||
|
1026 | 1035 | def _create_page_control(self): |
|
1027 | 1036 | """ Creates and connects the underlying paging widget. |
|
1028 | 1037 | """ |
|
1029 | if self.kind == 'plain': | |
|
1038 | if self.custom_page_control: | |
|
1039 | control = self.custom_page_control | |
|
1040 | elif self.kind == 'plain': | |
|
1030 | 1041 | control = QtGui.QPlainTextEdit() |
|
1031 | 1042 | elif self.kind == 'rich': |
|
1032 | 1043 | control = QtGui.QTextEdit() |
General Comments 0
You need to be logged in to leave comments.
Login now