RB.SourceSearch¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
Properties¶
None
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class RB.SourceSearch(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
- Parameters:
action_namespace (
str
) – muxer namespace for the action (“app” or “win”)action (
Gio.Action
) – search action to attach the menu item toname (
str
) – name of the search instance to add
Adds a registered search instance to a search menu.
- classmethod get_by_name(name)¶
- Parameters:
name (
str
) – name to look up- Returns:
search instance, or
None
if not found- Return type:
Finds the registered search instance with the specified name
- create_query(db, search_text)¶
- Parameters:
db (
RB.RhythmDB
) – theRB.RhythmDB
search_text (
str
) – the search text
- Returns:
#RhythmDBQuery for the source to use
- Return type:
Creates a #RhythmDBQuery from the user’s search text.
- get_description()¶
- Returns:
description string
- Return type:
Returns a description of the search suitable for displaying in a menu
- is_subset(current, next)¶
- Parameters:
- Returns:
True
iff the new search text will match a subset of those matched by the current search.- Return type:
Determines whether the new search text will result in a subset of entries matched by the previous search. This is used to optimise the search query.
- register(name)¶
- Parameters:
name (
str
) – name to register
Registers a named search instance that can be used in menus and search action states.
- do_create_query(db, search_text) virtual¶
- Parameters:
db (
RB.RhythmDB
) – theRB.RhythmDB
search_text (
str
) – the search text
- Returns:
#RhythmDBQuery for the source to use
- Return type:
Creates a #RhythmDBQuery from the user’s search text.
- do_get_description() virtual¶
- Returns:
description string
- Return type:
Returns a description of the search suitable for displaying in a menu
- do_is_subset(current, next) virtual¶
- Parameters:
- Returns:
True
iff the new search text will match a subset of those matched by the current search.- Return type:
Determines whether the new search text will result in a subset of entries matched by the previous search. This is used to optimise the search query.