• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • kdelibs
  • KDE Home
  • Contact Us
 

Plasma

  • Plasma
  • RunnerSyntax
Public Member Functions

Plasma::RunnerSyntax Class Reference

#include <runnersyntax.h>

List of all members.

Public Member Functions

 RunnerSyntax (const QString &exampleQuery, const QString &description)
 RunnerSyntax (const RunnerSyntax &other)
 ~RunnerSyntax ()
void addExampleQuery (const QString &exampleQuery)
QString description () const
QStringList exampleQueries () const
QStringList exampleQueriesWithTermDescription () const
RunnerSyntax & operator= (const RunnerSyntax &rhs)
QString searchTermDescription () const
void setDescription (const QString &description)
void setSearchTermDescription (const QString &description)

Detailed Description

Since:
4.3

Represents a query prototype that the runner accepts. These can be created and registered with AbstractRunner::addSyntax(Syntax &) to allow applications to show to the user what the runner is currently capable of doing

Definition at line 40 of file runnersyntax.h.


Constructor & Destructor Documentation

Plasma::RunnerSyntax::RunnerSyntax ( const QString &  exampleQuery,
const QString &  description 
)

Constructs a simple syntax object.

  • exampleQuery an example of the query, with :q: placed wherever search term text might appear. e.g. if the runner accepts "keyword some random text" then the value of this parameter should be "keyword :q:"
  • descrition A description of what the described syntax does from the user's point of view.

Definition at line 42 of file runnersyntax.cpp.

Plasma::RunnerSyntax::RunnerSyntax ( const RunnerSyntax &  other)

Copy constructor.

Definition at line 47 of file runnersyntax.cpp.

Plasma::RunnerSyntax::~RunnerSyntax ( )

Definition at line 52 of file runnersyntax.cpp.


Member Function Documentation

void Plasma::RunnerSyntax::addExampleQuery ( const QString &  exampleQuery)

Adds a synonymous example query to this Syntax.

Some runners may accept multiple formulations of keywords to trigger the same behaviour. This allows the runner to show these relationships by grouping the example queries into one Syntax object

  • exampleQuery an example of the query, with :q: placed wherever search term text might appear. e.g. if the runner accepts "keyword some random text" then the value of this parameter should be "keyword :q:"

Definition at line 63 of file runnersyntax.cpp.

QString Plasma::RunnerSyntax::description ( ) const
Returns:
the description of what the syntax does from the user's point of view

Definition at line 89 of file runnersyntax.cpp.

QStringList Plasma::RunnerSyntax::exampleQueries ( ) const
Returns:
the example queries associated with this Syntax object

Definition at line 68 of file runnersyntax.cpp.

QStringList Plasma::RunnerSyntax::exampleQueriesWithTermDescription ( ) const
Returns:
the example queries associated with this Syntax object, with the searchTermDescription replacing instances of :q:. Used for showing the queries in the user interface.

Definition at line 73 of file runnersyntax.cpp.

RunnerSyntax & Plasma::RunnerSyntax::operator= ( const RunnerSyntax &  rhs)

Assignment operator.

Definition at line 57 of file runnersyntax.cpp.

QString Plasma::RunnerSyntax::searchTermDescription ( ) const
Returns:
a description of the search term for this syntax

Definition at line 101 of file runnersyntax.cpp.

void Plasma::RunnerSyntax::setDescription ( const QString &  description)

Sets the description for the syntax, describing what it does from the user's point of view.

Definition at line 84 of file runnersyntax.cpp.

void Plasma::RunnerSyntax::setSearchTermDescription ( const QString &  description)

Sets the text that should be used to replace instances of :q: in the text.

By default this is the generic phrase "search term". If the syntax expects a specific kind of input, it may be defined here. A syntax used by a runner that changes the brightness of the display may set this to "brightness" for instance.

Definition at line 96 of file runnersyntax.cpp.


The documentation for this class was generated from the following files:
  • runnersyntax.h
  • runnersyntax.cpp

Plasma

Skip menu "Plasma"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal