• Skip to content
  • Skip to link menu
KDE 4.1 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

libplasma

Plasma::RunnerContext

Plasma::RunnerContext Class Reference

#include <runnercontext.h>

Inheritance diagram for Plasma::RunnerContext:

Inheritance graph
[legend]

List of all members.


Detailed Description

The RunnerContext class provides information related to a search, including the search term, metadata on the search term and collected matches.

Definition at line 43 of file runnercontext.h.


Public Types

enum  Type {
  None = 0, UnknownType = 1, Directory = 2, File = 4,
  NetworkLocation = 8, Executable = 16, ShellCommand = 32, Help = 64,
  FileSystem = Directory | File | Executable | ShellCommand
}

Signals

void matchesChanged ()

Public Member Functions

bool addMatch (const QString &term, const QueryMatch &match)
bool addMatches (const QString &term, const QList< QueryMatch > &matches)
QueryMatch match (const QString &id) const
QList< QueryMatch > matches () const
QString mimeType () const
QString query () const
void reset ()
 RunnerContext (RunnerContext &other, QObject *parent=0)
 RunnerContext (QObject *parent=0)
void setQuery (const QString &term)
Type type () const
 ~RunnerContext ()

Member Enumeration Documentation

enum Plasma::RunnerContext::Type

Enumerator:
None 
UnknownType 
Directory 
File 
NetworkLocation 
Executable 
ShellCommand 
Help 
FileSystem 

Definition at line 48 of file runnercontext.h.


Constructor & Destructor Documentation

Plasma::RunnerContext::RunnerContext ( QObject *  parent = 0  )  [explicit]

Definition at line 124 of file runnercontext.cpp.

Plasma::RunnerContext::RunnerContext ( RunnerContext &  other,
QObject *  parent = 0 
) [explicit]

Copy constructor.

Definition at line 131 of file runnercontext.cpp.

Plasma::RunnerContext::~RunnerContext (  ) 

Definition at line 139 of file runnercontext.cpp.


Member Function Documentation

bool Plasma::RunnerContext::addMatch ( const QString &  term,
const QueryMatch &  match 
)

Appends a match to the existing list of matches.

The RunnerContext takes over ownership of the match on successful addition.

If you are going to be adding multiple matches, use addMatches instead.

  • term the search term that this match was generated for
  • match the match to add
Returns:
true if the match was added, false otherwise.

Definition at line 223 of file runnercontext.cpp.

bool Plasma::RunnerContext::addMatches ( const QString &  term,
const QList< QueryMatch > &  matches 
)

Appends lists of matches to the list of matches.

The RunnerContext takes over ownership of the matches on successful addition.

This method is thread safe and causes the matchesChanged() signal to be emitted.

Returns:
true if matches were added, false if matches were e.g. outdated

Definition at line 196 of file runnercontext.cpp.

QueryMatch Plasma::RunnerContext::match ( const QString &  id  )  const

Retrieves a match by id.

Parameters:
id the id of the match to return
Returns:
the match associated with this id, or an invalid QueryMatch object if the id does not eixst

Definition at line 245 of file runnercontext.cpp.

QList< QueryMatch > Plasma::RunnerContext::matches (  )  const

Retrieves all available matches for the current search term.

Returns:
a list of matches

Definition at line 237 of file runnercontext.cpp.

void Plasma::RunnerContext::matchesChanged (  )  [signal]

QString Plasma::RunnerContext::mimeType (  )  const

The mimetype that the search term refers to, if discoverable.

Returns:
QString() if the mimetype can not be determined, otherwise the mimetype of the object being referred to by the search string.

Definition at line 191 of file runnercontext.cpp.

QString Plasma::RunnerContext::query (  )  const

Returns:
the current search query term.

Definition at line 178 of file runnercontext.cpp.

void Plasma::RunnerContext::reset (  ) 

Resets the search term for this object.

This removes all current matches in the process.

Definition at line 143 of file runnercontext.cpp.

void Plasma::RunnerContext::setQuery ( const QString &  term  ) 

Sets the query term for this object and attempts to determine the type of the search.

Definition at line 165 of file runnercontext.cpp.

RunnerContext::Type Plasma::RunnerContext::type (  )  const

The type of item the search term might refer to.

See also:
Type

Definition at line 186 of file runnercontext.cpp.


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

libplasma

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

API Reference

Skip menu "API Reference"
  • KWin
  •   KWin Libraries
  • Libraries
  •   libkworkspace
  •   libplasma
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.4
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