4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing the viewmanager base class. |
7 Module implementing the viewmanager base class. |
8 """ |
8 """ |
|
9 |
|
10 from __future__ import unicode_literals # __IGNORE_WARNING__ |
9 |
11 |
10 import os |
12 import os |
11 |
13 |
12 from PyQt4.QtCore import QSignalMapper, QTimer, QFileInfo, pyqtSignal, QRegExp, \ |
14 from PyQt4.QtCore import QSignalMapper, QTimer, QFileInfo, pyqtSignal, QRegExp, \ |
13 QObject, Qt |
15 QObject, Qt |
68 @param evt key event (QKeyPressEvent) |
70 @param evt key event (QKeyPressEvent) |
69 """ |
71 """ |
70 if evt.key() == Qt.Key_Escape: |
72 if evt.key() == Qt.Key_Escape: |
71 self.escPressed.emit() |
73 self.escPressed.emit() |
72 else: |
74 else: |
73 super().keyPressEvent(evt) # pass it on |
75 super(QuickSearchLineEdit, self).keyPressEvent(evt) # pass it on |
74 |
76 |
75 def focusInEvent(self, evt): |
77 def focusInEvent(self, evt): |
76 """ |
78 """ |
77 Re-implemented to record the current editor widget. |
79 Re-implemented to record the current editor widget. |
78 |
80 |
79 @param evt focus event (QFocusEvent) |
81 @param evt focus event (QFocusEvent) |
80 """ |
82 """ |
81 self.gotFocus.emit() |
83 self.gotFocus.emit() |
82 super().focusInEvent(evt) # pass it on |
84 super(QuickSearchLineEdit, self).focusInEvent(evt) # pass it on |
83 |
85 |
84 |
86 |
85 class ViewManager(QObject): |
87 class ViewManager(QObject): |
86 """ |
88 """ |
87 Base class inherited by all specific viewmanager classes. |
89 Base class inherited by all specific viewmanager classes. |