Devhelp.KeywordModel

g Devhelp.KeywordModel Devhelp.KeywordModel GObject.GInterface GObject.GInterface Gtk.TreeModel Gtk.TreeModel GObject.GInterface->Gtk.TreeModel GObject.Object GObject.Object GObject.Object->Devhelp.KeywordModel Gtk.TreeModel->Devhelp.KeywordModel

Subclasses:

None

Methods

Inherited:

GObject.Object (37), Gtk.TreeModel (28)

Structs:

GObject.ObjectClass (5)

class

new ()

filter (search_string, current_book_id, profile)

Virtual Methods

Inherited:

GObject.Object (7), Gtk.TreeModel (19)

Properties

None

Signals

Inherited:

GObject.Object (1), Gtk.TreeModel (5)

Fields

Inherited:

GObject.Object (1), Gtk.TreeModel (5)

Name

Type

Access

Description

parent_instance

GObject.Object

r

Class Details

class Devhelp.KeywordModel(**kwargs)
Bases:

GObject.Object, Gtk.TreeModel

Abstract:

No

Structure:

Devhelp.KeywordModelClass

classmethod new()
Returns:

a new Devhelp.KeywordModel object.

Return type:

Devhelp.KeywordModel

filter(search_string, current_book_id, profile)
Parameters:
Returns:

the Devhelp.Link that matches exactly search_string, or None if no such Devhelp.Link was found within the maximum number of matches.

Return type:

Devhelp.Link or None

Searches in the Devhelp.BookList of profile the list of Devhelp.Link's that correspond to search_string, and fills the self with that list (erasing the previous content).

Attention, when calling this function the self needs to be disconnected from the Gtk.TreeView, because the Gtk.TreeModel signals are not emitted, to improve the performances (sending a lot of signals is slow) and have a simpler implementation. The previous row selection is anyway no longer relevant.

Note that there is a maximum number of matches (configured internally). When the maximum is reached the search is stopped, to avoid blocking the GUI (since this function runs synchronously) if the search_string contains for example only one character. (And it is anyway not very useful to show to the user tens of thousands search results).