lib

eventaction.h

00001 /***************************************************************************
00002  * eventaction.h
00003  * This file is part of the KDE project
00004  * copyright (C)2004-2005 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_API_EVENTACTION_H
00021 #define KROSS_API_EVENTACTION_H
00022 
00023 #include <qstring.h>
00024 //#include <qobject.h>
00025 #include <kaction.h>
00026 #include <ksharedptr.h>
00027 
00028 #include "event.h"
00029 
00030 namespace Kross { namespace Api {
00031 
00032     // Forward declarations.
00033     class ScriptContainer;
00034 
00040     class EventAction : public Event<EventAction>
00041     {
00042 
00043         public:
00044 
00048             typedef KSharedPtr<EventAction> Ptr;
00049 
00053             EventAction(const QString& name, KAction* action);
00054 
00058             virtual ~EventAction();
00059 
00061             virtual const QString getClassName() const;
00062 
00064             //virtual Object::Ptr call(const QString& name, KSharedPtr<List> arguments);
00065 
00066         private:
00067             KAction* m_action;
00068 
00070             Kross::Api::Object::Ptr getText(Kross::Api::List::Ptr);
00072             Kross::Api::Object::Ptr setText(Kross::Api::List::Ptr);
00073 
00075             Kross::Api::Object::Ptr isEnabled(Kross::Api::List::Ptr);
00077             Kross::Api::Object::Ptr setEnabled(Kross::Api::List::Ptr);
00078 
00080             Kross::Api::Object::Ptr activate(Kross::Api::List::Ptr);
00081     };
00082 
00083 }}
00084 
00085 #endif
00086 
KDE Home | KDE Accessibility Home | Description of Access Keys