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

Plasma

  • Plasma
  • RunnerSyntax
Public Member Functions | List of all members
Plasma::RunnerSyntax Class Reference

#include <runnersyntax.h>

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.

Parameters
exampleQueryan 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:"
descritionA description of what the described syntax does from the user's point of view.

Definition at line 41 of file runnersyntax.cpp.

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

Copy constructor.

Definition at line 46 of file runnersyntax.cpp.

Plasma::RunnerSyntax::~RunnerSyntax ( )

Definition at line 51 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

Parameters
exampleQueryan 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 62 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 88 of file runnersyntax.cpp.

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

Definition at line 67 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 72 of file runnersyntax.cpp.

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

Assignment operator.

Definition at line 56 of file runnersyntax.cpp.

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

Definition at line 100 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 83 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 95 of file runnersyntax.cpp.


The documentation for this class was generated from the following files:
  • runnersyntax.h
  • runnersyntax.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:35 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Plasma

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal