eric6/Documentation/Source/eric6.UI.SearchWidget.html

changeset 7273
391d6b7b1eff
parent 7232
0b840f7ed593
equal deleted inserted replaced
7272:1779dc278077 7273:391d6b7b1eff
16 16
17 a { color: #BA6D36; } 17 a { color: #BA6D36; }
18 18
19 </style> 19 </style>
20 </head> 20 </head>
21 <body><a NAME="top" ID="top"></a> 21 <body>
22 <a NAME="top" ID="top"></a>
22 <h1>eric6.UI.SearchWidget</h1> 23 <h1>eric6.UI.SearchWidget</h1>
24
23 <p> 25 <p>
24 Module implementing the search box for the shell and log viewer. 26 Module implementing the search box for the shell and log viewer.
25 </p> 27 </p>
26 <h3>Global Attributes</h3> 28 <h3>Global Attributes</h3>
29
27 <table> 30 <table>
28 <tr><td>None</td></tr> 31 <tr><td>None</td></tr>
29 </table> 32 </table>
30 <h3>Classes</h3> 33 <h3>Classes</h3>
31 <table> 34
35 <table>
36
32 <tr> 37 <tr>
33 <td><a href="#SearchWidget">SearchWidget</a></td> 38 <td><a href="#SearchWidget">SearchWidget</a></td>
34 <td>Class implementing the search box for the shell and log viewer.</td> 39 <td>Class implementing the search box for the shell and log viewer.</td>
35 </tr> 40 </tr>
36 </table> 41 </table>
37 <h3>Functions</h3> 42 <h3>Functions</h3>
38 <table> 43
39 <tr><td>None</td></tr> 44 <table>
40 </table> 45 <tr><td>None</td></tr>
41 <hr /><hr /> 46 </table>
47 <hr />
48 <hr />
42 <a NAME="SearchWidget" ID="SearchWidget"></a> 49 <a NAME="SearchWidget" ID="SearchWidget"></a>
43 <h2>SearchWidget</h2> 50 <h2>SearchWidget</h2>
51
44 <p> 52 <p>
45 Class implementing the search box for the shell and log viewer. 53 Class implementing the search box for the shell and log viewer.
46 </p><h3>Signals</h3> 54 </p>
47 <dl> 55 <h3>Signals</h3>
56 <dl>
57
48 <dt>searchNext(text, caseSensitive, wholeWord, regexp)</dt> 58 <dt>searchNext(text, caseSensitive, wholeWord, regexp)</dt>
49 <dd> 59 <dd>
50 emitted when the 60 emitted when the
51 user pressed the next button (string, boolean, boolean) 61 user pressed the next button (string, boolean, boolean)
52 </dd><dt>searchPrevious(text, caseSensitive, wholeWord, regexp)</dt> 62 </dd>
63 <dt>searchPrevious(text, caseSensitive, wholeWord, regexp)</dt>
53 <dd> 64 <dd>
54 emitted when 65 emitted when
55 the user pressed the previous button (string, boolean, boolean) 66 the user pressed the previous button (string, boolean, boolean)
56 </dd> 67 </dd>
57 </dl> 68 </dl>
58 <h3>Derived from</h3> 69 <h3>Derived from</h3>
59 QWidget 70 QWidget
60 <h3>Class Attributes</h3> 71 <h3>Class Attributes</h3>
72
61 <table> 73 <table>
62 <tr><td>None</td></tr> 74 <tr><td>None</td></tr>
63 </table> 75 </table>
64 <h3>Class Methods</h3> 76 <h3>Class Methods</h3>
77
65 <table> 78 <table>
66 <tr><td>None</td></tr> 79 <tr><td>None</td></tr>
67 </table> 80 </table>
68 <h3>Methods</h3> 81 <h3>Methods</h3>
69 <table> 82
83 <table>
84
70 <tr> 85 <tr>
71 <td><a href="#SearchWidget.__init__">SearchWidget</a></td> 86 <td><a href="#SearchWidget.__init__">SearchWidget</a></td>
72 <td>Constructor</td> 87 <td>Constructor</td>
73 </tr><tr> 88 </tr>
89 <tr>
74 <td><a href="#SearchWidget.__findByReturnPressed">__findByReturnPressed</a></td> 90 <td><a href="#SearchWidget.__findByReturnPressed">__findByReturnPressed</a></td>
75 <td>Private slot to handle the returnPressed signal of the findtext combobox.</td> 91 <td>Private slot to handle the returnPressed signal of the findtext combobox.</td>
76 </tr><tr> 92 </tr>
93 <tr>
77 <td><a href="#SearchWidget.__setSearchButtons">__setSearchButtons</a></td> 94 <td><a href="#SearchWidget.__setSearchButtons">__setSearchButtons</a></td>
78 <td>Private slot to set the state of the search buttons.</td> 95 <td>Private slot to set the state of the search buttons.</td>
79 </tr><tr> 96 </tr>
97 <tr>
80 <td><a href="#SearchWidget.keyPressEvent">keyPressEvent</a></td> 98 <td><a href="#SearchWidget.keyPressEvent">keyPressEvent</a></td>
81 <td>Protected slot to handle key press events.</td> 99 <td>Protected slot to handle key press events.</td>
82 </tr><tr> 100 </tr>
101 <tr>
83 <td><a href="#SearchWidget.on_closeButton_clicked">on_closeButton_clicked</a></td> 102 <td><a href="#SearchWidget.on_closeButton_clicked">on_closeButton_clicked</a></td>
84 <td>Private slot to close the widget.</td> 103 <td>Private slot to close the widget.</td>
85 </tr><tr> 104 </tr>
105 <tr>
86 <td><a href="#SearchWidget.on_findNextButton_clicked">on_findNextButton_clicked</a></td> 106 <td><a href="#SearchWidget.on_findNextButton_clicked">on_findNextButton_clicked</a></td>
87 <td>Private slot to find the next occurrence.</td> 107 <td>Private slot to find the next occurrence.</td>
88 </tr><tr> 108 </tr>
109 <tr>
89 <td><a href="#SearchWidget.on_findPrevButton_clicked">on_findPrevButton_clicked</a></td> 110 <td><a href="#SearchWidget.on_findPrevButton_clicked">on_findPrevButton_clicked</a></td>
90 <td>Private slot to find the previous occurrence.</td> 111 <td>Private slot to find the previous occurrence.</td>
91 </tr><tr> 112 </tr>
113 <tr>
92 <td><a href="#SearchWidget.on_findtextCombo_editTextChanged">on_findtextCombo_editTextChanged</a></td> 114 <td><a href="#SearchWidget.on_findtextCombo_editTextChanged">on_findtextCombo_editTextChanged</a></td>
93 <td>Private slot to enable/disable the find buttons.</td> 115 <td>Private slot to enable/disable the find buttons.</td>
94 </tr><tr> 116 </tr>
117 <tr>
95 <td><a href="#SearchWidget.searchStringFound">searchStringFound</a></td> 118 <td><a href="#SearchWidget.searchStringFound">searchStringFound</a></td>
96 <td>Public slot to indicate that the search string was found.</td> 119 <td>Public slot to indicate that the search string was found.</td>
97 </tr><tr> 120 </tr>
121 <tr>
98 <td><a href="#SearchWidget.showFind">showFind</a></td> 122 <td><a href="#SearchWidget.showFind">showFind</a></td>
99 <td>Public method to display this widget.</td> 123 <td>Public method to display this widget.</td>
100 </tr> 124 </tr>
101 </table> 125 </table>
102 <h3>Static Methods</h3> 126 <h3>Static Methods</h3>
103 <table> 127
104 <tr><td>None</td></tr> 128 <table>
105 </table> 129 <tr><td>None</td></tr>
130 </table>
131
106 <a NAME="SearchWidget.__init__" ID="SearchWidget.__init__"></a> 132 <a NAME="SearchWidget.__init__" ID="SearchWidget.__init__"></a>
107 <h4>SearchWidget (Constructor)</h4> 133 <h4>SearchWidget (Constructor)</h4>
108 <b>SearchWidget</b>(<i>mainWindow, parent=None, spacer=True, showLine=False</i>) 134 <b>SearchWidget</b>(<i>mainWindow, parent=None, spacer=True, showLine=False</i>)
135
109 <p> 136 <p>
110 Constructor 137 Constructor
111 </p><dl> 138 </p>
139 <dl>
140
112 <dt><i>mainWindow</i> (QWidget)</dt> 141 <dt><i>mainWindow</i> (QWidget)</dt>
113 <dd> 142 <dd>
114 reference to the main window 143 reference to the main window
115 </dd><dt><i>parent</i> (QWidget)</dt> 144 </dd>
145 <dt><i>parent</i> (QWidget)</dt>
116 <dd> 146 <dd>
117 reference to the parent widget 147 reference to the parent widget
118 </dd><dt><i>spacer</i> (bool)</dt> 148 </dd>
149 <dt><i>spacer</i> (bool)</dt>
119 <dd> 150 <dd>
120 flag indicating to add a vertical spacer to the 151 flag indicating to add a vertical spacer to the
121 main layout 152 main layout
122 </dd><dt><i>showLine</i> (bool)</dt> 153 </dd>
154 <dt><i>showLine</i> (bool)</dt>
123 <dd> 155 <dd>
124 flag indicating to show all widget in one row 156 flag indicating to show all widget in one row
125 </dd> 157 </dd>
126 </dl><a NAME="SearchWidget.__findByReturnPressed" ID="SearchWidget.__findByReturnPressed"></a> 158 </dl>
159 <a NAME="SearchWidget.__findByReturnPressed" ID="SearchWidget.__findByReturnPressed"></a>
127 <h4>SearchWidget.__findByReturnPressed</h4> 160 <h4>SearchWidget.__findByReturnPressed</h4>
128 <b>__findByReturnPressed</b>(<i></i>) 161 <b>__findByReturnPressed</b>(<i></i>)
162
129 <p> 163 <p>
130 Private slot to handle the returnPressed signal of the findtext 164 Private slot to handle the returnPressed signal of the findtext
131 combobox. 165 combobox.
132 </p><a NAME="SearchWidget.__setSearchButtons" ID="SearchWidget.__setSearchButtons"></a> 166 </p>
167 <a NAME="SearchWidget.__setSearchButtons" ID="SearchWidget.__setSearchButtons"></a>
133 <h4>SearchWidget.__setSearchButtons</h4> 168 <h4>SearchWidget.__setSearchButtons</h4>
134 <b>__setSearchButtons</b>(<i>enabled</i>) 169 <b>__setSearchButtons</b>(<i>enabled</i>)
170
135 <p> 171 <p>
136 Private slot to set the state of the search buttons. 172 Private slot to set the state of the search buttons.
137 </p><dl> 173 </p>
174 <dl>
175
138 <dt><i>enabled</i></dt> 176 <dt><i>enabled</i></dt>
139 <dd> 177 <dd>
140 flag indicating the state (boolean) 178 flag indicating the state (boolean)
141 </dd> 179 </dd>
142 </dl><a NAME="SearchWidget.keyPressEvent" ID="SearchWidget.keyPressEvent"></a> 180 </dl>
181 <a NAME="SearchWidget.keyPressEvent" ID="SearchWidget.keyPressEvent"></a>
143 <h4>SearchWidget.keyPressEvent</h4> 182 <h4>SearchWidget.keyPressEvent</h4>
144 <b>keyPressEvent</b>(<i>event</i>) 183 <b>keyPressEvent</b>(<i>event</i>)
184
145 <p> 185 <p>
146 Protected slot to handle key press events. 186 Protected slot to handle key press events.
147 </p><dl> 187 </p>
188 <dl>
189
148 <dt><i>event</i></dt> 190 <dt><i>event</i></dt>
149 <dd> 191 <dd>
150 reference to the key press event (QKeyEvent) 192 reference to the key press event (QKeyEvent)
151 </dd> 193 </dd>
152 </dl><a NAME="SearchWidget.on_closeButton_clicked" ID="SearchWidget.on_closeButton_clicked"></a> 194 </dl>
195 <a NAME="SearchWidget.on_closeButton_clicked" ID="SearchWidget.on_closeButton_clicked"></a>
153 <h4>SearchWidget.on_closeButton_clicked</h4> 196 <h4>SearchWidget.on_closeButton_clicked</h4>
154 <b>on_closeButton_clicked</b>(<i></i>) 197 <b>on_closeButton_clicked</b>(<i></i>)
198
155 <p> 199 <p>
156 Private slot to close the widget. 200 Private slot to close the widget.
157 </p><a NAME="SearchWidget.on_findNextButton_clicked" ID="SearchWidget.on_findNextButton_clicked"></a> 201 </p>
202 <a NAME="SearchWidget.on_findNextButton_clicked" ID="SearchWidget.on_findNextButton_clicked"></a>
158 <h4>SearchWidget.on_findNextButton_clicked</h4> 203 <h4>SearchWidget.on_findNextButton_clicked</h4>
159 <b>on_findNextButton_clicked</b>(<i></i>) 204 <b>on_findNextButton_clicked</b>(<i></i>)
205
160 <p> 206 <p>
161 Private slot to find the next occurrence. 207 Private slot to find the next occurrence.
162 </p><a NAME="SearchWidget.on_findPrevButton_clicked" ID="SearchWidget.on_findPrevButton_clicked"></a> 208 </p>
209 <a NAME="SearchWidget.on_findPrevButton_clicked" ID="SearchWidget.on_findPrevButton_clicked"></a>
163 <h4>SearchWidget.on_findPrevButton_clicked</h4> 210 <h4>SearchWidget.on_findPrevButton_clicked</h4>
164 <b>on_findPrevButton_clicked</b>(<i></i>) 211 <b>on_findPrevButton_clicked</b>(<i></i>)
212
165 <p> 213 <p>
166 Private slot to find the previous occurrence. 214 Private slot to find the previous occurrence.
167 </p><a NAME="SearchWidget.on_findtextCombo_editTextChanged" ID="SearchWidget.on_findtextCombo_editTextChanged"></a> 215 </p>
216 <a NAME="SearchWidget.on_findtextCombo_editTextChanged" ID="SearchWidget.on_findtextCombo_editTextChanged"></a>
168 <h4>SearchWidget.on_findtextCombo_editTextChanged</h4> 217 <h4>SearchWidget.on_findtextCombo_editTextChanged</h4>
169 <b>on_findtextCombo_editTextChanged</b>(<i>txt</i>) 218 <b>on_findtextCombo_editTextChanged</b>(<i>txt</i>)
219
170 <p> 220 <p>
171 Private slot to enable/disable the find buttons. 221 Private slot to enable/disable the find buttons.
172 </p><dl> 222 </p>
223 <dl>
224
173 <dt><i>txt</i></dt> 225 <dt><i>txt</i></dt>
174 <dd> 226 <dd>
175 text of the combobox (string) 227 text of the combobox (string)
176 </dd> 228 </dd>
177 </dl><a NAME="SearchWidget.searchStringFound" ID="SearchWidget.searchStringFound"></a> 229 </dl>
230 <a NAME="SearchWidget.searchStringFound" ID="SearchWidget.searchStringFound"></a>
178 <h4>SearchWidget.searchStringFound</h4> 231 <h4>SearchWidget.searchStringFound</h4>
179 <b>searchStringFound</b>(<i>found</i>) 232 <b>searchStringFound</b>(<i>found</i>)
233
180 <p> 234 <p>
181 Public slot to indicate that the search string was found. 235 Public slot to indicate that the search string was found.
182 </p><dl> 236 </p>
237 <dl>
238
183 <dt><i>found</i></dt> 239 <dt><i>found</i></dt>
184 <dd> 240 <dd>
185 flag indicating success (boolean) 241 flag indicating success (boolean)
186 </dd> 242 </dd>
187 </dl><a NAME="SearchWidget.showFind" ID="SearchWidget.showFind"></a> 243 </dl>
244 <a NAME="SearchWidget.showFind" ID="SearchWidget.showFind"></a>
188 <h4>SearchWidget.showFind</h4> 245 <h4>SearchWidget.showFind</h4>
189 <b>showFind</b>(<i>txt=""</i>) 246 <b>showFind</b>(<i>txt=""</i>)
247
190 <p> 248 <p>
191 Public method to display this widget. 249 Public method to display this widget.
192 </p><dl> 250 </p>
251 <dl>
252
193 <dt><i>txt</i></dt> 253 <dt><i>txt</i></dt>
194 <dd> 254 <dd>
195 text to be shown in the combo (string) 255 text to be shown in the combo (string)
196 </dd> 256 </dd>
197 </dl> 257 </dl>

eric ide

mercurial