KDE TechBase
  • Page
  • Discussion
  • Edit
  • History
KDE TechBase is a Wiki - You can help! Please contribute! Questions?

Development/Tutorials/Plasma/AbstractRunner

< Development | Tutorials | Plasma
Creating Runners
Tutorial Series   Plasma
Prerequisites   None
What's Next   n/a
Further Reading   n/a

Contents

  • 1 Abstract
  • 2 The Plasma::AbstractRunner Superclass
  • 3 The SearchContext and SearchAction Classes
  • 4 Setting up a Runner Plugin Project
    • 4.1 The CMakeLists.txt File
    • 4.2 The .desktop Servies File
    • 4.3 The header file
  • 5 Registering Matches
  • 6 Taking Action On Matches
  • 7 Configuration Interfaces
    • 7.1 Runner Options
    • 7.2 Match Result Options

[edit] 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.

[edit] 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 interface it provides is licensed under the LGPL and can therefore be linked to by a code on a variety of Free/Open Source as well as proprietary licenses.

[edit] The SearchContext and SearchAction Classes

[edit] Setting up a Runner Plugin Project

[edit] The CMakeLists.txt File

[edit] The .desktop Servies File

[edit] The header file

[edit] Registering Matches

[edit] Taking Action On Matches

[edit] Configuration Interfaces

[edit] Runner Options

[edit] Match Result Options

Retrieved from "http://techbase.kde.org/Development/Tutorials/Plasma/AbstractRunner"
Category: Tutorial

Navigation

  • Home
  • Help
  • Recent changes

Sections

  • Getting started
  • Development
  • Schedules
  • Policies
  • Contribute
  • Projects

Toolbox

  • What links here
  • Related changes
  • Upload file
  • Special pages
  • Printable version
  • Permanent link

Personal tools

  • Log in / create account
  • Login with OpenID
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal