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

Plasma

runnerscript.cpp

Go to the documentation of this file.
00001 /*
00002  *   Copyright 2007 by Aaron Seigo <aseigo@kde.org>
00003  *
00004  *   This program is free software; you can redistribute it and/or modify
00005  *   it under the terms of the GNU Library General Public License as
00006  *   published by the Free Software Foundation; either version 2, or
00007  *   (at your option) any later version.
00008  *
00009  *   This program is distributed in the hope that it will be useful,
00010  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *   GNU General Public License for more details
00013  *
00014  *   You should have received a copy of the GNU Library General Public
00015  *   License along with this program; if not, write to the
00016  *   Free Software Foundation, Inc.,
00017  *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
00018  */
00019 
00020 #include "plasma/scripting/runnerscript.h"
00021 
00022 #include "plasma/abstractrunner.h"
00023 #include "plasma/package.h"
00024 
00025 namespace Plasma
00026 {
00027 
00028 class RunnerScriptPrivate
00029 {
00030 public:
00031     AbstractRunner *runner;
00032 };
00033 
00034 RunnerScript::RunnerScript(QObject *parent)
00035     : ScriptEngine(parent),
00036       d(new RunnerScriptPrivate)
00037 {
00038 }
00039 
00040 RunnerScript::~RunnerScript()
00041 {
00042 //    delete d;
00043 }
00044 
00045 void RunnerScript::setRunner(AbstractRunner *runner)
00046 {
00047     d->runner = runner;
00048 }
00049 
00050 AbstractRunner *RunnerScript::runner() const
00051 {
00052     return d->runner;
00053 }
00054 
00055 void RunnerScript::match(Plasma::RunnerContext &search)
00056 {
00057     Q_UNUSED(search);
00058 }
00059 
00060 void RunnerScript::run(const Plasma::RunnerContext &search, const Plasma::QueryMatch &action)
00061 {
00062     Q_UNUSED(search);
00063     Q_UNUSED(action);
00064 }
00065 
00066 const Package *RunnerScript::package() const
00067 {
00068     return d->runner ? d->runner->package() : 0;
00069 }
00070 
00071 QString RunnerScript::mainScript() const
00072 {
00073     if (!package()) {
00074         return QString();
00075     } else {
00076         return package()->filePath("mainscript");
00077     }
00078 }
00079 
00080 } // Plasma namespace
00081 
00082 #include "runnerscript.moc"

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
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs 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