|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.UI.SearchWidget</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.UI.SearchWidget</h1> |
|
23 <p> |
|
24 Module implementing the search box for the shell and log viewer. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#SearchWidget">SearchWidget</a></td> |
|
34 <td>Class implementing the search box for the shell and log viewer.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="SearchWidget" ID="SearchWidget"></a> |
|
43 <h2>SearchWidget</h2> |
|
44 <p> |
|
45 Class implementing the search box for the shell and log viewer. |
|
46 </p><h3>Signals</h3> |
|
47 <dl> |
|
48 <dt>searchNext(text, caseSensitive, wholeWord, regexp)</dt> |
|
49 <dd> |
|
50 emitted when the |
|
51 user pressed the next button (string, boolean, boolean) |
|
52 </dd><dt>searchPrevious(text, caseSensitive, wholeWord, regexp)</dt> |
|
53 <dd> |
|
54 emitted when |
|
55 the user pressed the previous button (string, boolean, boolean) |
|
56 </dd> |
|
57 </dl> |
|
58 <h3>Derived from</h3> |
|
59 QWidget |
|
60 <h3>Class Attributes</h3> |
|
61 <table> |
|
62 <tr><td>None</td></tr> |
|
63 </table> |
|
64 <h3>Class Methods</h3> |
|
65 <table> |
|
66 <tr><td>None</td></tr> |
|
67 </table> |
|
68 <h3>Methods</h3> |
|
69 <table> |
|
70 <tr> |
|
71 <td><a href="#SearchWidget.__init__">SearchWidget</a></td> |
|
72 <td>Constructor</td> |
|
73 </tr><tr> |
|
74 <td><a href="#SearchWidget.__findByReturnPressed">__findByReturnPressed</a></td> |
|
75 <td>Private slot to handle the returnPressed signal of the findtext combobox.</td> |
|
76 </tr><tr> |
|
77 <td><a href="#SearchWidget.__setSearchButtons">__setSearchButtons</a></td> |
|
78 <td>Private slot to set the state of the search buttons.</td> |
|
79 </tr><tr> |
|
80 <td><a href="#SearchWidget.keyPressEvent">keyPressEvent</a></td> |
|
81 <td>Protected slot to handle key press events.</td> |
|
82 </tr><tr> |
|
83 <td><a href="#SearchWidget.on_closeButton_clicked">on_closeButton_clicked</a></td> |
|
84 <td>Private slot to close the widget.</td> |
|
85 </tr><tr> |
|
86 <td><a href="#SearchWidget.on_findNextButton_clicked">on_findNextButton_clicked</a></td> |
|
87 <td>Private slot to find the next occurrence.</td> |
|
88 </tr><tr> |
|
89 <td><a href="#SearchWidget.on_findPrevButton_clicked">on_findPrevButton_clicked</a></td> |
|
90 <td>Private slot to find the previous occurrence.</td> |
|
91 </tr><tr> |
|
92 <td><a href="#SearchWidget.on_findtextCombo_editTextChanged">on_findtextCombo_editTextChanged</a></td> |
|
93 <td>Private slot to enable/disable the find buttons.</td> |
|
94 </tr><tr> |
|
95 <td><a href="#SearchWidget.searchStringFound">searchStringFound</a></td> |
|
96 <td>Public slot to indicate that the search string was found.</td> |
|
97 </tr><tr> |
|
98 <td><a href="#SearchWidget.showFind">showFind</a></td> |
|
99 <td>Public method to display this widget.</td> |
|
100 </tr> |
|
101 </table> |
|
102 <h3>Static Methods</h3> |
|
103 <table> |
|
104 <tr><td>None</td></tr> |
|
105 </table> |
|
106 <a NAME="SearchWidget.__init__" ID="SearchWidget.__init__"></a> |
|
107 <h4>SearchWidget (Constructor)</h4> |
|
108 <b>SearchWidget</b>(<i>mainWindow, parent=None, spacer=True, showLine=False, hideRegExp=False</i>) |
|
109 <p> |
|
110 Constructor |
|
111 </p><dl> |
|
112 <dt><i>mainWindow</i> (QWidget)</dt> |
|
113 <dd> |
|
114 reference to the main window |
|
115 </dd><dt><i>parent</i> (QWidget)</dt> |
|
116 <dd> |
|
117 reference to the parent widget |
|
118 </dd><dt><i>spacer</i> (bool)</dt> |
|
119 <dd> |
|
120 flag indicating to add a vertical spacer to the |
|
121 main layout |
|
122 </dd><dt><i>showLine</i> (bool)</dt> |
|
123 <dd> |
|
124 flag indicating to show all widget in one row |
|
125 </dd><dt><i>hideRegExp</i> (bool)</dt> |
|
126 <dd> |
|
127 flag indicating to hide the Regexp checkbox |
|
128 </dd> |
|
129 </dl><a NAME="SearchWidget.__findByReturnPressed" ID="SearchWidget.__findByReturnPressed"></a> |
|
130 <h4>SearchWidget.__findByReturnPressed</h4> |
|
131 <b>__findByReturnPressed</b>(<i></i>) |
|
132 <p> |
|
133 Private slot to handle the returnPressed signal of the findtext |
|
134 combobox. |
|
135 </p><a NAME="SearchWidget.__setSearchButtons" ID="SearchWidget.__setSearchButtons"></a> |
|
136 <h4>SearchWidget.__setSearchButtons</h4> |
|
137 <b>__setSearchButtons</b>(<i>enabled</i>) |
|
138 <p> |
|
139 Private slot to set the state of the search buttons. |
|
140 </p><dl> |
|
141 <dt><i>enabled</i></dt> |
|
142 <dd> |
|
143 flag indicating the state (boolean) |
|
144 </dd> |
|
145 </dl><a NAME="SearchWidget.keyPressEvent" ID="SearchWidget.keyPressEvent"></a> |
|
146 <h4>SearchWidget.keyPressEvent</h4> |
|
147 <b>keyPressEvent</b>(<i>event</i>) |
|
148 <p> |
|
149 Protected slot to handle key press events. |
|
150 </p><dl> |
|
151 <dt><i>event</i></dt> |
|
152 <dd> |
|
153 reference to the key press event (QKeyEvent) |
|
154 </dd> |
|
155 </dl><a NAME="SearchWidget.on_closeButton_clicked" ID="SearchWidget.on_closeButton_clicked"></a> |
|
156 <h4>SearchWidget.on_closeButton_clicked</h4> |
|
157 <b>on_closeButton_clicked</b>(<i></i>) |
|
158 <p> |
|
159 Private slot to close the widget. |
|
160 </p><a NAME="SearchWidget.on_findNextButton_clicked" ID="SearchWidget.on_findNextButton_clicked"></a> |
|
161 <h4>SearchWidget.on_findNextButton_clicked</h4> |
|
162 <b>on_findNextButton_clicked</b>(<i></i>) |
|
163 <p> |
|
164 Private slot to find the next occurrence. |
|
165 </p><a NAME="SearchWidget.on_findPrevButton_clicked" ID="SearchWidget.on_findPrevButton_clicked"></a> |
|
166 <h4>SearchWidget.on_findPrevButton_clicked</h4> |
|
167 <b>on_findPrevButton_clicked</b>(<i></i>) |
|
168 <p> |
|
169 Private slot to find the previous occurrence. |
|
170 </p><a NAME="SearchWidget.on_findtextCombo_editTextChanged" ID="SearchWidget.on_findtextCombo_editTextChanged"></a> |
|
171 <h4>SearchWidget.on_findtextCombo_editTextChanged</h4> |
|
172 <b>on_findtextCombo_editTextChanged</b>(<i>txt</i>) |
|
173 <p> |
|
174 Private slot to enable/disable the find buttons. |
|
175 </p><dl> |
|
176 <dt><i>txt</i></dt> |
|
177 <dd> |
|
178 text of the combobox (string) |
|
179 </dd> |
|
180 </dl><a NAME="SearchWidget.searchStringFound" ID="SearchWidget.searchStringFound"></a> |
|
181 <h4>SearchWidget.searchStringFound</h4> |
|
182 <b>searchStringFound</b>(<i>found</i>) |
|
183 <p> |
|
184 Public slot to indicate that the search string was found. |
|
185 </p><dl> |
|
186 <dt><i>found</i></dt> |
|
187 <dd> |
|
188 flag indicating success (boolean) |
|
189 </dd> |
|
190 </dl><a NAME="SearchWidget.showFind" ID="SearchWidget.showFind"></a> |
|
191 <h4>SearchWidget.showFind</h4> |
|
192 <b>showFind</b>(<i>txt=""</i>) |
|
193 <p> |
|
194 Public method to display this widget. |
|
195 </p><dl> |
|
196 <dt><i>txt</i></dt> |
|
197 <dd> |
|
198 text to be shown in the combo (string) |
|
199 </dd> |
|
200 </dl> |
|
201 <div align="right"><a href="#top">Up</a></div> |
|
202 <hr /> |
|
203 </body></html> |