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

Plasma

runnerscriptqscript.h

Go to the documentation of this file.
00001 // -*- c++ -*-
00002 
00003 /*
00004  *   Copyright 2008 Richard J. Moore <rich@kde.org>
00005  *
00006  *   This program is free software; you can redistribute it and/or modify
00007  *   it under the terms of the GNU Library General Public License version 2 as
00008  *   published by the Free Software Foundation
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details
00014  *
00015  *   You should have received a copy of the GNU Library General Public
00016  *   License along with this program; if not, write to the
00017  *   Free Software Foundation, Inc.,
00018  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00019  */
00020 
00021 #ifndef RUNNERSCRIPTQSCRIPT_H
00022 #define RUNNERSCRIPTQSCRIPT_H
00023 
00024 #include <QScriptValue>
00025 
00026 #include <plasma/scripting/runnerscript.h>
00027 
00028 class QScriptEngine;
00029 class QScriptContext;
00030 
00031 class RunnerScriptQScript : public Plasma::RunnerScript
00032 {
00033     Q_OBJECT
00034 
00035 public:
00036     RunnerScriptQScript(QObject *parent, const QVariantList &args);
00037     ~RunnerScriptQScript();
00038 
00039     bool init();
00040 
00042     Q_INVOKABLE Plasma::AbstractRunner* runner() const;
00043 
00045     void match(Plasma::RunnerContext *search);
00046 
00048     void exec(const Plasma::RunnerContext *search, const Plasma::QueryMatch *action);
00049 
00050 protected:
00051     void setupObjects();
00052     void importExtensions();
00053     void reportError();
00054 
00055 private:
00056     QScriptEngine *m_engine;
00057     QScriptValue m_self;
00058 };
00059 
00060 K_EXPORT_PLASMA_RUNNERSCRIPTENGINE(qscriptrunner, RunnerScriptQScript)
00061 
00062 #endif // RUNNERSCRIPTQSCRIPT_H

Plasma

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

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