2 |
2 |
3 # Copyright (c) 2012 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> |
3 # Copyright (c) 2012 - 2014 Detlev Offenbach <detlev@die-offenbachs.de> |
4 # |
4 # |
5 |
5 |
6 """ |
6 """ |
7 Module implementing the search box for the shel, terminal and log viewer. |
7 Module implementing the search box for the shell, terminal and log viewer. |
8 """ |
8 """ |
9 |
9 |
10 from __future__ import unicode_literals |
10 from __future__ import unicode_literals |
11 |
11 |
12 from PyQt4.QtCore import pyqtSlot, pyqtSignal, Qt |
12 from PyQt4.QtCore import pyqtSlot, pyqtSignal, Qt |
17 import UI.PixmapCache |
17 import UI.PixmapCache |
18 |
18 |
19 |
19 |
20 class SearchWidget(QWidget, Ui_SearchWidget): |
20 class SearchWidget(QWidget, Ui_SearchWidget): |
21 """ |
21 """ |
22 Class implementing the search box for the shel, terminal and log viewer. |
22 Class implementing the search box for the shell, terminal and log viewer. |
23 |
23 |
24 @signal searchNext(text, caseSensitive, wholeWord) emitted when the user |
24 @signal searchNext(text, caseSensitive, wholeWord) emitted when the user |
25 pressed the next button (string, boolean, boolean) |
25 pressed the next button (string, boolean, boolean) |
26 @signal searchPrevious(text, caseSensitive, wholeWord) emitted when the |
26 @signal searchPrevious(text, caseSensitive, wholeWord) emitted when the |
27 user pressed the previous button (string, boolean, boolean) |
27 user pressed the previous button (string, boolean, boolean) |
60 |
60 |
61 self.findHistory = [] |
61 self.findHistory = [] |
62 |
62 |
63 self.findtextCombo.lineEdit().returnPressed.connect( |
63 self.findtextCombo.lineEdit().returnPressed.connect( |
64 self.__findByReturnPressed) |
64 self.__findByReturnPressed) |
|
65 |
|
66 msh = self.minimumSizeHint() |
|
67 self.resize(max(self.width(), msh.width()), msh.height()) |
65 |
68 |
66 @pyqtSlot() |
69 @pyqtSlot() |
67 def on_closeButton_clicked(self): |
70 def on_closeButton_clicked(self): |
68 """ |
71 """ |
69 Private slot to close the widget. |
72 Private slot to close the widget. |