25 the user pressed the previous button (string, boolean, boolean) |
25 the user pressed the previous button (string, boolean, boolean) |
26 """ |
26 """ |
27 searchNext = pyqtSignal(str, bool, bool, bool) |
27 searchNext = pyqtSignal(str, bool, bool, bool) |
28 searchPrevious = pyqtSignal(str, bool, bool, bool) |
28 searchPrevious = pyqtSignal(str, bool, bool, bool) |
29 |
29 |
30 def __init__(self, mainWindow, parent=None, spacer=True, showLine=False, |
30 def __init__(self, mainWindow, parent=None, spacer=True, showLine=False): |
31 hideRegExp=False): |
|
32 """ |
31 """ |
33 Constructor |
32 Constructor |
34 |
33 |
35 @param mainWindow reference to the main window |
34 @param mainWindow reference to the main window |
36 @type QWidget |
35 @type QWidget |
39 @param spacer flag indicating to add a vertical spacer to the |
38 @param spacer flag indicating to add a vertical spacer to the |
40 main layout |
39 main layout |
41 @type bool |
40 @type bool |
42 @param showLine flag indicating to show all widget in one row |
41 @param showLine flag indicating to show all widget in one row |
43 @type bool |
42 @type bool |
44 @param hideRegExp flag indicating to hide the Regexp checkbox |
|
45 @type bool |
|
46 """ |
43 """ |
47 super(SearchWidget, self).__init__(parent) |
44 super(SearchWidget, self).__init__(parent) |
48 |
45 |
49 if showLine: |
46 if showLine: |
50 from .Ui_SearchWidgetLine import Ui_SearchWidgetLine |
47 from .Ui_SearchWidgetLine import Ui_SearchWidgetLine |
51 self.__ui = Ui_SearchWidgetLine() |
48 self.__ui = Ui_SearchWidgetLine() |
52 else: |
49 else: |
53 from .Ui_SearchWidget import Ui_SearchWidget |
50 from .Ui_SearchWidget import Ui_SearchWidget |
54 self.__ui = Ui_SearchWidget() |
51 self.__ui = Ui_SearchWidget() |
55 self.__ui.setupUi(self) |
52 self.__ui.setupUi(self) |
56 |
|
57 if hideRegExp: |
|
58 self.__ui.regexpCheckBox.setChecked(False) |
|
59 self.__ui.regexpCheckBox.hide() |
|
60 |
53 |
61 if not showLine: |
54 if not showLine: |
62 if spacer: |
55 if spacer: |
63 spacerItem = QSpacerItem( |
56 spacerItem = QSpacerItem( |
64 20, 1, QSizePolicy.Minimum, QSizePolicy.Expanding) |
57 20, 1, QSizePolicy.Minimum, QSizePolicy.Expanding) |