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

Kross

action.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  * action.h
00003  * This file is part of the KDE project
00004  * copyright (C)2004-2007 by Sebastian Sauer (mail@dipe.org)
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
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 GNU
00013  * Library General Public License for more details.
00014  * You should have received a copy of the GNU Library General Public License
00015  * along with this program; see the file COPYING.  If not, write to
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018  ***************************************************************************/
00019 
00020 #ifndef KROSS_ACTION_H
00021 #define KROSS_ACTION_H
00022 
00023 
00024 #include <QtCore/QVariant>
00025 #include <QtCore/QObject>
00026 #include <QtCore/QDir>
00027 #include <QtXml/QDomAttr>
00028 #include <QtGui/QAction>
00029 #include <QtCore/QUrl>
00030 
00031 #include "errorinterface.h"
00032 #include "childreninterface.h"
00033 
00034 namespace Kross {
00035 
00092     class KROSSCORE_EXPORT Action : public QAction, public ChildrenInterface, public ErrorInterface
00093     {
00094             Q_OBJECT
00095 
00096         public:
00097 
00106             Action(QObject* parent, const QString& name, const QDir& packagepath = QDir());
00107 
00119             Action(QObject* parent, const QUrl& url);
00120 
00124             virtual ~Action();
00125 
00131             void fromDomElement(const QDomElement& element);
00132 
00138             QDomElement toDomElement() const;
00139 
00145             QMap<QString, QVariant>& options() const;
00146 
00152             QVariant option(const QString& name, const QVariant& defaultvalue = QVariant());
00153 
00157             bool setOption(const QString& name, const QVariant& value);
00158 
00162             QStringList functionNames();
00163 
00170             QVariant callFunction(const QString& name, const QVariantList& args = QVariantList());
00171 
00181             bool initialize();
00182 
00189             void finalize();
00190 
00195             bool isFinalized() const;
00196 
00197         public Q_SLOTS:
00198 
00202             QString name() const;
00203 
00208             int version() const;
00209 
00213             QString description() const;
00214 
00218             void setDescription(const QString& description);
00219 
00223             QString iconName() const;
00224 
00228             void setIconName(const QString& iconname);
00229 
00233             bool isEnabled() const;
00234 
00238             void setEnabled(bool enabled);
00239 
00243             QString file() const;
00244 
00248             bool setFile(const QString& scriptfile);
00249 
00253             QByteArray code() const;
00254 
00258             void setCode(const QByteArray& code);
00259 
00264             QString interpreter() const;
00265 
00269             void setInterpreter(const QString& interpretername);
00270 
00275             QString currentPath() const;
00276 
00277         Q_SIGNALS:
00278 
00285             void updated();
00286 
00290             void started(Kross::Action*);
00291 
00295             void finished(Kross::Action*);
00296 
00300             void finalized(Kross::Action*);
00301 
00302         private Q_SLOTS:
00303 
00309             void slotTriggered();
00310 
00311         private:
00313             class Private;
00315             Private* const d;
00316     };
00317 
00318 }
00319 
00320 #endif
00321 

Kross

Skip menu "Kross"
  • 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
  •   WTF
  • KJSEmbed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  •   core
  • Phonon
  •   Backend
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs 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