C# Класс Plasma.RunnerContext

Наследование: Qyoto.QObject, IDisposable
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
CreateProxy ( ) : void
RunnerContext ( Type dummy ) : System

Описание методов

AddMatch() публичный Метод

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
Результат bool

AddMatches() публичный Метод

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
Результат bool

CreateProxy() защищенный Метод

protected CreateProxy ( ) : void
Результат void

Dispose() публичный Метод

public Dispose ( ) : void
Результат void

IsValid() публичный Метод

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
Результат bool

Match() публичный Метод

Retrieves a match by id. name="id" the id of the match to return
public Match ( string id ) : Plasma.QueryMatch
id string
Результат Plasma.QueryMatch

Matches() публичный Метод

Retrieves all available matches for the current search term.
public Matches ( ) : List
Результат List

MimeType() публичный Метод

The mimetype that the search term refers to, if discoverable.
public MimeType ( ) : string
Результат string

Query() публичный Метод

public Query ( ) : string
Результат string

RemoveMatch() публичный Метод

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
Результат bool

RemoveMatches() публичный Метод

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
Результат bool

Reset() публичный Метод

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
Результат void

Restore() публичный Метод

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
Результат void

Run() публичный Метод

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
Результат void

RunnerContext() публичный Метод

public RunnerContext ( ) : System
Результат System

RunnerContext() публичный Метод

public RunnerContext ( Plasma other ) : System
other Plasma
Результат System

RunnerContext() публичный Метод

Copy constructor
public RunnerContext ( Plasma other, QObject parent ) : System
other Plasma
parent Qyoto.QObject
Результат System

RunnerContext() публичный Метод

public RunnerContext ( QObject parent ) : System
parent Qyoto.QObject
Результат System

RunnerContext() защищенный Метод

protected RunnerContext ( Type dummy ) : System
dummy System.Type
Результат System

Save() публичный Метод

name="config" the config group where launch data should be stored
public Save ( Kimono.KConfigGroup config ) : void
config Kimono.KConfigGroup
Результат void

SetQuery() публичный Метод

Sets the query term for this object and attempts to determine the type of the search.
public SetQuery ( string term ) : void
term string
Результат void

SetSingleRunnerQueryMode() публичный Метод

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
Результат void

SingleRunnerQueryMode() публичный Метод

public SingleRunnerQueryMode ( ) : bool
Результат bool

type() публичный Метод

The type of item the search term might refer to.
public type ( ) : Plasma.RunnerContext.TypeOf
Результат Plasma.RunnerContext.TypeOf