lib

eventsignal.h
1/***************************************************************************
2 * eventsignal.h
3 * This file is part of the KDE project
4 * copyright (C)2004-2005 by Sebastian Sauer (mail@dipe.org)
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
14 * You should have received a copy of the GNU Library General Public License
15 * along with this program; see the file COPYING. If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 ***************************************************************************/
19
20#ifndef KROSS_API_EVENTSIGNAL_H
21#define KROSS_API_EVENTSIGNAL_H
22
23#include "koffice_export.h"
24
25#include <tqobject.h>
26#include <ksharedptr.h>
27
28#include "event.h"
29
30namespace Kross { namespace Api {
31
37 class KOFFICE_EXPORT EventSignal : public Event<EventSignal>
38 {
39 public:
40
44 typedef TDESharedPtr<EventSignal> Ptr;
45
49 EventSignal(const TQString& name, TQObject* sender, TQCString signal);
50
54 virtual ~EventSignal();
55
56 virtual const TQString getClassName() const;
57
58 virtual Object::Ptr call(const TQString& name, TDESharedPtr<List> arguments);
59
60/*
61 signals:
62 void callback();
63 void callback(const TQString&);
64 void callback(int);
65 void callback(bool);
66*/
67 private:
68 TQObject* m_sender;
69 TQCString m_signal;
70 };
71
72}}
73
74#endif
75
EventSignal(const TQString &name, TQObject *sender, TQCString signal)
Constructor.
virtual const TQString getClassName() const
Return the class name.
virtual Object::Ptr call(const TQString &name, TDESharedPtr< List > arguments)
Pass a call to the object and evaluated it recursive down the object-hierachy.
TDESharedPtr< EventSignal > Ptr
Shared pointer to implement reference-counting.
Definition eventsignal.h:44
Event(const TQString &name)
Definition event.h:68
TDESharedPtr< Object > Ptr
Shared pointer to implement reference-counting.
Definition object.h:56
The common Kross API used as common codebase.
Definition callable.h:33
The Kross scripting bridge to embed scripting functionality into an application.
Definition callable.h:33