Development/Tutorials/Plasma4/AbstractRunner: Difference between revisions

From KDE TechBase
(New page: {{TutorialBrowser| series=Plasma| name=Creating Runners| }} == Abstract == The Plasma workspace provides an application called KRunner which, among other things, allows one to type in...)
 
Line 13: Line 13:
This functionality is provided via plugins called "runners". These plugins can be used by any application that links again libplasma. This tutorial explores how to create a runner.
This functionality is provided via plugins called "runners". These plugins can be used by any application that links again libplasma. This tutorial explores how to create a runner.


== The AbstractRunner Superclass ==
== The Plasma::AbstractRunner Superclass ==
 
Part of libplasma, {{class|Plasma::AbstractRunner}} is the base class of all runners. It provides API for the following functionality:
 
* Register matches for a given search term
* Take action on a given match registered by the runner
* Show configuration options


== The SearchContext and SearchAction Classes ==
== The SearchContext and SearchAction Classes ==

Revision as of 06:00, 31 October 2007

Creating Runners
Tutorial Series   Plasma
Previous   None
What's Next   n/a
Further Reading   n/a

Abstract

The Plasma workspace provides an application called KRunner which, among other things, allows one to type into a text area which causes various actions and information that match the text appear as the text is being typed.

This functionality is provided via plugins called "runners". These plugins can be used by any application that links again libplasma. This tutorial explores how to create a runner.

The Plasma::AbstractRunner Superclass

Part of libplasma, Plasma::AbstractRunner is the base class of all runners. It provides API for the following functionality:

  • Register matches for a given search term
  • Take action on a given match registered by the runner
  • Show configuration options

The SearchContext and SearchAction Classes

Setting up a Runner Plugin Project

The CMakeLists.txt File

The .desktop Servies File

Registering Matches

Taking Action On Matches

Configuration Interfaces

Runner Options

Match Result Options