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 PyQt4.QtCore import pyqtSlot, pyqtSignal, Qt |
10 from PyQt4.QtCore import pyqtSlot, pyqtSignal, Qt |
11 from PyQt4.QtGui import QWidget, QSpacerItem, QSizePolicy |
11 from PyQt4.QtGui import QWidget, QSpacerItem, QSizePolicy |
12 |
12 |
15 import UI.PixmapCache |
15 import UI.PixmapCache |
16 |
16 |
17 |
17 |
18 class SearchWidget(QWidget, Ui_SearchWidget): |
18 class SearchWidget(QWidget, Ui_SearchWidget): |
19 """ |
19 """ |
20 Class implementing the search box for the shel, terminal and log viewer. |
20 Class implementing the search box for the shell, terminal and log viewer. |
21 |
21 |
22 @signal searchNext(text, caseSensitive, wholeWord) emitted when the user |
22 @signal searchNext(text, caseSensitive, wholeWord) emitted when the user |
23 pressed the next button (string, boolean, boolean) |
23 pressed the next button (string, boolean, boolean) |
24 @signal searchPrevious(text, caseSensitive, wholeWord) emitted when the |
24 @signal searchPrevious(text, caseSensitive, wholeWord) emitted when the |
25 user pressed the previous button (string, boolean, boolean) |
25 user pressed the previous button (string, boolean, boolean) |
58 |
58 |
59 self.findHistory = [] |
59 self.findHistory = [] |
60 |
60 |
61 self.findtextCombo.lineEdit().returnPressed.connect( |
61 self.findtextCombo.lineEdit().returnPressed.connect( |
62 self.__findByReturnPressed) |
62 self.__findByReturnPressed) |
|
63 |
|
64 msh = self.minimumSizeHint() |
|
65 self.resize(max(self.width(), msh.width()), msh.height()) |
63 |
66 |
64 @pyqtSlot() |
67 @pyqtSlot() |
65 def on_closeButton_clicked(self): |
68 def on_closeButton_clicked(self): |
66 """ |
69 """ |
67 Private slot to close the widget. |
70 Private slot to close the widget. |