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

Plasma

javascriptrunner.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/RunnerScript>
00027 
00028 class QScriptEngine;
00029 
00030 class JavaScriptRunner : public Plasma::RunnerScript
00031 {
00032     Q_OBJECT
00033 
00034 public:
00035     JavaScriptRunner(QObject *parent, const QVariantList &args);
00036     ~JavaScriptRunner();
00037 
00038     bool init();
00039 
00041     Q_INVOKABLE Plasma::AbstractRunner* runner() const;
00042 
00044     void match(Plasma::RunnerContext *search);
00045 
00047     void exec(const Plasma::RunnerContext *search, const Plasma::QueryMatch *action);
00048 
00049 protected:
00050     void setupObjects();
00051     void importExtensions();
00052     void reportError();
00053 
00054 private:
00055     QScriptEngine *m_engine;
00056     QScriptValue m_self;
00057 };
00058 
00059 K_EXPORT_PLASMA_RUNNERSCRIPTENGINE(qscriptrunner, JavaScriptRunner)
00060 
00061 #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
  •   libsolidcontrol
  •   libtaskmanager
  • Plasma
  •   Animators
  •   Applets
  •   Engines
  • Solid Modules
Generated for API Reference by doxygen 1.5.7
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