C# Class Plasma.RunnerContext

Inheritance: Qyoto.QObject, IDisposable
Afficher le fichier Open project: 0xd34df00d/Qross

Méthodes publiques

Méthode Description
AddMatch ( string term, Plasma match ) : bool Appends a match to the existing list of matches. If you are going to be adding multiple matches, use addMatches instead. @arg term the search term that this match was generated for. @arg match the match to add
AddMatches ( string term, List matches ) : bool Appends lists of matches to the list of matches. This method is thread safe and causes the matchesChanged() signal to be emitted.
Dispose ( ) : void
IsValid ( ) : bool while (.. a possibly large iteration) { if (!context.isValid()) { return; } ... some processing ... } While not required to be used within runners, it provies a nice way to avoid unnecessary processing in runners that may run for an extended period (as measured in 10s of ms) and therefore improve the user experience.
Match ( string id ) : Plasma.QueryMatch Retrieves a match by id. name="id" the id of the match to return
Matches ( ) : List Retrieves all available matches for the current search term.
MimeType ( ) : string The mimetype that the search term refers to, if discoverable.
Query ( ) : string
RemoveMatch ( string matchId ) : bool Removes a match from the existing list of matches. If you are going to be removing multiple matches, use removeMatches instead. @arg matchId the id of match to remove
RemoveMatches ( List matchIdList ) : bool Removes lists of matches from the existing list of matches. This method is thread safe and causes the matchesChanged() signal to be emitted. @arg matchIdList the list of matches id to remove
Reset ( ) : void Resets the search term for this object. This removes all current matches in the process and turns off single runner query mode.
Restore ( Kimono.KConfigGroup config ) : void Sets the launch counts for the associated match ids If a runner adds a match to this context, the context will check if the match id has been launched before and increase the matches relevance correspondingly. In this manner, any front end can implement adaptive search by sorting items according to relevance. name="config" the config group where launch data was stored
Run ( Plasma match ) : void Run a match using the information from this context The context will also keep track of the number of times the match was launched to sort future matches according to user habits name="match" the match to run
RunnerContext ( ) : System
RunnerContext ( Plasma other ) : System
RunnerContext ( Plasma other, QObject parent ) : System Copy constructor
RunnerContext ( QObject parent ) : System
Save ( Kimono.KConfigGroup config ) : void name="config" the config group where launch data should be stored
SetQuery ( string term ) : void Sets the query term for this object and attempts to determine the type of the search.
SetSingleRunnerQueryMode ( bool enabled ) : void Sets single runner query mode. Note that a call to reset() will turn off single runner query mode.
SingleRunnerQueryMode ( ) : bool
type ( ) : Plasma.RunnerContext.TypeOf The type of item the search term might refer to.

Méthodes protégées

Méthode Description
CreateProxy ( ) : void
RunnerContext ( Type dummy ) : System

Method Details

AddMatch() public méthode

Appends a match to the existing list of matches. If you are going to be adding multiple matches, use addMatches instead. @arg term the search term that this match was generated for. @arg match the match to add
public AddMatch ( string term, Plasma match ) : bool
term string
match Plasma
Résultat bool

AddMatches() public méthode

Appends lists of matches to the list of matches. This method is thread safe and causes the matchesChanged() signal to be emitted.
public AddMatches ( string term, List matches ) : bool
term string
matches List
Résultat bool

CreateProxy() protected méthode

protected CreateProxy ( ) : void
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

IsValid() public méthode

while (.. a possibly large iteration) { if (!context.isValid()) { return; } ... some processing ... } While not required to be used within runners, it provies a nice way to avoid unnecessary processing in runners that may run for an extended period (as measured in 10s of ms) and therefore improve the user experience.
public IsValid ( ) : bool
Résultat bool

Match() public méthode

Retrieves a match by id. name="id" the id of the match to return
public Match ( string id ) : Plasma.QueryMatch
id string
Résultat Plasma.QueryMatch

Matches() public méthode

Retrieves all available matches for the current search term.
public Matches ( ) : List
Résultat List

MimeType() public méthode

The mimetype that the search term refers to, if discoverable.
public MimeType ( ) : string
Résultat string

Query() public méthode

public Query ( ) : string
Résultat string

RemoveMatch() public méthode

Removes a match from the existing list of matches. If you are going to be removing multiple matches, use removeMatches instead. @arg matchId the id of match to remove
public RemoveMatch ( string matchId ) : bool
matchId string
Résultat bool

RemoveMatches() public méthode

Removes lists of matches from the existing list of matches. This method is thread safe and causes the matchesChanged() signal to be emitted. @arg matchIdList the list of matches id to remove
public RemoveMatches ( List matchIdList ) : bool
matchIdList List
Résultat bool

Reset() public méthode

Resets the search term for this object. This removes all current matches in the process and turns off single runner query mode.
public Reset ( ) : void
Résultat void

Restore() public méthode

Sets the launch counts for the associated match ids If a runner adds a match to this context, the context will check if the match id has been launched before and increase the matches relevance correspondingly. In this manner, any front end can implement adaptive search by sorting items according to relevance. name="config" the config group where launch data was stored
public Restore ( Kimono.KConfigGroup config ) : void
config Kimono.KConfigGroup
Résultat void

Run() public méthode

Run a match using the information from this context The context will also keep track of the number of times the match was launched to sort future matches according to user habits name="match" the match to run
public Run ( Plasma match ) : void
match Plasma
Résultat void

RunnerContext() public méthode

public RunnerContext ( ) : System
Résultat System

RunnerContext() public méthode

public RunnerContext ( Plasma other ) : System
other Plasma
Résultat System

RunnerContext() public méthode

Copy constructor
public RunnerContext ( Plasma other, QObject parent ) : System
other Plasma
parent Qyoto.QObject
Résultat System

RunnerContext() public méthode

public RunnerContext ( QObject parent ) : System
parent Qyoto.QObject
Résultat System

RunnerContext() protected méthode

protected RunnerContext ( Type dummy ) : System
dummy System.Type
Résultat System

Save() public méthode

name="config" the config group where launch data should be stored
public Save ( Kimono.KConfigGroup config ) : void
config Kimono.KConfigGroup
Résultat void

SetQuery() public méthode

Sets the query term for this object and attempts to determine the type of the search.
public SetQuery ( string term ) : void
term string
Résultat void

SetSingleRunnerQueryMode() public méthode

Sets single runner query mode. Note that a call to reset() will turn off single runner query mode.
public SetSingleRunnerQueryMode ( bool enabled ) : void
enabled bool
Résultat void

SingleRunnerQueryMode() public méthode

public SingleRunnerQueryMode ( ) : bool
Résultat bool

type() public méthode

The type of item the search term might refer to.
public type ( ) : Plasma.RunnerContext.TypeOf
Résultat Plasma.RunnerContext.TypeOf