File: kiwi.ui.search.SearchContainer.html

package info (click to toggle)
kiwi 1.9.22-4
  • links: PTS, VCS
  • area: main
  • in suites: buster, stretch
  • size: 11,976 kB
  • ctags: 5,619
  • sloc: python: 15,767; ansic: 193; xml: 77; makefile: 53; sh: 18
file content (473 lines) | stat: -rw-r--r-- 16,684 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
  "DTD/xhtml1-strict.dtd">
<html>
  <head>
    <title>API docs for &ldquo;kiwi.ui.search.SearchContainer&rdquo;</title>
    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
    <link href="apidocs.css" type="text/css" rel="stylesheet" />
    
    
  </head>
  <body>
    <h1 class="class">Class k.u.s.SearchContainer(<span title="gtk.VBox">gtk.VBox</span>):</h1>
    <p>
      <span id="part">Part of <a href="kiwi.html">kiwi</a>.<a href="kiwi.ui.html">ui</a>.<a href="kiwi.ui.search.html">search</a></span>
      
      <a href="classIndex.html#kiwi.ui.search.SearchContainer">View In Hierarchy</a>
    </p>
    <div>
      
    </div>
    <div>A search container is a widget which consists of:
<ul>
  <li>
    search entry (w/ a label) (<a 
    href="kiwi.ui.search.StringSearchFilter.html"><code>StringSearchFilter</code></a>)
  </li>
  <li>
    search button
  </li>
  <li>
    objectlist result (<code>SearchResult</code>)
  </li>
  <li>
    <p>a query executer (<a 
    href="kiwi.db.query.QueryExecuter.html"><code>kiwi.db.query.QueryExecuter</code></a>)</p>
    Additionally you can add a number of search filters to the 
    SearchContainer. You can chose if you want to add the filter in the 
    top-left corner of bottom, see <a 
    href="kiwi.enums.SearchFilterPosition.html"><code>SearchFilterPosition</code></a>
  </li>
</ul>
<table class="fieldTable"></table></div>
    
    
    <div id="splitTables">
      <table class="children sortable" id="id284">
  
  
  
  
  <tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#__init__">__init__</a></td>
    <td><span>Create a new SearchContainer object.
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#do_set_property">do_set_property</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#do_get_property">do_get_property</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#do_set_child_property">do_set_child_property</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#do_get_child_property">do_get_child_property</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#add_filter">add_filter</a></td>
    <td><span>Adds a search filter
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#set_filter_position">set_filter_position</a></td>
    <td><span>Set the the filter position.
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#get_filter_position">get_filter_position</a></td>
    <td><span>Get filter by position.
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#set_query_executer">set_query_executer</a></td>
    <td><span>Ties a QueryExecuter instance to the SearchContainer class
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#get_query_executer">get_query_executer</a></td>
    <td><span>Fetchs the QueryExecuter for the SearchContainer
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#get_primary_filter">get_primary_filter</a></td>
    <td><span>Fetches the primary filter for the SearchContainer.
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#search">search</a></td>
    <td><span>Starts a search.
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#set_auto_search">set_auto_search</a></td>
    <td><span>Enables/Disables auto search which means that the search result box
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#set_text_field_columns">set_text_field_columns</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#disable_search_entry">disable_search_entry</a></td>
    <td><span>Disables the search entry
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#set_summary_label">set_summary_label</a></td>
    <td><span>Adds a summary label to the result set
</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#_on_search_button__clicked">_on_search_button__clicked</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#_on_search_entry__activate">_on_search_entry__activate</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#_on_search_filter__changed">_on_search_filter__changed</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr><tr class="method">
    
    
    <td>Method</td>
    <td><a href="kiwi.ui.search.SearchContainer.html#_create_ui">_create_ui</a></td>
    <td><span class="undocumented">Undocumented</span></td>
  </tr>
  
</table>
      
      
    </div>
    
    
    
    <div class="function">
        <a name="kiwi.ui.search.SearchContainer.__init__"></a>
        <a name="__init__"></a>
        <div class="functionHeader">
        
        def __init__(self, columns=None, chars=25):
        
      </div>
        <div class="functionBody">
          
          <div>Create a new SearchContainer object.
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">columns</td><td>a list of <a 
href="kiwi.ui.objectlist.Column.html"><code>kiwi.ui.objectlist.Column</code></a>
</td></tr><tr><td></td><td class="fieldArg">chars</td><td>maximum number of chars used by the search entry
</td></tr></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.do_set_property"></a>
        <a name="do_set_property"></a>
        <div class="functionHeader">
        
        def do_set_property(self, pspec, value):
        
      </div>
        <div class="functionBody">
          
          <div class="undocumented">Undocumented</div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.do_get_property"></a>
        <a name="do_get_property"></a>
        <div class="functionHeader">
        
        def do_get_property(self, pspec):
        
      </div>
        <div class="functionBody">
          
          <div class="undocumented">Undocumented</div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.do_set_child_property"></a>
        <a name="do_set_child_property"></a>
        <div class="functionHeader">
        
        def do_set_child_property(self, child, property_id, value, pspec):
        
      </div>
        <div class="functionBody">
          
          <div class="undocumented">Undocumented</div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.do_get_child_property"></a>
        <a name="do_get_child_property"></a>
        <div class="functionHeader">
        
        def do_get_child_property(self, child, property_id, pspec):
        
      </div>
        <div class="functionBody">
          
          <div class="undocumented">Undocumented</div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.add_filter"></a>
        <a name="add_filter"></a>
        <div class="functionHeader">
        
        def add_filter(self, search_filter, position=SearchFilterPosition.BOTTOM, columns=None, callback=None):
        
      </div>
        <div class="functionBody">
          
          <div>Adds a search filter
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">search_filter</td><td>the search filter
</td></tr><tr><td></td><td class="fieldArg">postition</td><td>a <a 
href="kiwi.enums.SearchFilterPosition.html"><code>SearchFilterPosition</code></a>
enum
</td></tr><tr><td></td><td class="fieldArg">columns</td><td></td></tr><tr><td></td><td class="fieldArg">callback</td><td></td></tr></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.set_filter_position"></a>
        <a name="set_filter_position"></a>
        <div class="functionHeader">
        
        def set_filter_position(self, search_filter, position):
        
      </div>
        <div class="functionBody">
          
          <div>Set the the filter position.
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">search_filter</td><td></td></tr><tr><td></td><td class="fieldArg">position</td><td></td></tr></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.get_filter_position"></a>
        <a name="get_filter_position"></a>
        <div class="functionHeader">
        
        def get_filter_position(self, search_filter):
        
      </div>
        <div class="functionBody">
          
          <div>Get filter by position.
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">search_filter</td><td></td></tr></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.set_query_executer"></a>
        <a name="set_query_executer"></a>
        <div class="functionHeader">
        
        def set_query_executer(self, querty_executer):
        
      </div>
        <div class="functionBody">
          
          <div>Ties a QueryExecuter instance to the SearchContainer class
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">querty_executer</td><td>a querty executer
 (type: a <a 
href="kiwi.db.query.QueryExecuter.html"><code>QueryExecuter</code></a> 
subclass
)</td></tr></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.get_query_executer"></a>
        <a name="get_query_executer"></a>
        <div class="functionHeader">
        
        def get_query_executer(self):
        
      </div>
        <div class="functionBody">
          
          <div>Fetchs the QueryExecuter for the SearchContainer
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Returns</td><td colspan="2">a querty executer
 (type: a <a 
href="kiwi.db.query.QueryExecuter.html"><code>QueryExecuter</code></a> 
subclass
)</td></tr></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.get_primary_filter"></a>
        <a name="get_primary_filter"></a>
        <div class="functionHeader">
        
        def get_primary_filter(self):
        
      </div>
        <div class="functionBody">
          
          <div>Fetches the primary filter for the SearchContainer. The primary filter 
is the filter attached to the standard entry normally used to do free text 
searching
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Returns</td><td colspan="2">the primary filter
</td></tr></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.search"></a>
        <a name="search"></a>
        <div class="functionHeader">
        
        def search(self):
        
      </div>
        <div class="functionBody">
          
          <div>Starts a search. Fetches the states of all filters and send it to a 
query executer and finally puts the result in the result class
<table class="fieldTable"></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.set_auto_search"></a>
        <a name="set_auto_search"></a>
        <div class="functionHeader">
        
        def set_auto_search(self, auto_search):
        
      </div>
        <div class="functionBody">
          
          <div>Enables/Disables auto search which means that the search result box is 
automatically populated when a filter changes
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">auto_search</td><td>True to enable, False to disable
</td></tr></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.set_text_field_columns"></a>
        <a name="set_text_field_columns"></a>
        <div class="functionHeader">
        
        def set_text_field_columns(self, columns):
        
      </div>
        <div class="functionBody">
          
          <div class="undocumented">Undocumented</div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.disable_search_entry"></a>
        <a name="disable_search_entry"></a>
        <div class="functionHeader">
        
        def disable_search_entry(self):
        
      </div>
        <div class="functionBody">
          
          <div>Disables the search entry
<table class="fieldTable"></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer.set_summary_label"></a>
        <a name="set_summary_label"></a>
        <div class="functionHeader">
        
        def set_summary_label(self, column, label='Total:', format='%s'):
        
      </div>
        <div class="functionBody">
          
          <div>Adds a summary label to the result set
<table class="fieldTable"><tr class="fieldStart"><td class="fieldName">Parameters</td><td class="fieldArg">column</td><td>the column to sum from
</td></tr><tr><td></td><td class="fieldArg">label</td><td>the label to use, defaults to 'Total:'
</td></tr><tr><td></td><td class="fieldArg">format</td><td>the format, defaults to '%%s', must include '%%s'
</td></tr></table></div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer._on_search_button__clicked"></a>
        <a name="_on_search_button__clicked"></a>
        <div class="functionHeader">
        
        def _on_search_button__clicked(self, button):
        
      </div>
        <div class="functionBody">
          
          <div class="undocumented">Undocumented</div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer._on_search_entry__activate"></a>
        <a name="_on_search_entry__activate"></a>
        <div class="functionHeader">
        
        def _on_search_entry__activate(self, button):
        
      </div>
        <div class="functionBody">
          
          <div class="undocumented">Undocumented</div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer._on_search_filter__changed"></a>
        <a name="_on_search_filter__changed"></a>
        <div class="functionHeader">
        
        def _on_search_filter__changed(self, search_filter):
        
      </div>
        <div class="functionBody">
          
          <div class="undocumented">Undocumented</div>
        </div>
      </div><div class="function">
        <a name="kiwi.ui.search.SearchContainer._create_ui"></a>
        <a name="_create_ui"></a>
        <div class="functionHeader">
        
        def _create_ui(self):
        
      </div>
        <div class="functionBody">
          
          <div class="undocumented">Undocumented</div>
        </div>
      </div>
    
    <address>
      <a href="index.html">API Documentation</a> for Kiwi, generated by <a href="http://codespeak.net/~mwh/pydoctor/">pydoctor</a> at 2008-05-29 16:06:17.
    </address>
  </body>
</html>